Date: Sat, 03 Feb 2001 21:28:32 +0100 From: Poul-Henning Kamp <phk@critter.freebsd.dk> To: Warner Losh <imp@harmony.village.org> Cc: Peter Wemm <peter@netplex.com.au>, freebsd-current@FreeBSD.ORG Subject: Re: DEVFS newbie... Message-ID: <15139.981232112@critter> In-Reply-To: Your message of "Sat, 03 Feb 2001 13:21:26 MST." <200102032021.f13KLQ962051@harmony.village.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <200102032021.f13KLQ962051@harmony.village.org>, Warner Losh writes: >In message <14918.981230622@critter> Poul-Henning Kamp writes: >: Doing straight symlinks would not work. > >OK. > >The other idea that I had was a cpdev. It would be like a templated >mknod. It would stat the first argument and do a mknod with the >st_rdev from the stat, eg: It's really very simple, if I get my way, this will be possible: # rm /dev/null # echo 'OOPS!' # rm -W /dev/null # ls -l /dev/null crw-rw-rw- 1 root wheel 2, 2 3 Feb 21:25 /dev/null # mount -t devfs devfs /home/jail/dev # cd /home/jail/dev # rm -f * # rm -W null zero tty console # ls -l crw------- 1 phk wheel 0, 0 2 Feb 01:09 console drwxr-xr-x 2 root wheel 0 2 Feb 01:06 fd crw-rw-rw- 1 root wheel 2, 2 3 Feb 21:25 null crw-rw-rw- 1 root wheel 1, 0 3 Feb 17:27 tty crw-rw-rw- 1 root wheel 2, 12 1 Jan 1970 zero # >P.S. I do hope someone will tell me if this is becoming too >bikeshedish. It is :-) -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15139.981232112>