dev_t and system accounting

1999-07-09 Thread D. Rock

Hi,

the new dev_t stuff in the kernel keeps system accounting showing up
the tty properly. After taking a look at the fix for the swap device,
I propose the following equivalent fix:

Index: kern/kern_acct.c
===
RCS file: /data/cvs/src/sys/kern/kern_acct.c,v
retrieving revision 1.20
diff -u -r1.20 kern_acct.c
--- kern_acct.c 1999/04/27 11:15:53 1.20
+++ kern_acct.c 1999/07/09 19:57:38
@@ -221,7 +221,7 @@
 
/* (7) The terminal from which the process was started */
if ((p-p_flag  P_CONTROLT)  p-p_pgrp-pg_session-s_ttyp)
-   acct.ac_tty = p-p_pgrp-pg_session-s_ttyp-t_dev;
+   acct.ac_tty = dev2udev(p-p_pgrp-pg_session-s_ttyp-t_dev);
else
-   acct.ac_tty = NODEV;
+   acct.ac_tty = dev2udev(NODEV);

Index: sys/acct.h
===
RCS file: /data/cvs/src/sys/sys/acct.h,v
retrieving revision 1.9
diff -u -r1.9 acct.h
--- acct.h  1998/02/01 20:08:35 1.9
+++ acct.h  1999/07/09 19:57:15
@@ -60,7 +60,7 @@
gid_t ac_gid;   /* group id */
u_int16_t ac_mem;   /* average memory usage */
comp_tac_io;/* count of IO blocks */
-   dev_t ac_tty;   /* controlling tty */
+   udev_tac_tty;   /* controlling tty */
 
 #defineAFORK   0x01/* forked but not exec'ed */
 #defineASU 0x02/* used super-user permissions */


Daniel


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: dev_t and system accounting

1999-07-09 Thread D. Rock

 Hi,
 
 the new dev_t stuff in the kernel keeps system accounting showing up
 the tty properly. After taking a look at the fix for the swap device,
 I propose the following equivalent fix:

 Looks good, could you try this version for me ?
[patch deleted]

I recompiled a "make world" and also rebuild the kernel with this
patch. No problems. lastcomm now again works as expected.

I already ran with the modified kernel from my patch. But I didn't
rebuilt world, so I didn't notice the userland problems for dev_t/udev_t

Daniel


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message