[BusyBox 0004714]: mdev can't tell the difference between /dev/lp0 and /dev/usblp0
bugs at busybox.net
bugs at busybox.net
Mon Sep 8 18:05:27 UTC 2008
The following issue has been CLOSED
======================================================================
http://busybox.net/bugs/view.php?id=4714
======================================================================
Reported By: lucas
Assigned To: BusyBox
======================================================================
Project: BusyBox
Issue ID: 4714
Category: Other
Reproducibility: always
Severity: major
Priority: normal
Status: closed
Resolution: open
Fixed in Version:
======================================================================
Date Submitted: 08-23-2008 14:46 PDT
Last Modified: 09-08-2008 11:05 PDT
======================================================================
Summary: mdev can't tell the difference between /dev/lp0 and
/dev/usblp0
Description:
As mdev uses the basename of the device path to know the device name,
situations like "/sys/class/usb/lp0" and "/sys/class/printer/lp0" get in
conflict (the last hotplug event overwrites the previous device file).
======================================================================
----------------------------------------------------------------------
lucas - 09-04-08 08:21
----------------------------------------------------------------------
RFC: Uploaded a patch to implement the behaviour described earlier, but
doesn't handle the "exec" case (need some directions on the best way
here).
----------------------------------------------------------------------
vda - 09-06-08 12:25
----------------------------------------------------------------------
Trying to understand what patch is doing. I understand why did you need to
do sscanf earlier, but starting from this part:
- if (ENABLE_FEATURE_MDEV_RENAME)
+ if (ENABLE_FEATURE_MDEV_RENAME && !alias)
there seems to be another, unrelated change mixed in. Please explain.
----------------------------------------------------------------------
lucas - 09-08-08 08:00
----------------------------------------------------------------------
In the old way, the original device file name is removed at this point, but
if (as it normally is) "/dev/lp0" was already added, then it would remove
the wrong file (we want "/dev/usb/lp0").
I am trying to maintain the old behavior if no rename/alias is being
made.
There is a big disadvantage to this patch: it can't be used to make
something like "/dev/usblp0", but this ("/dev/usb/lp0") works for me and
I'm trying to make the patch as non-intrusive as possible.
It would be nice if the full path to the sysfs file could be passed to the
exec script (maybe by some env var), so we could have a script that could
do this for us, but we would need to solve the "delete old dev file first"
problem (and that constitutes an incompatible change).
----------------------------------------------------------------------
vda - 09-08-08 11:05
----------------------------------------------------------------------
Applied to svn, thanks!
Issue History
Date Modified Username Field Change
======================================================================
08-23-08 14:46 lucas New Issue
08-23-08 14:46 lucas Status new => assigned
08-23-08 14:46 lucas Assigned To => BusyBox
08-23-08 14:52 lucas Issue Monitored: lucas
09-04-08 08:20 lucas File Added:
bb-mdev-implement_matching_by_dev_pair.diff
09-04-08 08:21 lucas Note Added: 0010994
09-06-08 12:25 vda Note Added: 0011144
09-08-08 08:00 lucas Note Added: 0011154
09-08-08 11:05 vda Status assigned => closed
09-08-08 11:05 vda Note Added: 0011164
======================================================================
More information about the busybox-cvs
mailing list