Re: [PATCH] libblkid: Add initial support for BeFS detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 14, 2010 at 07:08:52PM +0100, Jeroen Oortwijn wrote:
> 2010/1/14 Jeroen Oortwijn <oortwijn@xxxxxxxxx>:
> > Add initial support for detection of the Be File System

 Thanks!

> > <http://en.wikipedia.org/wiki/Be_File_System> to libblkid.
> [...]
> > +       .magics         = {
> > +               { .magic = "1SFB", .len = 4, .sboff = 0x220 },
> > +               { NULL }
> > +       }
> 
> The superblock of the Be File System contains three magic numbers and
> I initially added all three of them to .magics. However, when testing
> the code I realised that libblkid checks if the superblock contains at
> least one of these three instead of (what I thought it would do)

 Yes. The magic string is the first (basic) level of the probing.

> checking if the superblock contains all of them. So to reduce the
> change of misdetection, I removed the last two magic numbers. Is there
> a way to make libblkid check if the superblock contains all three
> magic numbers?

 For a more careful analysis you have to create a probing function and
 check the others things there. See for example squashfs.c or any
 other file in the shlibs/blkid/src/superblocks/ directory.
 
 It would be nice to read filesystem UUID and LABEL in the probing function.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux