Bug 476672 - Major number not known
Summary: Major number not known
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: udev
Version: 5.1
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Harald Hoyer
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-16 15:23 UTC by David Highley
Modified: 2009-10-13 13:22 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-10-13 13:22:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description David Highley 2008-12-16 15:23:01 UTC
Description of problem:
At execution of rule file kernel major number is not known.

Version-Release number of selected component (if applicable):
udev-095-14.9.el5


How reproducible:
Every time.


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
First time we have tried writing a udev rules file for unique hardware. Here is our rules file.
#PROGRAM=="/bin/sh -c "cat /proc/devices | grep -w uceipci | cut -d' ' -f1", MAJOR="%c"
ACTION=="add", SUBSYSTEM=="pci", SYSFS{vendor}=="0x13c6", SYSFS{device}=="0x1553", RUN+="/bin/mknod --mode=666 /dev/uceipci_0 c 253 0" 
ACTION=="add", SUBSYSTEM=="pci", SYSFS{vendor}=="0x13c6", SYSFS{device}=="0x1553", RUN+="/bin/mknod --mode=666 /dev/uceipci_1 c 253 1" 
ACTION=="add", SUBSYSTEM=="pci", SYSFS{vendor}=="0x13c6", SYSFS{device}=="0x1553", RUN+="/bin/mknod --mode=666 /dev/uceipci_2 c 253 2" 
ACTION=="add", SUBSYSTEM=="pci", SYSFS{vendor}=="0x13c6", SYSFS{device}=="0x1553", RUN+="/bin/mknod --mode=666 /dev/uceipci_3 c 253 3" 
ACTION=="add", SUBSYSTEM=="pci", SYSFS{vendor}=="0x13c6", SYSFS{device}=="0x1553", RUN+="/bin/mknod --mode=666 /dev/uceipci_4 c 253 4" 
ACTION=="add", SUBSYSTEM=="pci", SYSFS{vendor}=="0x13c6", SYSFS{device}=="0x1553", RUN+="/bin/mknod --mode=666 /dev/uceipci_5 c 253 5" 
ACTION=="add", SUBSYSTEM=="pci", SYSFS{vendor}=="0x13c6", SYSFS{device}=="0x1553", RUN+="/bin/mknod --mode=666 /dev/uceipci_6 c 253 6" 
ACTION=="add", SUBSYSTEM=="pci", SYSFS{vendor}=="0x13c6", SYSFS{device}=="0x1553", RUN+="/bin/mknod --mode=666 /dev/uceipci_7 c 253 7"

Tried using the first line to define the major number but it did not work. Driver loads but device entries were not being created.

Comment 2 Harald Hoyer 2009-10-13 13:22:18 UTC
This is the totally wrong approach. Fix the kernel module to use the proper sysfs API like all the other modules do.


Note You need to log in before you can comment on or make changes to this bug.