X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=daemon%2Fwc.c;h=b64940b7853f8607db18748d412db22441943ab6;hp=972044320d46610ccaf416188fc8347729a95648;hb=2eb19f526164a978c373a760deb30854d56b62ce;hpb=6bda071b5cd8393b37653687027c4ae6c6cf3804 diff --git a/daemon/wc.c b/daemon/wc.c index 9720443..b64940b 100644 --- a/daemon/wc.c +++ b/daemon/wc.c @@ -28,15 +28,12 @@ #include "actions.h" static int -wc (char *flag, char *path) +wc (const char *flag, const char *path) { char *buf; char *out, *err; int r; - NEED_ROOT (return -1); - ABS_PATH (path, return -1); - /* Make the path relative to /sysroot. */ buf = sysroot_path (path); if (!buf) { @@ -73,19 +70,19 @@ wc (char *flag, char *path) } int -do_wc_l (char *path) +do_wc_l (const char *path) { return wc ("-l", path); } int -do_wc_w (char *path) +do_wc_w (const char *path) { return wc ("-w", path); } int -do_wc_c (char *path) +do_wc_c (const char *path) { return wc ("-c", path); }