[blkid] Detecting FS without magic number?

2009-10-11
2012-11-28
  • Richard Fearn
    Richard Fearn
    2009-10-11

    Hi,

    I was considering submitting a patch to make blkid recognise ADFS, which doesn't have a magic number - so it can't simply be added to the type_array in lib/blkid/probe.c.

    The approach used by the kernel to check whether a partition is ADFS involves verifying the checksum of the 512-byte boot block, doing sanity checks on the sector size and disc size. The checksum code is very simple; see the .

    Would code like this be acceptable in blkid? I guess it could go after the existing probing code in blkid_verify so it's only tried as a last resort (though of course the code would execute for all partitions that blkid currently can't recognise using the magic numbers).

      : http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=include/linux/adfs_fs.h#l49

    Thanks,

    Rich

     
  • Richard Fearn
    Richard Fearn
    2009-10-11

    I've since realised that blkid is being moved to util-linux-ng! I've modified the code to fit into its blkid instead, and I'll look into submitting a patch for util-linux-ng.