kernel - Auto-initiate message stream for udev on read()
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 25 Oct 2012 02:12:50 +0000 (19:12 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 25 Oct 2012 02:12:50 +0000 (19:12 -0700)
commitcd6f4f79801c968685a3e0069637790bc2fa4994
tree4b9f886eadeb348c6efa4c7b1aa8fb17f852478b
parent9b881e96ac5932621a87070dfdb0740557bd1fce
kernel - Auto-initiate message stream for udev on read()

* Ensure the device is initiated when read() is issued for /dev/udev,
  otherwise no events will be queued.

  This allows a simple cat /dev/udev to return the XML stream without
  having to issue any ioctls.

* Reorder the devfs scan and initiation to close a race where an event could
  be lost.
sys/kern/kern_udev.c