Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Nov 1998 12:17:18 -0500 (EST)
From:      zhihuizhang <bf20761@binghamton.edu>
To:        Julian Elischer <julian@whistle.com>
Cc:        hackers <freebsd-hackers@FreeBSD.ORG>
Subject:   More questions on DEVFS
Message-ID:  <Pine.SOL.L3.93.981112115703.7465B-100000@bingsun1>

next in thread | raw e-mail | index | archive | help

I have a couple of questions on DEVFS which is hard to figure out from the
source code: 

(1) As I understand it, special files can be created only by superuser via
mknod and file systems can only be mounted by superuser. I do not see any
reason why the superuser will mount the device file system multiple times
and possibly at different mount points. 

(2) Both the block and character switch table have a major number at its
end (d_maj) which is often set to be -1 (see mem_cdevsw[] in file
i386/mem.c for an example). This makes devfs_add_devswf() return without
adding a device entry. Is this the way that is used to circuit the DEVFS
code on purpose?

Thanks for your help.

-------------------------------------------------- 
| Zhihui Zhang, http://cs.binghamton.edu/~zzhang |
| Dept. of Computer Science,  SUNY at Binghamton |
--------------------------------------------------


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.L3.93.981112115703.7465B-100000>