[Bug 639] New: "block device is required" on 2.6.31.1 when trying to mount flash device
bugzilla at busybox.net
bugzilla at busybox.net
Thu Oct 1 11:27:15 UTC 2009
https://bugs.busybox.net/show_bug.cgi?id=639
Target: mipsel-unknown-linux-uclibc (mips32r1)
Summary: "block device is required" on 2.6.31.1 when trying to
mount flash device
Product: Busybox
Version: 1.15.x
Platform: PC
OS/Version: Linux
Status: NEW
Severity: major
Priority: P1
Component: Other
AssignedTo: unassigned at busybox.net
ReportedBy: patrik.kluba at navayo.net
CC: busybox-cvs at busybox.net
Estimated Hours: 0.0
Created an attachment (id=679)
--> (https://bugs.busybox.net/attachment.cgi?id=679)
Use $SUBSYSTEM too, for testing whether a device is a block device
When mdev -s is executed, it correctly creates block device nodes in /dev for
every block device it founds.
But if a nand flash driver is loaded later in the running system (after mdev is
set up as hotplug client), a hotplug event is triggered, which makes 'mdev'
being launched without parameters. In this mode mdev uses $SUBSYSTEM and
$DEVPATH environment variables to determine what new device appeared in the
system.
Older versions of mdev expected $DEVPATH to contain /sys/block/ which caused
this same bug with kernels >= 2.6.25 as the block device entries were moved to
/sys/class/block/.
The current version of mdev checks whether $DEVPATH contains /block/ or not. If
it doesn't, a character device node is created for it, instead of a block
device node.
The problem is that in our system mdev gets called with the following
environment variables:
SUBSYSTEM="block" DEVPATH="/devices/virtual/mtd/mtd3/mtdblock3"
As $DEVPATH does not contain /block/, a character device node is assigned to
it.
The attached patch fixes this problem by checking whether the first 5
characters of $SUBSYSTEM are "block", assuming that it is a block device if
they are.
The patch was created for 1.15.1 with the official patches applied.
--
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list