X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=daemon%2Fwc.c;h=b64940b7853f8607db18748d412db22441943ab6;hp=4878b57e16d9441011bc7906eaea3b3c63be9190;hb=088d0c53cfe0dcb20b87707a9055175b2fd6b72f;hpb=78029b529ad98769685d607230b70f71832d5906 diff --git a/daemon/wc.c b/daemon/wc.c index 4878b57..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 (-1); - ABS_PATH (path, -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); }