chiark / gitweb /
[PATCH] experimental CALLOUT script for devfs ide node creation with cd, disc, part
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Tue, 23 Dec 2003 04:34:53 +0000 (20:34 -0800)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:13:09 +0000 (21:13 -0700)
commit4af58c70571c5c63edaff20d2032c8eeb59678b6
tree506d8fa6d52bfbcd258ff67cd7525793a4396c91
parent958479a0dead606c6e44490a30a7040773654281
[PATCH] experimental CALLOUT script for devfs ide node creation with cd, disc, part

Here is a experimental CALLOUT script for udev to create devfs nodes
for IDE-devices. Not that I need these, I just wanted to see if it works :)

The script is really stupid, no error handling, nothing more than
absolutely needed. The rule uses the 'k' format char of the previous
patch. The %D is not used, so the user can have disc or disk :)

this single line:
  CALLOUT, BUS="ide", PROGRAM="/etc/udev/ide-devfs.sh %k %b %n", ID="hd*", NAME="%1c", SYMLINK="%2c"

creates the following on my machine with two hard disks, one DVD and a PCMCIA-compact-flash inserted:
  /udev
  |-- hda
  |-- hda1
  |-- hda2
  |-- hda4
  |-- hdb
  |-- hdb1
  |-- hdc
  |-- hde
  |-- hde1
  `-- ide
      |-- host0
      |   |-- bus0
      |   |   |-- target0
      |   |   |   `-- lun0
      |   |   |       |-- disc -> ../../../../../hda
      |   |   |       |-- part1 -> ../../../../../hda1
      |   |   |       |-- part2 -> ../../../../../hda2
      |   |   |       `-- part4 -> ../../../../../hda4
      |   |   `-- target1
      |   |       `-- lun0
      |   |           |-- disc -> ../../../../../hdb
      |   |           `-- part1 -> ../../../../../hdb1
      |   `-- bus1
      |       `-- target0
      |           `-- lun0
      |               `-- cd -> ../../../../../hdc
      `-- host2
          `-- bus0
              `-- target0
                  `-- lun0
                      |-- disc -> ../../../../../hde
                      `-- part1 -> ../../../../../hde1
extras/ide-devfs.sh [new file with mode: 0644]