linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: [udev] man page with included placeholder list
Date: Wed, 19 Nov 2003 03:27:32 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-106921250703845@msgid-missing> (raw)

[-- Attachment #1: Type: text/plain, Size: 116 bytes --]

06-udev.8-placeholder.diff
  mention the printf-like support for string substitution in the NAME field

thanks,
Kay

[-- Attachment #2: 06-udev.8-placeholder.diff --]
[-- Type: text/plain, Size: 904 bytes --]

--- ../udev/udev.8	2003-11-18 02:19:33.000000000 +0100
+++ udev.8	2003-11-19 04:19:03.000000000 +0100
@@ -72,6 +72,23 @@
 .br
 keys: \fBBUS\fP, \fBPROGRAM\fP, \fBID\fP
 .P
+The name field supports simple printf-like string subtitution:
+.RS
+.TP
+.B %n
+the "kernel number" of the device
+for example, 'sda3' has a "kernel number" of '3'
+.TP
+.B %M
+the kernel major number for the device
+.TP
+.B %m
+the kernel minor number for the device
+.TP
+.B %b
+the bus id for the device
+.RE
+.P
 A sample \fIudev.conf\fP might look like this:
 .sp
 .nf
@@ -89,6 +106,9 @@
 
 # if /sbin/scsi_id returns "OEM 0815" device will be called disk1
 CALLOUT, PROGRAM="/sbin/scsi_id" BUS="scsi", ID="OEM 0815" NAME="disk1"
+
+# USB webcams to be called webcam0, webcam1, ...
+LABEL, BUS="usb", model="WebCam Version 3", NAME="webcam%n"
 .fi
 .P
 Permissions and ownership for the created device files may specified at

             reply	other threads:[~2003-11-19  3:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-19  3:27 Kay Sievers [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-11-19  6:41 [udev] man page with included placeholder list Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-hotplug-106921250703845@msgid-missing \
    --to=kay.sievers@vrfy.org \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).