From owner-freebsd-current Fri Jul 9 13:14: 4 1999 Delivered-To: freebsd-current@freebsd.org Received: from dead-end.net (dead-end.net [216.15.131.2]) by hub.freebsd.org (Postfix) with ESMTP id C934514DC0 for ; Fri, 9 Jul 1999 13:13:50 -0700 (PDT) (envelope-from rock@dead-end.net) Received: from dead-end.net (p3E9C3739.dip.t-dialin.net [62.156.55.57]) by dead-end.net (8.9.3/DEAD-END/1999022000) with ESMTP id WAA01326 for ; Fri, 9 Jul 1999 22:13:47 +0200 (CEST) (envelope-from rock@dead-end.net) Message-ID: <37865812.DC1A235C@dead-end.net> Date: Fri, 09 Jul 1999 22:14:10 +0200 From: "D. Rock" Organization: ... X-Mailer: Mozilla 4.6 [de] (Win98; U) X-Accept-Language: de MIME-Version: 1.0 To: current@freebsd.org Subject: dev_t and system accounting Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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_t ac_io; /* count of IO blocks */ - dev_t ac_tty; /* controlling tty */ + udev_t ac_tty; /* controlling tty */ #define AFORK 0x01 /* forked but not exec'ed */ #define ASU 0x02 /* used super-user permissions */ Daniel To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message