Is there requirement of initializing mdev.seq ?

Po-Chieh Hsu quanta.pchsu at gmail.com
Thu Jul 13 04:00:57 UTC 2017


Is there requirement of initializing mdev.seq, before "echo /sbin/mdev >
/proc/sys/kernel/hotplug" ?

If the mdev.seq is empty, mdev use the first event coming from kernel to
initialize mdev.seq in the function wait_for_seqfile.

What if the first event is the mis-order event ?

The mis-order event will save its seq to mdev.seq, and the subsequent event
that seq number is smaller than the first event will wait and then timeout.

However, if we initialize mdev.seq before use it as following, the strange
things can be avoided.

var=$(cat /sys/kernel/uevent_seqnum);var=$((var+1));echo -n $var >
/dev/mdev.seq
echo /sbin/mdev > /proc/sys/kernel/hotplug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20170713/4a325bc7/attachment.html>


More information about the busybox mailing list