From: Richard W.M. Jones Date: Sat, 3 Dec 2011 22:58:03 +0000 (+0000) Subject: blkid: Use -c /dev/null because RHEL 5 blkid doesn't have -p option. X-Git-Tag: 1.15.10~8 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=6533491b178d18bfab8240cf093be4ef9b547548;p=libguestfs.git blkid: Use -c /dev/null because RHEL 5 blkid doesn't have -p option. --- diff --git a/daemon/blkid.c b/daemon/blkid.c index a7fd6bc..c610a41 100644 --- a/daemon/blkid.c +++ b/daemon/blkid.c @@ -94,8 +94,11 @@ do_blkid(const char *device) char **ret = NULL; int size = 0, alloc = 0; - const char *blkid[] = {"blkid", "-p", "-i", "-o", "export", device, NULL}; - r = commandv(&out, &err, blkid); + r = command (&out, &err, + "blkid", + /* Adding -c option kills all caching, even on RHEL 5. */ + "-c", "/dev/null", + "-p", "-i", "-o", "export", device, NULL); if (r == -1) { reply_with_error("%s", err); goto error;