chiark / gitweb /
volume_id: always check for all filesystem types and skip conflicting results
authorKay Sievers <kay.sievers@vrfy.org>
Thu, 13 Nov 2008 18:34:41 +0000 (19:34 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Thu, 13 Nov 2008 18:34:41 +0000 (19:34 +0100)
commit779d2d851ee5dbd4c759bb973113373897d3adce
tree5ff2a5cbb930a4715b58376bbb033f18a8ddeedd
parent90dca5ff9d927273c47cfbe365cc925add1a67e8
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.
extras/volume_id/lib/fat.c
extras/volume_id/lib/libvolume_id-private.h
extras/volume_id/lib/linux_swap.c
extras/volume_id/lib/volume_id.c