Date: Wed, 20 Mar 1996 00:11:39 -0800 (PST) From: "JULIAN Elischer" <julian@ref.tfs.com> To: scrappy@ki.net (Marc G. Fournier) Cc: current@freebsd.org Subject: Re: PATCH/DEVFS: /dev/dump & /dev/klog Message-ID: <199603200811.AAA15977@ref.tfs.com> In-Reply-To: <Pine.BSF.3.91.960320005955.255D-100000@ki.net> from "Marc G. Fournier" at Mar 20, 96 01:04:55 am
next in thread | previous in thread | raw e-mail | index | archive | help
I have only one comment, which is that
there is a new devfs registration routine that uses a singl argument
for a name rather than the dir/make pair..
check devfsext.h
It is devfs_ddd_devswf() and it has a printf style
format string to define the device name
this is now the preferred registration routine, though
what you have is just fine...
>
>
> Hi...
>
> Still a couple of modifications to make this run completely on devfs,
> but here is a patch that gets ps to work properly (needs /dev/drum) and a fix
> for subr_log.c.
>
> subr_log.c was creating a character device for /dev/log, when it
> should have been creating /dev/klog. /dev/log, according to /dev/log
> as installed, and according to the syslogd man page, is a socket, not a
> device.
>
> The modifications aren't major or anything, but if I'm doing
> something wrong, or omitting something, please let me know. I think I'm
> doing this right...
>
>
> ---[ /usr/src/sys/vm/vm_swap.c ]-----
>
> *** /home/staff/scrappy/vm_swap.c Wed Mar 20 00:58:45 1996
> --- vm_swap.c Wed Mar 20 00:50:39 1996
> ***************
> *** 52,57 ****
> --- 52,61 ----
> #include <vm/swap_pager.h>
>
> #include <miscfs/specfs/specdev.h>
> + #ifdef DEVFS
> + #include <sys/devfsext.h>
> + static void *drum_devfs_token;
> + #endif /*DEVFS*/
>
> static void swstrategy __P((struct buf *));
>
> ***************
> *** 297,302 ****
> --- 301,311 ----
> dev = makedev(BDEV_MAJOR,0);
> bdevsw_add(&dev,&sw_bdevsw,NULL);
> sw_devsw_installed = 1;
> + #ifdef DEVFS
> + drum_devfs_token =
> + devfs_add_devsw("/", "drum", &sw_cdevsw, 0,
> + DV_CHR, 0, 0, 0640 );
> + #endif /*DEVFS*/
> }
> }
>
> ----[ /usr/src/sys/kern/subr_log.c ]-----
>
>
> *** subr_log.c.orig Tue Mar 19 23:38:48 1996
> --- subr_log.c Tue Mar 19 23:39:14 1996
> ***************
> *** 255,261 ****
> log_devsw_installed = 1;
> #ifdef DEVFS
> log_devfs_token = devfs_add_devsw(
> ! "/", "log", &log_cdevsw, 0, DV_CHR, 0, 0, 0600);
> #endif
> }
> }
> --- 255,261 ----
> log_devsw_installed = 1;
> #ifdef DEVFS
> log_devfs_token = devfs_add_devsw(
> ! "/", "klog", &log_cdevsw, 0, DV_CHR, 0, 0, 0600);
> #endif
> }
> }
>
>
> Marc G. Fournier | POP Mail Telnet Acct DNS Hosting
> System | WWW Services Database Services | Knowledge,
> Administrator | | Information and
> scrappy@ki.net | WWW: http://www.ki.net | Communications, Inc
>
>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603200811.AAA15977>
