[klibc] Add swap support to fstype, second version

Kay Sievers kay.sievers at vrfy.org
Tue Feb 7 08:54:30 PST 2006


On Tue, Feb 07, 2006 at 08:40:46AM -0800, H. Peter Anvin wrote:
> Kay Sievers wrote:
> >>
> >>Looked at this from a technical perspective; one thing kinit needs is to 
> >>be able to query the size of the filesystem from the data, as opposed 
> >>from the block size.
> >
> >The size is just a value that is passed to the lib. The lib itself wants
> >the volume size in bytes.
> >
> 
> No, the point is that for kinit, size needs to be an *output*.

Ah ok, you mean the udev tool: "vol_id". We could add that easily to
that tool. It currently looks like this:

  $ /sbin/vol_id --export /dev/sda10
  ID_FS_USAGE=filesystem
  ID_FS_TYPE=ext3
  ID_FS_VERSION=1.0
  ID_FS_UUID=c91a0acb-effc-4358-8b3e-f3cd145e1ead
  ID_FS_LABEL=work

Or just make use of the lib in your current tool.

> >>Something that also would be nice for using this 
> >>code in kinit would be to break the filesystem and RAID probes out 
> >>separately.
> >
> >The thing is that you usually don't want to return a fstype, if the
> >volume is a raid member. Therefore a probe for a filesystem before
> >looking for a raid can do pretty bad things. But sure, we can change
> >anything that's reasonable.
> >
> 
> Right, so call probe_for_raid(); before you call probe_for_fs();, if 
> that's the behaviour you want.  The point was to separate them out, so 
> that you can link only the fs probe if that's what you want.	

Fine, I can do this. Currently I have all individual probing functions
exported to be able to call them individually. What do you think? Is the
table driven model nicer to use?

Thanks,
Kay



More information about the klibc mailing list