On Wednesday 05 March 2008, Michele Sanges wrote:
> I have a problem with 'mdev' used for dynamic device update:
>
> - system based on kernel 2.6.23, busybox 1.9.1 and with mdev installed
> as hotplug program (echo /sbin/mdev > /proc/sys/kernel/hotplug)
> - system boots from a usb stick (/dev/sda1); it has also a disk on chip
> disk seen as /dev/sdb.
>
> The disk on chip has initially one only primary partion; after booting I
> see the device /dev/sdb1 so the command 'mdev -s' works fine.
>
> With fdisk I remove this partion and then I create two primary partion
> --> I see only the device /dev/sdb2.
>
> So I created 'my_hotplug_program.sh' script:
>
>     #!/bin/sh
>     /usr/bin/env >> /root/hotplug_env.txt
>
> and installed it as hotplug program:
>
>     # echo /root/my_hotplug_program.sh > /proc/sys/kernel/hotplug
>
> With the above sequence of operation, the hotplug_env.txt file contains:
>
> ACTION=add
> HOME=/
> SEQNUM=390
> MAJOR=8
> DEVPATH=/block/sdb/sdb1
> SUBSYSTEM=block
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
> PHYSDEVPATH=/devices/pci0000:00/0000:00:07.1/host2/target2:0:0/2:0:0:0
> MINOR=17
> PHYSDEVDRIVER=sd
> PWD=/
> PHYSDEVBUS=scsi
> ACTION=remove
> HOME=/
> SEQNUM=389
> MAJOR=8
> DEVPATH=/block/sdb/sdb1
> SUBSYSTEM=block
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
> PHYSDEVPATH=/devices/pci0000:00/0000:00:07.1/host2/target2:0:0/2:0:0:0
> MINOR=17
> PHYSDEVDRIVER=sd
> PWD=/
> PHYSDEVBUS=scsi
> ACTION=add
> HOME=/
> SEQNUM=391
> MAJOR=8
> DEVPATH=/block/sdb/sdb2
> SUBSYSTEM=block
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
> PHYSDEVPATH=/devices/pci0000:00/0000:00:07.1/host2/target2:0:0/2:0:0:0
> MINOR=18
> PHYSDEVDRIVER=sd
> PWD=/
> PHYSDEVBUS=scsi
>
> It seems that events don't arrive in order; does 'mdev' take into
> account the variable SEQNUM?

no, and there are no plans to do so.  that'd require state maintaining or a 
constantly running daemon or other fun stuff.  use udev if you want that.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox
  • mdev problem Michele Sanges
    • Re: mdev problem Mike Frysinger

Reply via email to