X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Fmount.c;h=49a0eab0a04f969a3816fc029d736de871933558;hb=25081d62684eea9e704ecc0a0a15d2421b203356;hp=463e789f1c7ac011f69fea26144a82300fd99cdc;hpb=4556fd64a8e236ec041cc00ed9687ef9bd455812;p=libguestfs.git diff --git a/daemon/mount.c b/daemon/mount.c index 463e789..49a0eab 100644 --- a/daemon/mount.c +++ b/daemon/mount.c @@ -50,7 +50,7 @@ do_mount_vfs (const char *options, const char *vfstype, ABS_PATH (mountpoint, return -1); - is_root = strcmp (mountpoint, "/") == 0; + is_root = STREQ (mountpoint, "/"); if (!root_mounted && !is_root) { reply_with_error ("mount: you must mount something on / first"); @@ -112,7 +112,7 @@ do_umount (const char *pathordevice) char *buf; int is_dev; - is_dev = strncmp (pathordevice, "/dev/", 5) == 0; + is_dev = STREQLEN (pathordevice, "/dev/", 5); buf = is_dev ? strdup (pathordevice) : sysroot_path (pathordevice); if (buf == NULL) {