From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Sun, 29 Feb 2004 13:33:35 +0000 Subject: [PATCH] udev - man page update Message-Id: <20040229133335.GA3031@vrfy.org> MIME-Version: 1 Content-Type: multipart/mixed; boundary="wRRV7LY7NUeQGEoC" List-Id: References: <20040225002552.GA24875@vrfy.org> In-Reply-To: <20040225002552.GA24875@vrfy.org> To: linux-hotplug@vger.kernel.org --wRRV7LY7NUeQGEoC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Here is a small change to the udev man page: - clarify the use of the NAME{all_partitions} syntax and add a example to udev.rules.example - mention the empty NAME field to ignore the device - prepare a SYMLINK field for the addition of Andrey's "multiple symlinks" documentation :) thanks, Kay --wRRV7LY7NUeQGEoC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="05-man-clarification.patch" ===== udev.8 1.44 vs edited ===== --- 1.44/udev.8 Sat Feb 28 04:59:04 2004 +++ edited/udev.8 Sun Feb 29 14:08:36 2004 @@ -151,16 +151,15 @@ Every line in the rules file defines the mapping between device attributes and the device file name. One ore more keys are specified to match a rule with the current device. If all keys are matching, the rule will be applied -and the name is used for the device node. One or more optional symlinks -targeting the node may be specified. +and the name is used for the device node. .br If no matching rule is found, the default kernel device name is used. .P -The line format is: +Every rule consists of a list a comma separated fields: .sp -.I key,[key,...] name [, symlink] +.IR "key " ,[ "key " ,...] " name " [, " symlink" ] .sp -where keys are: +where possible fields are: .TP .B BUS Match the bus type of the device. @@ -196,13 +195,19 @@ call. This key may used in any following rule after a .B PROGRAM call. -.P -The +.TP .B NAME -field given with the attribute +The name of the node to be created. If the name field is omitted or its +value is empty, the device will be ignored and no node will be created. +.br +If given with the attribute .BR NAME{ all_partitions } -will create all 15 partitions of a blockdevice. +it will create all 15 partitions of a blockdevice. This may be useful for removable media devices. +.TP +.B SYMLINK +The name of a symlink targeting the node. Multiple symlinks may be +specified by separating the names by the space character. .P .RB "The " NAME " ," SYMLINK " and " PROGRAM fields support simple printf-like string substitution: ===== etc/udev/udev.rules.examples 1.2 vs edited ===== --- 1.2/etc/udev/udev.rules.examples Thu Feb 19 18:54:48 2004 +++ edited/etc/udev/udev.rules.examples Sun Feb 29 14:29:23 2004 @@ -51,6 +51,10 @@ # DRI devices always go into a subdirectory (as per the LSB spec) KERNEL="card*", NAME="dri/card%n" +# create all 15 partitions of a USB flash card reader +# note the trailing spaces in the attribute, use udevinfo(8) to examine your device +BUS="scsi", SYSFS{model}="CF/MD ", NAME{all_partitions}="compactflash" + # alsa devices KERNEL="controlC[0-9]*", NAME="snd/%k" KERNEL="hw[CD0-9]*", NAME="snd/%k" --wRRV7LY7NUeQGEoC-- ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel