Subject: switching major & minor device values?
To: None <netbsd-users@netbsd.org>
From: James Hartley <jjhartley@gmail.com>
List: netbsd-users
Date: 08/09/2007 14:30:14
So far, I have yet to devine mknod(8) to do my  bidding...

What I need to do is change major & minor values on a device.  What is
shown first below is device values on a freshly installed system.  If
I manually re-run MAKEDEV after the first boot, the major & minor
values switch, & life is wonderful.

# cd /dev
# ls -l b*
crw-------  1 root  wheel  0, 18 Aug  9 02:49 bpf
lrwxr-xr-x  1 root  wheel      3 Aug  9 02:49 bpf0 -> bpf
# rm bpf*
# ./MAKEDEV bpf
# ls -l b*
crw-------  1 root  wheel  18, 0 Aug  9 02:51 bpf
lrwx------  1 root  wheel      3 Aug  9 02:51 bpf0 -> bpf
# shutdown -r now

Within the set-up script, I issue "MAKEDEV bpf".  While I'm tracking
down why MAKEDEV is initially setting these values backwards, is there
a way I can reverse these values through mknod(8)?

Thanks.