mirror of
https://github.com/ebrandi/FDD-book.git
synced 2026-12-06 00:23:30 +00:00
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
19 lines
616 B
Bash
Executable file
19 lines
616 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# devd_watch.sh: subscribe to the devd event stream and print events
|
|
# that match the myfirst driver. Used for Chapter 8 Challenge 5 and
|
|
# for debugging driver load/unload behavior.
|
|
#
|
|
# Run in one terminal while you load and unload the driver in another.
|
|
# Requires netcat (base system) to connect to devd's socket.
|
|
|
|
SOCKET=/var/run/devd.seqpacket.pipe
|
|
|
|
if [ ! -S "${SOCKET}" ]; then
|
|
echo "devd socket ${SOCKET} not available" >&2
|
|
echo "ensure devd is running (service devd status)" >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "Listening for myfirst events on ${SOCKET}..." >&2
|
|
nc -U "${SOCKET}" | grep -i 'myfirst'
|