[BusyBox 0000793]: mdev -s fails with "Illegal argument"

bugs at busybox.net bugs at busybox.net
Tue Mar 21 23:36:53 UTC 2006


The following issue has been SUBMITTED. 
====================================================================== 
http://busybox.net/bugs/view.php?id=793 
====================================================================== 
Reported By:                wmb
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   793
Category:                   Other
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             03-21-2006 15:36 PST
Last Modified:              03-21-2006 15:36 PST
====================================================================== 
Summary:                    mdev -s  fails with "Illegal argument"
Description: 
The context:  Using busybox inside initramfs on a 2.6.15 kernel. 
ENABLE_FEATURE_MDEV_CONF is off.

The symptom:  mdev -s  reports "mknod /dev/hdc failed: Invalid argument"

Root cause: /sys/block/hdc/dev contains "22:0\n" ..The newline character
confuses the code that converts the minor device number, causing the value
of "minor" to be (decimal) -38 (which is '\n' - '0').

The fix:

In mdev.c, replace:

   for (s = temp; *s; s++) {
with:
   for (s = temp; *s && *s != '\n'; s++) {

====================================================================== 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
03-21-06 15:36  wmb            New Issue                                    
03-21-06 15:36  wmb            Status                   new => assigned     
03-21-06 15:36  wmb            Assigned To               => BusyBox         
======================================================================




More information about the busybox-cvs mailing list