X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Fwc.c;h=b64940b7853f8607db18748d412db22441943ab6;hb=4d8efdd4552874092263bf567701c3459b05a780;hp=4878b57e16d9441011bc7906eaea3b3c63be9190;hpb=78029b529ad98769685d607230b70f71832d5906;p=libguestfs.git 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); }