blkflush is no longer used;
[unix-history] / usr / src / sys / kern / kern_acct.c
index 6145e7a..1252d87 100644 (file)
@@ -1,24 +1,15 @@
 /*
  * Copyright (c) 1982, 1986, 1989 Regents of the University of California.
 /*
  * Copyright (c) 1982, 1986, 1989 Regents of the University of California.
- * All rights reserved.
+ * All rights reserved.  The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
  *
  *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley.  The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *     @(#)kern_acct.c 7.5 (Berkeley) %G%
+ *     @(#)kern_acct.c 7.7 (Berkeley) %G%
  */
 
 #include "param.h"
 #include "systm.h"
  */
 
 #include "param.h"
 #include "systm.h"
+#include "time.h"
+#include "proc.h"
 #include "user.h"
 #include "vnode.h"
 #include "mount.h"
 #include "user.h"
 #include "vnode.h"
 #include "mount.h"
@@ -141,8 +132,8 @@ acct()
        timevalsub(&t, &u.u_start);
        ap->ac_etime = compress(t.tv_sec, t.tv_usec);
        ap->ac_btime = u.u_start.tv_sec;
        timevalsub(&t, &u.u_start);
        ap->ac_etime = compress(t.tv_sec, t.tv_usec);
        ap->ac_btime = u.u_start.tv_sec;
-       ap->ac_uid = u.u_ruid;
-       ap->ac_gid = u.u_rgid;
+       ap->ac_uid = u.u_procp->p_ruid;
+       ap->ac_gid = u.u_procp->p_rgid;
        t = ru->ru_stime;
        timevaladd(&t, &ru->ru_utime);
        if (i = t.tv_sec * hz + t.tv_usec / tick)
        t = ru->ru_stime;
        timevaladd(&t, &ru->ru_utime);
        if (i = t.tv_sec * hz + t.tv_usec / tick)