chiark / gitweb /
[PATCH] udev_volume_id: volume_id v35
[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 node specified at the commandline.
7 The following commandline switches are supported to specify what udev_volume_id
8 should print to stdout:
9
10        no option prints all values
11   -h   prints help text
12   -l   prints the label of the partition
13   -u   prints the uuid of the partition
14
15 udev_volume_id will only return successful if the string asked for, is not
16 empty. All trailing whitespace will be removed, spaces replaced by underscore
17 and slashes ignored.
18
19 The following rule will create a symlink named with the label string:
20   KERNEL="[hs]d*", PROGRAM="/sbin/udev_volume_id -l %N", SYMLINK="%c"
21
22 If no label is found udev_volume_id exits with nonzero and the rule will be
23 ignored.
24
25 To give it a try, you may call it on the commandline:
26
27   [root@pim udev.kay]# extras/volume_id/udev_volume_id /dev/hda3
28   T:ext3
29   L:Music Store
30   N:Music_Store
31   U:d2da42b5-bbd9-44eb-a72c-cc4542fcb71e
32
33   [root@pim udev.kay]# extras/volume_id/udev_volume_id -l /dev/hda3
34   Music_Store
35
36   [root@pim udev.kay]# extras/volume_id/udev_volume_id -t /dev/hda3
37   swap
38
39
40 Please send any comment/questions/concerns to me or:
41         linux-hotplug-devel@lists.sourceforge.net
42
43 Kay Sievers <kay.sievers@vrfy.org>