Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Mar 1996 01:04:55 -0500 (EST)
From:      "Marc G. Fournier" <scrappy@ki.net>
To:        current@freebsd.org
Subject:   PATCH/DEVFS: /dev/dump & /dev/klog
Message-ID:  <Pine.BSF.3.91.960320005955.255D-100000@ki.net>

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

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?Pine.BSF.3.91.960320005955.255D-100000>