X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=daemon%2Ffile.c;h=da899b6c59dd56e214046bba75991027a4596e2f;hp=a55c606615f984d36b6a247ac4be13111fbe6505;hb=ba39ced8804765705f4c61a92db0fddb8d672c7d;hpb=1253f577fa162b9170b22f3c543167aa99795920 diff --git a/daemon/file.c b/daemon/file.c index a55c606..da899b6 100644 --- a/daemon/file.c +++ b/daemon/file.c @@ -581,8 +581,13 @@ do_file (const char *path) } } + /* Which flags to use? For /dev paths, follow links because + * /dev/VG/LV is a symbolic link. + */ + const char *flags = is_dev ? "-zbsL" : "-zb"; + char *out, *err; - int r = command (&out, &err, "file", "-zbs", path, NULL); + int r = command (&out, &err, "file", flags, path, NULL); free (buf); if (r == -1) {