diff options
-rw-r--r-- | daemon/file.c | 7 | ||||
-rwxr-xr-x | src/generator.ml | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/daemon/file.c b/daemon/file.c index a55c6066..da899b6c 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) { diff --git a/src/generator.ml b/src/generator.ml index 37d63f2c..0ffd3c70 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -1645,7 +1645,7 @@ the type or contents of the file. This call will also transparently look inside various types of compressed file. -The exact command which runs is C<file -zbs path>. Note in +The exact command which runs is C<file -zb path>. Note in particular that the filename is not prepended to the output (the C<-b> option). |