-.\" $OpenBSD: acct.5,v 1.24 2021/02/04 02:03:53 rob Exp $
+.\" $OpenBSD: acct.5,v 1.25 2021/12/13 16:37:37 deraadt Exp $
.\" $NetBSD: acct.5,v 1.4 1995/10/22 01:40:10 ghudson Exp $
.\"
.\" Copyright (c) 1991, 1993
.\"
.\" @(#)acct.5 8.1 (Berkeley) 6/5/93
.\"
-.Dd $Mdocdate: February 4 2021 $
+.Dd $Mdocdate: December 13 2021 $
.Dt ACCT 5
.Os
.Sh NAME
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 */
+ dev_t ac_tty; /* controlling tty, or -1 */
#define AFORK 0x01 /* fork'd but not exec'd */
#define AMAP 0x04 /* system call or stack mapping violation */
-/* $OpenBSD: kern_acct.c,v 1.44 2021/01/29 00:31:41 rob Exp $ */
+/* $OpenBSD: kern_acct.c,v 1.45 2021/12/13 16:37:37 deraadt Exp $ */
/* $NetBSD: kern_acct.c,v 1.42 1996/02/04 02:15:12 christos Exp $ */
/*-
pr->ps_pgrp->pg_session->s_ttyp)
acct.ac_tty = pr->ps_pgrp->pg_session->s_ttyp->t_dev;
else
- acct.ac_tty = NODEV;
+ acct.ac_tty = -1;
/* (8) The boolean flags that tell how process terminated or misbehaved. */
acct.ac_flag = pr->ps_acflag;
-/* $OpenBSD: acct.h,v 1.10 2021/02/04 02:03:53 rob Exp $ */
+/* $OpenBSD: acct.h,v 1.11 2021/12/13 16:37:37 deraadt Exp $ */
/* $NetBSD: acct.h,v 1.16 1995/03/26 20:23:52 jtc Exp $ */
/*-
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 */
+ dev_t ac_tty; /* controlling tty, or -1 */
#define AFORK 0x01 /* fork'd but not exec'd */
#define AMAP 0x04 /* system call or stack mapping violation */
-/* $OpenBSD: lastcomm.c,v 1.29 2019/09/09 20:02:27 bluhm Exp $ */
+/* $OpenBSD: lastcomm.c,v 1.30 2021/12/13 16:37:37 deraadt Exp $ */
/* $NetBSD: lastcomm.c,v 1.9 1995/10/22 01:43:42 ghudson Exp $ */
/*
* SUCH DAMAGE.
*/
-#include <sys/param.h> /* NODEV */
+#include <sys/types.h>
#include <sys/stat.h>
#include <sys/acct.h>
p < &ab.ac_comm[sizeof ab.ac_comm] && *p; ++p)
if (!isprint((unsigned char)*p))
*p = '?';
- if (!*argv || requested(argv, &ab))
- {
+ if (!*argv || requested(argv, &ab)) {
t = expand(ab.ac_utime) + expand(ab.ac_stime);
(void)printf("%-*.*s %-7s %-*.*s %-*.*s %6.2f secs %.16s",
(int)sizeof ab.ac_comm,
static dev_t lastdev = (dev_t)-1;
static char *lastname;
- if (dev == NODEV) /* Special case. */
+ if (dev == -1) /* Special case. */
return ("__");
if (dev == lastdev) /* One-element cache. */
return (lastname);