FDD-book/examples/part-02/ch08-working-with-device-files/devfs/devd.conf.example
Edson Brandi 6e6dac94fe Add book companion files under examples/
Organize companion code and materials by book part:

  part-01/      Foundations
  part-02/      Kernel & driver fundamentals
  part-03/      Character & block devices
  part-04/      Networking & storage
  part-05/      Buses & advanced topics
  part-06/      Debugging & performance
  part-07/      Real-world drivers
  appendices/   Supplementary material
  README.md     Overview and build instructions
2026-04-25 16:51:00 +00:00

15 lines
602 B
Text

# Example /etc/devd.conf rule for the Chapter 8 myfirst driver.
#
# Copy the notify block to /etc/devd.conf (or a fragment under
# /usr/local/etc/devd/ if your system prefers fragment files) and run
# "service devd restart" to install. See devd.conf(5) for details.
#
# Each time /dev/myfirst/0 appears or disappears, devd will log a
# message via logger(1) tagged "myfirst". Watch /var/log/messages.
notify 100 {
match "system" "DEVFS";
match "subsystem" "CDEV";
match "cdev" "myfirst/0";
action "/usr/bin/logger -t myfirst event=$type";
};