Saturday, April 14, 2007
Undocumented feature in devfsadm
I was looking at the source code for devfsadm when I ran across something interesting in
devfsadm.c:
I checked out devfsadm.h and found this:
I tried the "-V chatty" option and saw something a little more informative than a simple "failed to attach" message":
(And of course, my first thought is, "Hey, a good starting point for DTrace!" Unfortunately, devfsadm is distributed as a stripped binary:
Guh. Not that it's the end of the world, but guh.
961 vprint(CHATTY_MID, "walking device tree\n");
I checked out devfsadm.h and found this:
98 #define CHATTY_MID "chatty" /* prints with -V chatty */
I tried the "-V chatty" option and saw something a little more informative than a simple "failed to attach" message":
devfsadm[5355]: chatty: process_devinfo_tree: enter devfsadm[5355]: chatty: lock_dev(): entered devfsadm[5355]: chatty: mkdirp(/dev, 0x1ed) devfsadm[5355]: chatty: process_devinfo_tree: attaching driver (rtls) devfsadm[5355]: chatty: attempting pre-cleanup devfsadm[5355]: chatty: devi_tree_walk: root=/, minor=, driver=rtls, error=0, flags=68 devfsadm: driver failed to attach: rtls exit status = 1
(And of course, my first thought is, "Hey, a good starting point for DTrace!" Unfortunately, devfsadm is distributed as a stripped binary:
# ./devfsadm.d -c "devfsadm -i rtls" dtrace: failed to compile script ./devfsadm.d: line 5: probe description pid5937::devi_tree_walk:entry does not match any probes # file `which devfsadm` /usr/sbin/devfsadm: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), stripped #
Guh. Not that it's the end of the world, but guh.