fs detection and volume labels

David Zeuthen david at fubar.dk
Tue Apr 20 10:25:46 PDT 2004


On Tue, 2004-04-20 at 19:03, Joe Shaw wrote:
> On Mon, 2004-04-19 at 02:16 +0200, David Zeuthen wrote:
> > Hi,
> > 
> > Last week I played around with fstab management through callouts for a
> > couple of external storage devices. To that effect, I added some code to
> > detect the filesystem and extract the volume label. Currently this works
> > for FAT filesystems. So now, before the HalDevice representing the block
> > device is added, the following properties may be available
> > 
> >   block.volume_name
> >   block.fstype
> > 
> > which can be used to create a sane mount point name (not that the fstab
> > management example code in CVS currently use it, but...).
> 
> Nice!  The fstype seems to work fine for me with ext3, although some
> volumes (like my swap partition) have fstype set as an empty string.
> 

Oh, yeah, I've forgot to mention that the block.fstype is already set
for mounted block device since we already intercept changes to /etc/mtab
using the dnotify stuff (it's been like this for a long time).

The new thing is that we also do it for unmounted block devices.

> > Here's a question: Is this useful, and should we support it for more
> > filesystems than just FAT? I think it's a pretty nifty feature for both
> > desktop environments and fstab management; In general and it seems
> > pretty HAL-like thing to do (e.g. we already detect the format of
> > optical discs). There's some code in mount_guess_fstype.c from mount(1)
> > to do this, although it's probably not important to support all of these
> > filesystems.
> 
> Yeah, I think it's definitely worthwhile.
> 

Great, I'll add a note to doc/TODO :-). Seriously, we probably don't
need all the fancy stuff that mount(1) does; I think volumes labels for
FAT and optical discs are the most important to support initially as
*nix filesystems labels are rather unimportant for desktop use.

Cheers,
Daivd


_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list