summaryrefslogtreecommitdiffstats
path: root/libblkid/src/superblocks
diff options
context:
space:
mode:
authorKarel Zak2017-06-09 11:11:38 +0200
committerKarel Zak2017-06-09 11:11:38 +0200
commitbff78d701d73dcd77d1631433d0d377917c2bfba (patch)
tree1733886dd56d74fefa2beeef3ab92c27c8f4d1a6 /libblkid/src/superblocks
parentlibmount: (umount) use mount table filter on -c only (diff)
downloadkernel-qcow2-util-linux-bff78d701d73dcd77d1631433d0d377917c2bfba.tar.gz
kernel-qcow2-util-linux-bff78d701d73dcd77d1631433d0d377917c2bfba.tar.xz
kernel-qcow2-util-linux-bff78d701d73dcd77d1631433d0d377917c2bfba.zip
libblkid: (vfat) add more debug messages
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libblkid/src/superblocks')
-rw-r--r--libblkid/src/superblocks/vfat.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libblkid/src/superblocks/vfat.c b/libblkid/src/superblocks/vfat.c
index a8186358b..0cdd2bac7 100644
--- a/libblkid/src/superblocks/vfat.c
+++ b/libblkid/src/superblocks/vfat.c
@@ -197,8 +197,10 @@ static int fat_valid_superblock(blkid_probe pr,
* FAT-like pseudo-header.
*/
if ((memcmp(ms->ms_magic, "JFS ", 8) == 0) ||
- (memcmp(ms->ms_magic, "HPFS ", 8) == 0))
+ (memcmp(ms->ms_magic, "HPFS ", 8) == 0)) {
+ DBG(LOWPROBE, ul_debug("\tJFS/HPFS detected"));
return 0;
+ }
}
/* fat counts(Linux kernel expects at least 1 FAT table) */
@@ -252,11 +254,15 @@ static int fat_valid_superblock(blkid_probe pr,
* etc..) before MBR. Let's make sure that there is no MBR with
* usable partition. */
unsigned char *buf = (unsigned char *) ms;
+
if (mbr_is_valid_magic(buf)) {
struct dos_partition *p0 = mbr_get_partition(buf, 0);
+
if (dos_partition_get_size(p0) != 0 &&
- (p0->boot_ind == 0 || p0->boot_ind == 0x80))
+ (p0->boot_ind == 0 || p0->boot_ind == 0x80)) {
+ DBG(LOWPROBE, ul_debug("\tMBR detected"));
return 0;
+ }
}
}