diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2004-05-27 20:48:47 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2004-05-27 20:48:47 +0000 |
commit | a7f5138e3e04369875151d8ca4478028a476041a (patch) | |
tree | a9c5fb34959793c5fcd34751f266860ac8b05462 /sys | |
parent | 99bfa735141ae80d0bc64d447c37b7d9a52eee4b (diff) |
make acct(2) optional with ACCOUNTING
ok art@ deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/conf/GENERIC | 3 | ||||
-rw-r--r-- | sys/conf/files | 8 | ||||
-rw-r--r-- | sys/kern/kern_exit.c | 4 | ||||
-rw-r--r-- | sys/kern/syscalls.master | 6 | ||||
-rw-r--r-- | sys/kern/vfs_subr.c | 8 |
5 files changed, 21 insertions, 8 deletions
diff --git a/sys/conf/GENERIC b/sys/conf/GENERIC index 9b20b9f2c4a..e4806956ae2 100644 --- a/sys/conf/GENERIC +++ b/sys/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.105 2004/05/03 17:41:22 millert Exp $ +# $OpenBSD: GENERIC,v 1.106 2004/05/27 20:48:46 tedu Exp $ # # Machine-independent option; used by all architectures for their # GENERIC kernel @@ -12,6 +12,7 @@ option DDB # in-kernel debugger #option GPROF # kernel profiling, kgmon(8) option DIAGNOSTIC # internal consistency checks option KTRACE # system call tracing, a la ktrace(1) +option ACCOUNTING # acct(2) process accounting option KMEMSTATS # collect malloc(9) statistics option PTRACE # ptrace(2) system call diff --git a/sys/conf/files b/sys/conf/files index 7ddc5cf233a..cdc6496a101 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1,4 +1,4 @@ -# $OpenBSD: files,v 1.298 2004/05/23 17:33:43 grange Exp $ +# $OpenBSD: files,v 1.299 2004/05/27 20:48:46 tedu Exp $ # $NetBSD: files,v 1.87 1996/05/19 17:17:50 jonathan Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 @@ -411,6 +411,9 @@ file net/if_pfsync.c pfsync needs-flag pseudo-device bio file dev/bio.c bio needs-flag +pseudo-device hotplug +file dev/hotplug.c hotplug needs-flag + # XXX machine-independent SCSI files should live somewhere here, maybe # kernel sources @@ -541,7 +544,7 @@ file kern/exec_script.c file kern/exec_subr.c file kern/init_main.c file kern/init_sysent.c -file kern/kern_acct.c +file kern/kern_acct.c accounting file kern/kern_clock.c file kern/kern_descrip.c file kern/kern_event.c @@ -614,6 +617,7 @@ file kern/vfs_syscalls.c file kern/vfs_vnops.c file kern/vnode_if.c file miscfs/deadfs/dead_vnops.c +file miscfs/genfs/genfs_vnops.c file miscfs/genfs/layer_subr.c nullfs | umapfs file miscfs/genfs/layer_vfsops.c nullfs | umapfs file miscfs/genfs/layer_vnops.c nullfs | umapfs diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 38ba0d5b259..68d77771271 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exit.c,v 1.49 2004/03/20 19:55:50 tedu Exp $ */ +/* $OpenBSD: kern_exit.c,v 1.50 2004/05/27 20:48:46 tedu Exp $ */ /* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */ /* @@ -170,7 +170,9 @@ exit1(p, rv) sp->s_leader = NULL; } fixjobc(p, p->p_pgrp, 0); +#ifdef ACCOUNTING (void)acct_process(p); +#endif #ifdef KTRACE /* * release trace file diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index f7d6f63b48a..1354c51d54d 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1,4 +1,4 @@ -; $OpenBSD: syscalls.master,v 1.69 2004/05/03 17:38:48 millert Exp $ +; $OpenBSD: syscalls.master,v 1.70 2004/05/27 20:48:46 tedu Exp $ ; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $ ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -130,7 +130,11 @@ 48 STD { int sys_sigprocmask(int how, sigset_t mask); } 49 STD { int sys_getlogin(char *namebuf, u_int namelen); } 50 STD { int sys_setlogin(const char *namebuf); } +#ifdef ACCOUNTING 51 STD { int sys_acct(const char *path); } +#else +51 UNIMPL acct +#endif 52 STD { int sys_sigpending(void); } 53 STD { int sys_osigaltstack(const struct osigaltstack *nss, \ struct osigaltstack *oss); } diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 192167e2d87..39d830528f5 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_subr.c,v 1.99 2004/05/27 08:25:53 tedu Exp $ */ +/* $OpenBSD: vfs_subr.c,v 1.100 2004/05/27 20:48:46 tedu Exp $ */ /* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */ /* @@ -1790,15 +1790,17 @@ vfs_unmountall(void) void vfs_shutdown() { +#ifdef ACCOUNTING extern void acct_shutdown(void); + acct_shutdown(); +#endif + /* XXX Should suspend scheduling. */ (void) spl0(); printf("syncing disks... "); - acct_shutdown(); - if (panicstr == 0) { /* Sync before unmount, in case we hang on something. */ sys_sync(&proc0, (void *)0, (register_t *)0); |