mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
blkid: Use -c /dev/null because RHEL 5 blkid doesn't have -p option.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user