summaryrefslogtreecommitdiff
path: root/extras/volume_id/lib/fat.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-11-13 19:34:41 +0100
committerKay Sievers <kay.sievers@vrfy.org>2008-11-13 19:34:41 +0100
commit779d2d851ee5dbd4c759bb973113373897d3adce (patch)
tree5ff2a5cbb930a4715b58376bbb033f18a8ddeedd /extras/volume_id/lib/fat.c
parent90dca5ff9d927273c47cfbe365cc925add1a67e8 (diff)
volume_id: always check for all filesystem types and skip conflicting results
We probe for all known filesystems to find conflicting signatures. If we find multiple matching signatures and one of the detected filesystem types claims that it can not co-exist with any other filesystem type, we do not return a probing result. We can not afford to mount a volume with the wrong filesystem code and possibly corrupt it. Linux ssytems have the problem of dozens of possible filesystem types, and volumes with left-over signatures from former filesystem types. Invalid signature need to be removed from the volume to make the filesystem detection successful. We do not want to read that many bytes from probed floppies, skip volumes smaller than a usual floppy disk.
Diffstat (limited to 'extras/volume_id/lib/fat.c')
-rw-r--r--extras/volume_id/lib/fat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/extras/volume_id/lib/fat.c b/extras/volume_id/lib/fat.c
index e30318cf09..2d98b65b50 100644
--- a/extras/volume_id/lib/fat.c
+++ b/extras/volume_id/lib/fat.c
@@ -497,6 +497,7 @@ fat32:
found:
volume_id_set_usage(id, VOLUME_ID_FILESYSTEM);
id->type = "vfat";
-
+ /* we think this is fat, but we make sure no other signatures are found */
+ id->force_unique_result = 1;
return 0;
}