chiark / gitweb /
[PATCH] udev callout for reading filesystem labels
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Sat, 1 May 2004 06:26:33 +0000 (23:26 -0700)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:35:17 +0000 (21:35 -0700)
commit3611d5820c0fc0863d15c04884b05c9e04492f45
tree594698488dc499c4ba88afa07087d7c03efa93de
parente13fa59953d64e478025fd1200bb5fd0baf671b2
[PATCH] udev callout for reading filesystem labels

here is a small udev toy, which enables udev to name partitions by
its filesystem label or uuid's.

The following udev rule:

  KERNEL="sd*", PROGRAM="/sbin/udev_volume_id -M%M -m%m -u", SYMLINK="%c"

creates a symlink with the uuid read from the filesystem. If no label or
uuid is found the program exits with nonzero and the rule will fail.

ext2, ext3, reiserfs, xfs, jfs, vfat, msdos volume labels are supported,
ntfs and swap partitions can be recognized.

It's possible to compile with klibc and the static binary takes 13kb.
extras/volume_id/Makefile [new file with mode: 0644]
extras/volume_id/udev_volume_id.c [new file with mode: 0644]
extras/volume_id/volume_id.c [new file with mode: 0644]
extras/volume_id/volume_id.h [new file with mode: 0644]