libblkid: (vfat) add more debug messages
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
11573ac0c8
commit
bff78d701d
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue