From owner-freebsd-current Sat Feb 3 12:28:54 2001 Delivered-To: freebsd-current@freebsd.org Received: from critter.freebsd.dk (flutter.freebsd.dk [212.242.40.147]) by hub.freebsd.org (Postfix) with ESMTP id 046F037B4EC for ; Sat, 3 Feb 2001 12:28:32 -0800 (PST) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.1/8.11.1) with ESMTP id f13KSWB15141; Sat, 3 Feb 2001 21:28:32 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Warner Losh Cc: Peter Wemm , freebsd-current@FreeBSD.ORG Subject: Re: DEVFS newbie... In-Reply-To: Your message of "Sat, 03 Feb 2001 13:21:26 MST." <200102032021.f13KLQ962051@harmony.village.org> Date: Sat, 03 Feb 2001 21:28:32 +0100 Message-ID: <15139.981232112@critter> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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