Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Strange MAKEDEV problem



On Wed, 21 Mar 2012, Chavdar Ivanov wrote:
root@support6 /devo # rm -r [a-z]*
root@support6 /devo # ./MAKEDEV std
root@support6 /devo # ls -l
total 88
-r-xr-xr-x  1 root  wheel   40279 Mar 21 09:37 MAKEDEV*
-r-xr-xr-x  1 root  wheel    2549 May  1  2008 MAKEDEV.local*
c---------  1 root  wheel   0,  0 Mar 21 09:53 console
c---------  1 root  wheel   0,  1 Mar 21 09:53 constty
[...]
root@support6 /devi # rm [a-z]*
root@support6 /devi # ./MAKEDEV -m /sbin/mknod std
root@support6 /devi # ls -la
total 96
drwxr-xr-x   2 root  wheel     512 Mar 21 09:58 ./
drwxr-xr-x  31 root  wheel    1024 Mar 21 09:57 ../
-r-xr-xr-x   1 root  wheel   40017 Mar 21 09:57 MAKEDEV*
-r-xr-xr-x   1 root  wheel    2549 Mar 21 09:57 MAKEDEV.local*
crw-r--r--   1 root  wheel   0,  0 Mar 21 09:58 console
crw-r--r--   1 root  wheel   0,  1 Mar 21 09:58 constty
[...]
root@support6 /devi # rm [a-z]*
root@support6 /devi # ./MAKEDEV -t /usr/sbin/mtree  std
root@support6 /devi # ls -la
total 96
drwxr-xr-x   2 root  wheel     512 Mar 21 09:59 ./
drwxr-xr-x  31 root  wheel    1024 Mar 21 09:57 ../
-r-xr-xr-x   1 root  wheel   40017 Mar 21 09:57 MAKEDEV*
-r-xr-xr-x   1 root  wheel    2549 Mar 21 09:57 MAKEDEV.local*
c---------   1 root  wheel   0,  0 Mar 21 09:59 console
c---------   1 root  wheel   0,  1 Mar 21 09:59 constty
[...]
root@support6 /devi # ./MAKEDEV -p /bin/pax  std
root@support6 /devi # ls -l
total 88
-r-xr-xr-x  1 root  wheel   40017 Mar 21 09:57 MAKEDEV*
-r-xr-xr-x  1 root  wheel    2549 Mar 21 09:57 MAKEDEV.local*
c---------  1 root  wheel   0,  0 Mar 21 10:01 console
c---------  1 root  wheel   0,  1 Mar 21 10:01 constty

Please also try "./MAKEDEV -s std".  It should print something like
this:

. type=dir optional
./console type=char device=netbsd,0,0 mode=600 gid=0 uid=0
./constty type=char device=netbsd,0,1 mode=600 gid=0 uid=0
[...]

I suspect that there's something wrong with chmod(3), or some string parsing associated with modes in mknod(8) or mtree(8).

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index