Subject: Re: switching major & minor device values?
To: James Hartley <jjhartley@gmail.com>
From: Chavdar Ivanov <ci4ic4@gmail.com>
List: netbsd-users
Date: 08/09/2007 22:45:33
On 09/08/07, James Hartley <jjhartley@gmail.com> wrote:
> 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)?

I don't quite get it -

#  mknod /dev/bpf c 18 0

should do that ( it's 23 on my system actually; I don't use bpf, so I
haven't noticed any anomalies ).

Which NetBSD version are you running?

>
> Thanks.
>

Chavdar