chiark / gitweb /
[PATCH] gentoo fb permission fix.
[elogind.git] / extras / volume_id / README
1
2 udev_volume_id - partition, filesystem, disklabel reader
3
4 This program is normally called from a udev rule, to provide udev with the
5 name, uuid or the filesystem type of a partition to name a device node.
6 udev_volume_id opens the blockdevice specified by the environment variable
7 DEVPATH and searches for a filesystem superblock to read the label. The
8 following commandline switches are supported to specify what udev_volume_id
9 should print to stdout:
10
11        no option prints all values
12   -h   prints help text
13   -l   prints the label of the partition
14   -u   prints the uuid of the partition
15   -d   read disk instead of partition
16
17 If -d is specified udev_volume_id tries to read the label from the main
18 block device where the partition belongs to. For now this is only useful
19 for s390 dasd labels.
20
21 udev_volume_id will only return successful if the string asked for, is not
22 empty. All trailing whitespace will be removed, spaces replaced by underscore
23 and slashes ignored.
24
25 The following rule will create a symlink named with the label string:
26   KERNEL="[hs]d*", PROGRAM="/sbin/udev_volume_id -l", SYMLINK="%c"
27
28 If no label is found udev_volume_id exits with nonzero and the rule will be
29 ignored.
30
31 To give it a try, you may call it on the commandline:
32
33   [root@pim udev.kay]# DEVPATH=/block/hda/hda3 extras/volume_id/udev_volume_id
34   T:ext3
35   L:Music Store
36   N:Music_Store
37   U:d2da42b5-bbd9-44eb-a72c-cc4542fcb71e
38
39   [root@pim udev.kay]# DEVPATH=/block/hda/hda3 extras/volume_id/udev_volume_id -l
40   Music_Store
41
42   [root@pim udev.kay]# DEVPATH=/block/hda/hda1 extras/volume_id/udev_volume_id -t
43   swap
44
45
46 Please send any comment/questions/concerns to me or:
47         linux-hotplug-devel@lists.sourceforge.net
48
49 Kay Sievers <kay.sievers@vrfy.org>