aboutsummaryrefslogtreecommitdiffstats
mdevd: the mdevd-coldplug program

mdevd
Software
skarnet.org

The mdevd-coldplug program

mdevd-coldplug performs a coldplug: it scans /sys for all registered devices a uevent manager would want to perform actions on, and tells the kernel to generate uevents for all these devices.

Interface

     mdevd-coldplug [ -v verbosity ] [ -s slashsys ] [ -O nlgroup ] [ -b kbufsz ]
  • mdevd-coldplug scans /sys for devices.
  • For every suitable device it finds, it tells the kernel to generate an event. If a device manager such as as mdevd is listening to the netlink at this point, it will pick up the series of events.
  • mdevd-coldplug exits when it has finished scanning.

Options

  • -v verbosity : be more or less verbose. Default verbosity is 1. 0 will only print fatal error messages, 3 or more is seriously verbose debugging.
  • -s slashsys : assume the sysfs pseudo-filesystem is mounted on slashsys. Default is /sys.
  • -O nlgroup : synchronous coldplug. mdevd-coldplug will not exit until the last uevent it triggers has been handled by mdevd. nlgroup needs to be a netlink group that mdevd is rebroadcasting handled events to. Note that this option can only work if mdevd is running with a similar -O option with a compatible value; else, mdevd-coldplug will wait forever.
  • -b kbufsz : try and reserve a kernel buffer of kbufsz bytes for the netlink queue. The default is 1 MiB; if you're getting related warnings on stderr, try increasing this number. This option is only meaningful when paired with the -O option.

Exit codes

  • 0: success
  • 111: system call failed

Notes

  • mdevd-coldplug is a short-lived program, just like mdev -s or udevadm trigger.