Converted two options over to the new scheme: USER_LDT and KTRACE.
This commit is contained in:
parent
50627d753c
commit
db6a20e23e
@ -33,10 +33,11 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: swtch.s,v 1.23 1995/12/10 13:36:30 phk Exp $
|
||||
* $Id: swtch.s,v 1.24 1995/12/21 19:20:58 davidg Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h" /* for NNPX */
|
||||
#include "opt_user_ldt.h" /* for USER_LDT */
|
||||
#include "assym.s" /* for preprocessor defines */
|
||||
#include <sys/errno.h> /* for error codes */
|
||||
|
||||
|
@ -33,10 +33,11 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: swtch.s,v 1.23 1995/12/10 13:36:30 phk Exp $
|
||||
* $Id: swtch.s,v 1.24 1995/12/21 19:20:58 davidg Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h" /* for NNPX */
|
||||
#include "opt_user_ldt.h" /* for USER_LDT */
|
||||
#include "assym.s" /* for preprocessor defines */
|
||||
#include <sys/errno.h> /* for error codes */
|
||||
|
||||
|
@ -31,10 +31,11 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)sys_machdep.c 5.5 (Berkeley) 1/19/91
|
||||
* $Id: sys_machdep.c,v 1.12 1995/12/07 12:45:38 davidg Exp $
|
||||
* $Id: sys_machdep.c,v 1.13 1995/12/10 13:36:31 phk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opt_user_ldt.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sysproto.h>
|
||||
|
@ -35,13 +35,15 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
|
||||
* $Id: trap.c,v 1.67 1995/12/19 14:30:28 davidg Exp $
|
||||
* $Id: trap.c,v 1.68 1995/12/19 14:47:41 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* 386 Trap and System call handling
|
||||
*/
|
||||
|
||||
#include "opt_ktrace.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/proc.h>
|
||||
|
1
sys/conf/options
Normal file
1
sys/conf/options
Normal file
@ -0,0 +1 @@
|
||||
KTRACE
|
1
sys/conf/options.i386
Normal file
1
sys/conf/options.i386
Normal file
@ -0,0 +1 @@
|
||||
USER_LDT
|
1
sys/i386/conf/options.i386
Normal file
1
sys/i386/conf/options.i386
Normal file
@ -0,0 +1 @@
|
||||
USER_LDT
|
@ -33,10 +33,11 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: swtch.s,v 1.23 1995/12/10 13:36:30 phk Exp $
|
||||
* $Id: swtch.s,v 1.24 1995/12/21 19:20:58 davidg Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h" /* for NNPX */
|
||||
#include "opt_user_ldt.h" /* for USER_LDT */
|
||||
#include "assym.s" /* for preprocessor defines */
|
||||
#include <sys/errno.h> /* for error codes */
|
||||
|
||||
|
@ -31,10 +31,11 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)sys_machdep.c 5.5 (Berkeley) 1/19/91
|
||||
* $Id: sys_machdep.c,v 1.12 1995/12/07 12:45:38 davidg Exp $
|
||||
* $Id: sys_machdep.c,v 1.13 1995/12/10 13:36:31 phk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opt_user_ldt.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sysproto.h>
|
||||
|
@ -35,13 +35,15 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
|
||||
* $Id: trap.c,v 1.67 1995/12/19 14:30:28 davidg Exp $
|
||||
* $Id: trap.c,v 1.68 1995/12/19 14:47:41 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* 386 Trap and System call handling
|
||||
*/
|
||||
|
||||
#include "opt_ktrace.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/proc.h>
|
||||
|
@ -64,11 +64,7 @@ struct sysent sysent[] = {
|
||||
{ 0, (sy_call_t *)pipe }, /* 42 = pipe */
|
||||
{ 0, (sy_call_t *)getegid }, /* 43 = getegid */
|
||||
{ 4, (sy_call_t *)profil }, /* 44 = profil */
|
||||
#ifdef KTRACE
|
||||
{ 4, (sy_call_t *)ktrace }, /* 45 = ktrace */
|
||||
#else
|
||||
{ 0, (sy_call_t *)nosys }, /* 45 = ktrace */
|
||||
#endif
|
||||
{ 3, (sy_call_t *)sigaction }, /* 46 = sigaction */
|
||||
{ 0, (sy_call_t *)getgid }, /* 47 = getgid */
|
||||
{ 2, (sy_call_t *)sigprocmask }, /* 48 = sigprocmask */
|
||||
|
@ -36,9 +36,11 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_exit.c 8.7 (Berkeley) 2/12/94
|
||||
* $Id: kern_exit.c,v 1.22 1995/12/27 15:24:15 joerg Exp $
|
||||
* $Id: kern_exit.c,v 1.23 1996/01/01 12:23:39 peter Exp $
|
||||
*/
|
||||
|
||||
#include "opt_ktrace.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sysproto.h>
|
||||
|
@ -36,9 +36,11 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_fork.c 8.6 (Berkeley) 4/8/94
|
||||
* $Id: kern_fork.c,v 1.14 1995/11/12 06:42:54 bde Exp $
|
||||
* $Id: kern_fork.c,v 1.15 1995/12/07 12:46:42 davidg Exp $
|
||||
*/
|
||||
|
||||
#include "opt_ktrace.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sysproto.h>
|
||||
|
@ -31,10 +31,10 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_ktrace.c 8.2 (Berkeley) 9/23/93
|
||||
* $Id: kern_ktrace.c,v 1.8 1995/12/02 18:58:47 bde Exp $
|
||||
* $Id: kern_ktrace.c,v 1.9 1995/12/14 08:31:23 phk Exp $
|
||||
*/
|
||||
|
||||
#ifdef KTRACE
|
||||
#include "opt_ktrace.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -47,6 +47,7 @@
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/syslog.h>
|
||||
|
||||
#ifdef KTRACE
|
||||
static struct ktr_header *ktrgetheader __P((int type));
|
||||
static void ktrwrite __P((struct vnode *, struct ktr_header *));
|
||||
static int ktrcanset __P((struct proc *,struct proc *));
|
||||
@ -225,6 +226,7 @@ ktrcsw(vp, out, user)
|
||||
FREE(kth, M_TEMP);
|
||||
p->p_traceflag &= ~KTRFAC_ACTIVE;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Interface and common routines */
|
||||
|
||||
@ -246,6 +248,7 @@ ktrace(curp, uap, retval)
|
||||
register struct ktrace_args *uap;
|
||||
int *retval;
|
||||
{
|
||||
#ifdef KTRACE
|
||||
register struct vnode *vp = NULL;
|
||||
register struct proc *p;
|
||||
struct pgrp *pg;
|
||||
@ -338,8 +341,12 @@ ktrace(curp, uap, retval)
|
||||
(void) vn_close(vp, FWRITE, curp->p_ucred, curp);
|
||||
curp->p_traceflag &= ~KTRFAC_ACTIVE;
|
||||
return (error);
|
||||
#else
|
||||
return ENOSYS;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef KTRACE
|
||||
static int
|
||||
ktrops(curp, p, ops, facs, vp)
|
||||
struct proc *p, *curp;
|
||||
@ -486,4 +493,4 @@ ktrcanset(callp, targetp)
|
||||
return (0);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* KTRACE */
|
||||
|
@ -36,9 +36,11 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_sig.c 8.7 (Berkeley) 4/18/94
|
||||
* $Id: kern_sig.c,v 1.15 1995/12/07 12:46:49 davidg Exp $
|
||||
* $Id: kern_sig.c,v 1.16 1995/12/14 08:31:32 phk Exp $
|
||||
*/
|
||||
|
||||
#include "opt_ktrace.h"
|
||||
|
||||
#define SIGPROP /* include signal properties table */
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysproto.h>
|
||||
|
@ -36,9 +36,11 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_synch.c 8.6 (Berkeley) 1/21/94
|
||||
* $Id: kern_synch.c,v 1.15 1995/12/02 18:58:40 bde Exp $
|
||||
* $Id: kern_synch.c,v 1.16 1995/12/07 12:46:51 davidg Exp $
|
||||
*/
|
||||
|
||||
#include "opt_ktrace.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/proc.h>
|
||||
|
@ -35,13 +35,15 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
|
||||
* $Id: trap.c,v 1.67 1995/12/19 14:30:28 davidg Exp $
|
||||
* $Id: trap.c,v 1.68 1995/12/19 14:47:41 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* 386 Trap and System call handling
|
||||
*/
|
||||
|
||||
#include "opt_ktrace.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/proc.h>
|
||||
|
@ -36,9 +36,11 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)sys_generic.c 8.5 (Berkeley) 1/21/94
|
||||
* $Id: sys_generic.c,v 1.16 1995/11/12 06:43:05 bde Exp $
|
||||
* $Id: sys_generic.c,v 1.17 1995/12/14 08:31:48 phk Exp $
|
||||
*/
|
||||
|
||||
#include "opt_ktrace.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sysproto.h>
|
||||
|
@ -51,11 +51,7 @@ char *syscallnames[] = {
|
||||
"pipe", /* 42 = pipe */
|
||||
"getegid", /* 43 = getegid */
|
||||
"profil", /* 44 = profil */
|
||||
#ifdef KTRACE
|
||||
"ktrace", /* 45 = ktrace */
|
||||
#else
|
||||
"#45", /* 45 = ktrace */
|
||||
#endif
|
||||
"sigaction", /* 46 = sigaction */
|
||||
"getgid", /* 47 = getgid */
|
||||
"sigprocmask", /* 48 = sigprocmask */
|
||||
|
@ -1,4 +1,4 @@
|
||||
$Id: syscalls.master,v 1.19 1995/11/12 04:24:53 bde Exp $
|
||||
$Id: syscalls.master,v 1.20 1995/12/15 04:36:01 peter Exp $
|
||||
; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94
|
||||
;
|
||||
; System call name/number master file.
|
||||
@ -92,12 +92,8 @@
|
||||
43 STD POSIX { gid_t getegid(void); }
|
||||
44 STD BSD { int profil(caddr_t samples, u_int size, \
|
||||
u_int offset, u_int scale); }
|
||||
#ifdef KTRACE
|
||||
45 STD BSD { int ktrace(char *fname, int ops, int facs, \
|
||||
int pid); }
|
||||
#else
|
||||
45 UNIMPL BSD ktrace
|
||||
#endif
|
||||
46 STD POSIX { int sigaction(int signum, struct sigaction *nsa, \
|
||||
struct sigaction *osa); }
|
||||
47 STD POSIX { gid_t getgid(void); }
|
||||
|
@ -31,9 +31,11 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)uipc_syscalls.c 8.4 (Berkeley) 2/21/94
|
||||
* $Id: uipc_syscalls.c,v 1.10 1995/12/14 22:51:04 bde Exp $
|
||||
* $Id: uipc_syscalls.c,v 1.11 1996/01/01 10:28:21 peter Exp $
|
||||
*/
|
||||
|
||||
#include "opt_ktrace.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sysproto.h>
|
||||
|
@ -36,9 +36,11 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vfs_lookup.c 8.4 (Berkeley) 2/16/94
|
||||
* $Id: vfs_lookup.c,v 1.9 1995/08/24 10:16:59 dfr Exp $
|
||||
* $Id: vfs_lookup.c,v 1.10 1995/10/22 09:32:25 davidg Exp $
|
||||
*/
|
||||
|
||||
#include "opt_ktrace.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/syslimits.h>
|
||||
|
@ -47,11 +47,7 @@ HIDE_POSIX(dup)
|
||||
HIDE_POSIX(pipe)
|
||||
HIDE_POSIX(getegid)
|
||||
HIDE_BSD(profil)
|
||||
#ifdef KTRACE
|
||||
HIDE_BSD(ktrace)
|
||||
#else
|
||||
HIDE_BSD(ktrace)
|
||||
#endif
|
||||
HIDE_POSIX(sigaction)
|
||||
HIDE_POSIX(getgid)
|
||||
HIDE_POSIX(sigprocmask)
|
||||
|
@ -178,15 +178,12 @@ struct profil_args {
|
||||
u_int offset;
|
||||
u_int scale;
|
||||
};
|
||||
#ifdef KTRACE
|
||||
struct ktrace_args {
|
||||
char * fname;
|
||||
int ops;
|
||||
int facs;
|
||||
int pid;
|
||||
};
|
||||
#else
|
||||
#endif
|
||||
struct sigaction_args {
|
||||
int signum;
|
||||
struct sigaction * nsa;
|
||||
@ -770,10 +767,7 @@ int dup __P((struct proc *, struct dup_args *, int []));
|
||||
int pipe __P((struct proc *, struct pipe_args *, int []));
|
||||
int getegid __P((struct proc *, struct getegid_args *, int []));
|
||||
int profil __P((struct proc *, struct profil_args *, int []));
|
||||
#ifdef KTRACE
|
||||
int ktrace __P((struct proc *, struct ktrace_args *, int []));
|
||||
#else
|
||||
#endif
|
||||
int sigaction __P((struct proc *, struct sigaction_args *, int []));
|
||||
int getgid __P((struct proc *, struct getgid_args *, int []));
|
||||
int sigprocmask __P((struct proc *, struct sigprocmask_args *, int []));
|
||||
@ -937,9 +931,6 @@ struct olstat_args {
|
||||
char * path;
|
||||
struct ostat * ub;
|
||||
};
|
||||
#ifdef KTRACE
|
||||
#else
|
||||
#endif
|
||||
struct ofstat_args {
|
||||
int fd;
|
||||
struct ostat * sb;
|
||||
|
Loading…
Reference in New Issue
Block a user