diff options
author | dfr <dfr@FreeBSD.org> | 1998-06-07 17:13:14 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1998-06-07 17:13:14 +0000 |
commit | 1d5f38ac2264102518a09c66a7b285f57e81e67e (patch) | |
tree | 83ce2f0e2b8041d2c933d3beffc1f4465ea5b929 /sys | |
parent | 83423d0e5a4ad035e44392f0427cb39232031e45 (diff) | |
download | FreeBSD-src-1d5f38ac2264102518a09c66a7b285f57e81e67e.zip FreeBSD-src-1d5f38ac2264102518a09c66a7b285f57e81e67e.tar.gz |
This commit fixes various 64bit portability problems required for
FreeBSD/alpha. The most significant item is to change the command
argument to ioctl functions from int to u_long. This change brings us
inline with various other BSD versions. Driver writers may like to
use (__FreeBSD_version == 300003) to detect this change.
The prototype FreeBSD/alpha machdep will follow in a couple of days
time.
Diffstat (limited to 'sys')
248 files changed, 1873 insertions, 1500 deletions
diff --git a/sys/alpha/linux/linux_sysvec.c b/sys/alpha/linux/linux_sysvec.c index 798d9a9..f63b9aa 100644 --- a/sys/alpha/linux/linux_sysvec.c +++ b/sys/alpha/linux/linux_sysvec.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_sysvec.c,v 1.28 1998/04/28 18:15:06 eivind Exp $ + * $Id: linux_sysvec.c,v 1.29 1998/05/07 00:42:25 eivind Exp $ */ /* XXX we use functions that might not exist. */ @@ -56,9 +56,9 @@ #include <i386/linux/linux.h> #include <i386/linux/linux_proto.h> -static int linux_fixup __P((int **stack_base, +static int linux_fixup __P((long **stack_base, struct image_params *iparams)); -static int elf_linux_fixup __P((int **stack_base, +static int elf_linux_fixup __P((long **stack_base, struct image_params *iparams)); static void linux_prepsyscall __P((struct trapframe *tf, int *args, u_int *code, caddr_t *params)); @@ -119,26 +119,26 @@ translate_traps(int signal, int trap_code) } static int -linux_fixup(int **stack_base, struct image_params *imgp) +linux_fixup(long **stack_base, struct image_params *imgp) { - int *argv, *envp; + long *argv, *envp; argv = *stack_base; envp = *stack_base + (imgp->argc + 1); (*stack_base)--; - **stack_base = (int)envp; + **stack_base = (long)envp; (*stack_base)--; - **stack_base = (int)argv; + **stack_base = (long)argv; (*stack_base)--; - **stack_base = (int)imgp->argc; + **stack_base = (long)imgp->argc; return 0; } static int -elf_linux_fixup(int **stack_base, struct image_params *imgp) +elf_linux_fixup(long **stack_base, struct image_params *imgp) { Elf32_Auxargs *args = (Elf32_Auxargs *)imgp->auxargs; - int *pos; + long *pos; pos = *stack_base + (imgp->argc + imgp->envc + 2); @@ -165,7 +165,7 @@ elf_linux_fixup(int **stack_base, struct image_params *imgp) imgp->auxargs = NULL; (*stack_base)--; - **stack_base = (int)imgp->argc; + **stack_base = (long)imgp->argc; return 0; } @@ -316,7 +316,7 @@ linux_sigreturn(p, args) * It is unsafe to keep track of it ourselves, in the event that a * program jumps out of a signal handler. */ - scp = args->scp; + scp = SCARG(args,scp); if (copyin((caddr_t)scp, &context, sizeof(*scp)) != 0) return (EFAULT); diff --git a/sys/amd64/amd64/db_interface.c b/sys/amd64/amd64/db_interface.c index 513c97e..1889d0a 100644 --- a/sys/amd64/amd64/db_interface.c +++ b/sys/amd64/amd64/db_interface.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_interface.c,v 1.37 1997/10/27 17:23:12 bde Exp $ + * $Id: db_interface.c,v 1.38 1997/11/20 18:09:36 bde Exp $ */ /* @@ -213,7 +213,7 @@ kdb_trap(type, code, regs) void db_read_bytes(addr, size, data) vm_offset_t addr; - register int size; + register size_t size; register char *data; { register char *src; @@ -233,7 +233,7 @@ db_read_bytes(addr, size, data) void db_write_bytes(addr, size, data) vm_offset_t addr; - register int size; + register size_t size; register char *data; { register char *dst; diff --git a/sys/amd64/amd64/db_trace.c b/sys/amd64/amd64/db_trace.c index 7dec82b..ed3ccd7 100644 --- a/sys/amd64/amd64/db_trace.c +++ b/sys/amd64/amd64/db_trace.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_trace.c,v 1.26 1997/10/27 17:23:18 bde Exp $ + * $Id: db_trace.c,v 1.27 1997/11/20 18:24:52 bde Exp $ */ #include <sys/param.h> @@ -44,24 +44,24 @@ * Machine register set. */ struct db_variable db_regs[] = { - "cs", (int *)&ddb_regs.tf_cs, FCN_NULL, - "ds", (int *)&ddb_regs.tf_ds, FCN_NULL, - "es", (int *)&ddb_regs.tf_es, FCN_NULL, + "cs", (long *)&ddb_regs.tf_cs, FCN_NULL, + "ds", (long *)&ddb_regs.tf_ds, FCN_NULL, + "es", (long *)&ddb_regs.tf_es, FCN_NULL, #if 0 - "fs", (int *)&ddb_regs.tf_fs, FCN_NULL, - "gs", (int *)&ddb_regs.tf_gs, FCN_NULL, + "fs", (long *)&ddb_regs.tf_fs, FCN_NULL, + "gs", (long *)&ddb_regs.tf_gs, FCN_NULL, #endif - "ss", (int *)&ddb_regs.tf_ss, FCN_NULL, - "eax", (int *)&ddb_regs.tf_eax, FCN_NULL, - "ecx", (int *)&ddb_regs.tf_ecx, FCN_NULL, - "edx", (int *)&ddb_regs.tf_edx, FCN_NULL, - "ebx", (int *)&ddb_regs.tf_ebx, FCN_NULL, - "esp", (int *)&ddb_regs.tf_esp,FCN_NULL, - "ebp", (int *)&ddb_regs.tf_ebp, FCN_NULL, - "esi", (int *)&ddb_regs.tf_esi, FCN_NULL, - "edi", (int *)&ddb_regs.tf_edi, FCN_NULL, - "eip", (int *)&ddb_regs.tf_eip, FCN_NULL, - "efl", (int *)&ddb_regs.tf_eflags, FCN_NULL, + "ss", (long *)&ddb_regs.tf_ss, FCN_NULL, + "eax", (long *)&ddb_regs.tf_eax, FCN_NULL, + "ecx", (long *)&ddb_regs.tf_ecx, FCN_NULL, + "edx", (long *)&ddb_regs.tf_edx, FCN_NULL, + "ebx", (long *)&ddb_regs.tf_ebx, FCN_NULL, + "esp", (long *)&ddb_regs.tf_esp,FCN_NULL, + "ebp", (long *)&ddb_regs.tf_ebp, FCN_NULL, + "esi", (long *)&ddb_regs.tf_esi, FCN_NULL, + "edi", (long *)&ddb_regs.tf_edi, FCN_NULL, + "eip", (long *)&ddb_regs.tf_eip, FCN_NULL, + "efl", (long *)&ddb_regs.tf_eflags, FCN_NULL, }; struct db_variable *db_eregs = db_regs + sizeof(db_regs)/sizeof(db_regs[0]); diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index d57a2f0..331770d 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.297 1998/05/28 09:29:57 phk Exp $ + * $Id: machdep.c,v 1.298 1998/06/03 07:56:59 bde Exp $ */ #include "apm.h" @@ -1614,7 +1614,7 @@ f00f_hack(void *unused) { int ptrace_set_pc(p, addr) struct proc *p; - unsigned int addr; + unsigned long addr; { p->p_md.md_regs->tf_eip = addr; return (0); @@ -1653,7 +1653,7 @@ int ptrace_read_u_check(p, addr, len) int ptrace_write_u(p, off, data) struct proc *p; vm_offset_t off; - int data; + long data; { struct trapframe frame_copy; vm_offset_t min; diff --git a/sys/amd64/amd64/mem.c b/sys/amd64/amd64/mem.c index 14343de..8db7d3c 100644 --- a/sys/amd64/amd64/mem.c +++ b/sys/amd64/amd64/mem.c @@ -38,7 +38,7 @@ * * from: Utah $Hdr: mem.c 1.13 89/10/08$ * from: @(#)mem.c 7.2 (Berkeley) 5/9/91 - * $Id: mem.c,v 1.49 1998/01/24 02:54:13 eivind Exp $ + * $Id: mem.c,v 1.50 1998/03/12 09:14:18 bde Exp $ */ /* @@ -405,7 +405,7 @@ memmmap(dev_t dev, int offset, int nprot) static int mmioctl(dev, cmd, cmdarg, flags, p) dev_t dev; - int cmd; + u_long cmd; caddr_t cmdarg; int flags; struct proc *p; diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index dfe001d..ed5f751 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_ioctl.c,v 1.22 1997/11/17 04:00:32 ahasty Exp $ + * $Id: linux_ioctl.c,v 1.23 1997/12/15 06:09:11 msmith Exp $ */ #include <sys/param.h> @@ -455,7 +455,7 @@ linux_ioctl(struct proc *p, struct linux_ioctl_args *args) struct linux_termio linux_termio; struct filedesc *fdp = p->p_fd; struct file *fp; - int (*func)(struct file *fp, int com, caddr_t data, struct proc *p); + int (*func)(struct file *fp, u_long com, caddr_t data, struct proc *p); int bsd_line, linux_line; int error; diff --git a/sys/conf/options b/sys/conf/options index eae6959..c5fb74f 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -1,4 +1,4 @@ -# $Id: options,v 1.75 1998/05/25 10:37:40 julian Exp $ +# $Id: options,v 1.76 1998/06/05 22:39:49 julian Exp $ # # On the handling of kernel options # @@ -233,3 +233,6 @@ KEY_DEBUG opt_key.h # Size of the kernel message buffer MSGBUF_SIZE opt_msgbuf.h + +# Include tweaks for running under the SimOS machine simulator. +SIMOS opt_simos.h diff --git a/sys/contrib/ipfilter/netinet/ip_fil.h b/sys/contrib/ipfilter/netinet/ip_fil.h index ecc5c3b..44a4cf2 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil.h +++ b/sys/contrib/ipfilter/netinet/ip_fil.h @@ -6,7 +6,7 @@ * to the original author and the contributors. * * @(#)ip_fil.h 1.35 6/5/96 - * $Id: ip_fil.h,v 1.1.1.5 1998/03/21 10:11:12 peter Exp $ + * $Id: ip_fil.h,v 1.2 1998/03/21 13:37:44 peter Exp $ */ #ifndef __IP_FIL_H__ @@ -382,7 +382,7 @@ extern int ipf_log __P((void)); extern void ipfr_fastroute __P((ip_t *, fr_info_t *, frdest_t *)); extern struct ifnet *get_unit __P((char *)); # define FR_SCANLIST(p, ip, fi, m) fr_scanlist(p, ip, fi, m) -# if defined(__NetBSD__) || defined(__OpenBSD__) || (_BSDI_VERSION >= 199701) +# if defined(__NetBSD__) || defined(__OpenBSD__) || (_BSDI_VERSION >= 199701) || (__FreeBSD_version >= 300003) extern int iplioctl __P((dev_t, u_long, caddr_t, int)); # else extern int iplioctl __P((dev_t, int, caddr_t, int)); diff --git a/sys/ddb/db_aout.c b/sys/ddb/db_aout.c index 3f7ed96..d60b459 100644 --- a/sys/ddb/db_aout.c +++ b/sys/ddb/db_aout.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_aout.c,v 1.18 1997/04/01 14:31:04 bde Exp $ + * $Id: db_aout.c,v 1.19 1997/09/28 08:34:46 phk Exp $ */ /* @@ -324,11 +324,13 @@ X_db_sym_numargs(symtab, cursym, nargp, argnamep) void kdb_init() { +#ifdef __i386__ if (bootinfo.bi_esymtab != bootinfo.bi_symtab) X_db_sym_init((int *)bootinfo.bi_symtab, (char *)((bootinfo.bi_esymtab + sizeof(int) - 1) & ~(sizeof(int) - 1)), "kernel"); +#endif } #if 0 diff --git a/sys/ddb/db_break.c b/sys/ddb/db_break.c index 6f7776b..4b9269c 100644 --- a/sys/ddb/db_break.c +++ b/sys/ddb/db_break.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_break.c,v 1.13 1997/02/22 09:28:20 peter Exp $ + * $Id: db_break.c,v 1.14 1997/06/14 11:52:36 bde Exp $ */ /* @@ -208,13 +208,13 @@ db_clear_breakpoints() } } -#ifdef notused +#ifdef SOFTWARE_SSTEP /* * Set a temporary breakpoint. * The instruction is changed immediately, * so the breakpoint does not have to be on the breakpoint list. */ -static db_breakpoint_t +db_breakpoint_t db_set_temp_breakpoint(addr) db_addr_t addr; { @@ -237,13 +237,14 @@ db_set_temp_breakpoint(addr) return bkpt; } -static void +void db_delete_temp_breakpoint(bkpt) db_breakpoint_t bkpt; { db_put_value(bkpt->address, BKPT_SIZE, bkpt->bkpt_inst); db_breakpoint_free(bkpt); } + #endif /* diff --git a/sys/ddb/db_break.h b/sys/ddb/db_break.h index 1de8727..21d5ce0 100644 --- a/sys/ddb/db_break.h +++ b/sys/ddb/db_break.h @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id$ + * $Id: db_break.h,v 1.9 1997/02/22 09:28:20 peter Exp $ */ /* @@ -53,5 +53,7 @@ typedef struct db_breakpoint *db_breakpoint_t; void db_clear_breakpoints __P((void)); db_breakpoint_t db_find_breakpoint_here __P((db_addr_t addr)); void db_set_breakpoints __P((void)); +db_breakpoint_t db_set_temp_breakpoint __P((db_addr_t)); +void db_delete_temp_breakpoint __P((db_breakpoint_t)); #endif /* !_DDB_DB_BREAK_H_ */ diff --git a/sys/ddb/db_examine.c b/sys/ddb/db_examine.c index 7a0777c..3214f61 100644 --- a/sys/ddb/db_examine.c +++ b/sys/ddb/db_examine.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_examine.c,v 1.16 1997/02/22 09:28:22 peter Exp $ + * $Id: db_examine.c,v 1.17 1997/04/01 14:31:05 bde Exp $ */ /* @@ -257,7 +257,7 @@ db_search_cmd(dummy1, dummy2, dummy3, dummy4) int size; db_expr_t value; db_expr_t mask; - unsigned int count; + db_expr_t count; t = db_read_token(); if (t == tSLASH) { diff --git a/sys/ddb/db_lex.c b/sys/ddb/db_lex.c index edcaa0c..ae13e8c 100644 --- a/sys/ddb/db_lex.c +++ b/sys/ddb/db_lex.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_lex.c,v 1.13 1997/02/22 09:28:25 peter Exp $ + * $Id: db_lex.c,v 1.14 1997/06/14 11:52:36 bde Exp $ */ /* @@ -117,7 +117,7 @@ db_read_token() int db_tok_number; char db_tok_string[TOK_STRING_SIZE]; -int db_radix = 16; +long db_radix = 16; void db_flush_lex() diff --git a/sys/ddb/db_output.c b/sys/ddb/db_output.c index d0bb093..6aef208 100644 --- a/sys/ddb/db_output.c +++ b/sys/ddb/db_output.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_output.c,v 1.21 1997/02/22 09:28:26 peter Exp $ + * $Id: db_output.c,v 1.22 1997/04/01 14:31:06 bde Exp $ */ /* @@ -58,10 +58,10 @@ */ static int db_output_position = 0; /* output column */ static int db_last_non_space = 0; /* last non-space character */ -int db_tab_stop_width = 8; /* how wide are tab stops? */ +long db_tab_stop_width = 8; /* how wide are tab stops? */ #define NEXT_TAB(i) \ ((((i) + db_tab_stop_width) / db_tab_stop_width) * db_tab_stop_width) -int db_max_width = 79; /* output line width */ +long db_max_width = 79; /* output line width */ static void db_putchar __P((int c, void *arg)); diff --git a/sys/ddb/db_print.c b/sys/ddb/db_print.c index 49a580b..8140d43 100644 --- a/sys/ddb/db_print.c +++ b/sys/ddb/db_print.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_print.c,v 1.16 1998/05/19 18:42:06 phk Exp $ + * $Id: db_print.c,v 1.17 1998/05/28 09:29:50 phk Exp $ */ /* @@ -55,7 +55,7 @@ db_show_regs(dummy1, dummy2, dummy3, dummy4) db_read_variable(regp, &value); db_printf("%-12s%#10n", regp->name, value); db_find_xtrn_sym_and_offset((db_addr_t)value, &name, &offset); - if (name != 0 && offset <= db_maxoff && offset != value) { + if (name != 0 && offset <= db_maxoff && offset != value) { db_printf("\t%s", name); if (offset != 0) db_printf("+%+#n", offset); diff --git a/sys/ddb/db_run.c b/sys/ddb/db_run.c index 598a117..a705bc1 100644 --- a/sys/ddb/db_run.c +++ b/sys/ddb/db_run.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_run.c,v 1.12 1997/02/22 09:28:29 peter Exp $ + * $Id: db_run.c,v 1.13 1997/06/14 11:52:37 bde Exp $ */ /* @@ -60,7 +60,7 @@ int db_load_count; int db_store_count; #ifndef db_set_single_step -extern void db_set_single_step __P((db_regs_t *regs); +extern void db_set_single_step __P((db_regs_t *regs)); #endif #ifndef db_clear_single_step extern void db_clear_single_step __P((db_regs_t *regs)); @@ -104,7 +104,9 @@ db_stop_at_pc(is_breakpoint) return (TRUE); /* stop here */ } } else if (*is_breakpoint) { +#ifdef __i386__ /* XXx */ ddb_regs.tf_eip += 1; +#endif } *is_breakpoint = FALSE; @@ -270,9 +272,7 @@ db_set_single_step(regs) */ inst = db_get_value(pc, sizeof(int), FALSE); if (inst_branch(inst) || inst_call(inst)) { - extern unsigned getreg_val(); - - brpc = branch_taken(inst, pc, getreg_val, regs); + brpc = branch_taken(inst, pc, regs); if (brpc != pc) { /* self-branches are hopeless */ db_taken_bkpt = db_set_temp_breakpoint(brpc); } diff --git a/sys/ddb/db_sym.c b/sys/ddb/db_sym.c index 0eed0cb..40f3651 100644 --- a/sys/ddb/db_sym.c +++ b/sys/ddb/db_sym.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_sym.c,v 1.19 1997/06/30 23:49:16 bde Exp $ + * $Id: db_sym.c,v 1.20 1997/06/30 23:54:49 bde Exp $ */ /* @@ -222,7 +222,7 @@ db_search_symbol( val, strategy, offp) { register unsigned int diff; - unsigned int newdiff; + size_t newdiff; register int i; db_sym_t ret = DB_SYM_NULL, sym; @@ -281,7 +281,7 @@ db_symbol_values(sym, namep, valuep) * not accept symbols whose value is "small" (and use plain hex). */ -unsigned int db_maxoff = 0x10000; +unsigned long db_maxoff = 0x10000; void db_printsym(off, strategy) diff --git a/sys/ddb/db_variables.c b/sys/ddb/db_variables.c index 0cab001..74a45bb 100644 --- a/sys/ddb/db_variables.c +++ b/sys/ddb/db_variables.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_variables.c,v 1.13 1997/02/22 09:28:31 peter Exp $ + * $Id: db_variables.c,v 1.14 1997/06/14 11:52:37 bde Exp $ */ /* @@ -46,7 +46,7 @@ static int db_set_variable __P((db_expr_t value)); static struct db_variable db_vars[] = { { "radix", &db_radix, FCN_NULL }, - { "maxoff", (int *)&db_maxoff, FCN_NULL }, + { "maxoff", (long *)&db_maxoff, FCN_NULL }, { "maxwidth", &db_max_width, FCN_NULL }, { "tabstops", &db_tab_stop_width, FCN_NULL }, }; diff --git a/sys/ddb/db_variables.h b/sys/ddb/db_variables.h index 98b83a4..1359f01 100644 --- a/sys/ddb/db_variables.h +++ b/sys/ddb/db_variables.h @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_variables.h,v 1.7 1997/02/22 09:28:32 peter Exp $ + * $Id: db_variables.h,v 1.8 1997/06/30 23:54:50 bde Exp $ */ /* @@ -42,7 +42,7 @@ typedef int db_varfcn_t __P((struct db_variable *vp, db_expr_t *valuep, int op)); struct db_variable { char *name; /* Name of variable */ - int *valuep; /* value of variable */ + long *valuep; /* value of variable */ /* function to call when reading/writing */ db_varfcn_t *fcn; #define DB_VAR_GET 0 diff --git a/sys/ddb/ddb.h b/sys/ddb/ddb.h index e704561..01ef378 100644 --- a/sys/ddb/ddb.h +++ b/sys/ddb/ddb.h @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ddb.h,v 1.16 1998/05/19 11:02:24 phk Exp $ + * $Id: ddb.h,v 1.17 1998/05/19 18:42:09 phk Exp $ */ /* @@ -66,14 +66,14 @@ func_name(addr, have_addr, count, modif) \ char *modif; extern char *esym; -extern unsigned int db_maxoff; +extern unsigned long db_maxoff; extern int db_indent; extern int db_inst_count; extern int db_load_count; extern int db_store_count; -extern int db_radix; -extern int db_max_width; -extern int db_tab_stop_width; +extern long db_radix; +extern long db_max_width; +extern long db_tab_stop_width; struct vm_map; @@ -91,7 +91,7 @@ boolean_t db_map_current __P((struct vm_map *)); boolean_t db_map_equal __P((struct vm_map *, struct vm_map *)); void db_print_loc_and_inst __P((db_addr_t loc)); void db_printf __P((const char *fmt, ...)); -void db_read_bytes __P((vm_offset_t addr, int size, char *data)); +void db_read_bytes __P((vm_offset_t addr, size_t size, char *data)); /* machine-dependent */ int db_readline __P((char *lstart, int lsize)); void db_restart_at_pc __P((boolean_t watchpt)); @@ -101,7 +101,7 @@ boolean_t db_stop_at_pc __P((boolean_t *is_breakpoint)); #define db_strcpy strcpy void db_trap __P((int type, int code)); int db_value_of_name __P((char *name, db_expr_t *valuep)); -void db_write_bytes __P((vm_offset_t addr, int size, char *data)); +void db_write_bytes __P((vm_offset_t addr, size_t size, char *data)); /* machine-dependent */ void kdb_init __P((void)); void kdbprintf __P((const char *fmt, ...)); diff --git a/sys/dev/ar/if_ar.c b/sys/dev/ar/if_ar.c index 53c4b20..72704e1 100644 --- a/sys/dev/ar/if_ar.c +++ b/sys/dev/ar/if_ar.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ar.c,v 1.17 1998/01/08 23:40:37 eivind Exp $ + * $Id: if_ar.c,v 1.18 1998/04/17 22:36:33 des Exp $ */ /* @@ -181,7 +181,7 @@ struct isa_driver ardriver = {arprobe, arattach, "arc"}; static void ar_xmit(struct ar_softc *sc); static void arstart(struct ifnet *ifp); -static int arioctl(struct ifnet *ifp, int cmd, caddr_t data); +static int arioctl(struct ifnet *ifp, u_long cmd, caddr_t data); static void arwatchdog(struct ifnet *ifp); static int ar_packet_avail(struct ar_softc *sc, int *len, u_char *rxstat); static void ar_copy_rxbuf(struct mbuf *m, struct ar_softc *sc, int len); @@ -597,7 +597,7 @@ top_arstart: } static int -arioctl(struct ifnet *ifp, int cmd, caddr_t data) +arioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { int s, error; int was_up, should_be_up; diff --git a/sys/dev/ar/if_ar_isa.c b/sys/dev/ar/if_ar_isa.c index 53c4b20..72704e1 100644 --- a/sys/dev/ar/if_ar_isa.c +++ b/sys/dev/ar/if_ar_isa.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ar.c,v 1.17 1998/01/08 23:40:37 eivind Exp $ + * $Id: if_ar.c,v 1.18 1998/04/17 22:36:33 des Exp $ */ /* @@ -181,7 +181,7 @@ struct isa_driver ardriver = {arprobe, arattach, "arc"}; static void ar_xmit(struct ar_softc *sc); static void arstart(struct ifnet *ifp); -static int arioctl(struct ifnet *ifp, int cmd, caddr_t data); +static int arioctl(struct ifnet *ifp, u_long cmd, caddr_t data); static void arwatchdog(struct ifnet *ifp); static int ar_packet_avail(struct ar_softc *sc, int *len, u_char *rxstat); static void ar_copy_rxbuf(struct mbuf *m, struct ar_softc *sc, int len); @@ -597,7 +597,7 @@ top_arstart: } static int -arioctl(struct ifnet *ifp, int cmd, caddr_t data) +arioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { int s, error; int was_up, should_be_up; diff --git a/sys/dev/bktr/bktr_core.c b/sys/dev/bktr/bktr_core.c index 4cb4de2..3687fe7 100644 --- a/sys/dev/bktr/bktr_core.c +++ b/sys/dev/bktr/bktr_core.c @@ -309,7 +309,7 @@ SYSCTL_INT(_hw_bt848, OID_AUTO, card, CTLFLAG_RW, &bt848_card, -1, ""); SYSCTL_INT(_hw_bt848, OID_AUTO, tuner, CTLFLAG_RW, &bt848_tuner, -1, ""); SYSCTL_INT(_hw_bt848, OID_AUTO, reverse_mute, CTLFLAG_RW, &bt848_reverse_mute, -1, ""); -typedef int ioctl_cmd_t; +typedef u_long ioctl_cmd_t; #endif /* __FreeBSD__ */ #ifdef __bsdi__ diff --git a/sys/dev/ccd/ccd.c b/sys/dev/ccd/ccd.c index 683b2be..00791e8 100644 --- a/sys/dev/ccd/ccd.c +++ b/sys/dev/ccd/ccd.c @@ -1,4 +1,4 @@ -/* $Id: ccd.c,v 1.31 1998/02/22 10:01:23 jkh Exp $ */ +/* $Id: ccd.c,v 1.32 1998/03/09 20:39:26 julian Exp $ */ /* $NetBSD: ccd.c,v 1.22 1995/12/08 19:13:26 thorpej Exp $ */ @@ -1027,7 +1027,7 @@ ccdiodone(cbp) static int ccdioctl(dev, cmd, data, flag, p) dev_t dev; - int cmd; + u_long cmd; caddr_t data; int flag; struct proc *p; diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c index 5dd4762..04a0a1c 100644 --- a/sys/dev/cy/cy.c +++ b/sys/dev/cy/cy.c @@ -27,7 +27,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: cy.c,v 1.61 1998/02/13 12:45:47 phk Exp $ + * $Id: cy.c,v 1.62 1998/03/18 20:52:28 dg Exp $ */ #include "opt_compat.h" @@ -1383,7 +1383,7 @@ siointr1(com) static int sioioctl(dev, cmd, data, flag, p) dev_t dev; - int cmd; + u_long cmd; caddr_t data; int flag; struct proc *p; diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c index 5dd4762..04a0a1c 100644 --- a/sys/dev/cy/cy_isa.c +++ b/sys/dev/cy/cy_isa.c @@ -27,7 +27,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: cy.c,v 1.61 1998/02/13 12:45:47 phk Exp $ + * $Id: cy.c,v 1.62 1998/03/18 20:52:28 dg Exp $ */ #include "opt_compat.h" @@ -1383,7 +1383,7 @@ siointr1(com) static int sioioctl(dev, cmd, data, flag, p) dev_t dev; - int cmd; + u_long cmd; caddr_t data; int flag; struct proc *p; diff --git a/sys/dev/de/if_devar.h b/sys/dev/de/if_devar.h index b6fdba7..eb2b4c7 100644 --- a/sys/dev/de/if_devar.h +++ b/sys/dev/de/if_devar.h @@ -1,5 +1,5 @@ /* $NetBSD: if_devar.h,v 1.26 1998/02/11 01:28:29 thorpej Exp $ */ -/* $Id: if_devar.h,v 1.4 1997/11/08 14:46:58 peter Exp $ */ +/* $Id: if_devar.h,v 1.5 1998/03/08 16:54:00 peter Exp $ */ /*- * Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com) @@ -913,7 +913,7 @@ static void tulip_softintr(void); #if defined(__FreeBSD__) typedef void ifnet_ret_t; -typedef int ioctl_cmd_t; +typedef u_long ioctl_cmd_t; #if defined(TULIP_HDR_DATA) static tulip_softc_t *tulips[TULIP_MAX_DEVICES]; #endif diff --git a/sys/dev/dgb/dgb.c b/sys/dev/dgb/dgb.c index 27ee53b..d975422 100644 --- a/sys/dev/dgb/dgb.c +++ b/sys/dev/dgb/dgb.c @@ -1,5 +1,5 @@ /*- - * dgb.c $Id: dgb.c,v 1.34 1998/04/21 21:06:22 brian Exp $ + * dgb.c $Id: dgb.c,v 1.35 1998/04/21 21:06:56 brian Exp $ * * Digiboard driver. * @@ -1567,7 +1567,7 @@ dgbpoll(unit_c) static int dgbioctl(dev, cmd, data, flag, p) dev_t dev; - int cmd; + u_long cmd; caddr_t data; int flag; struct proc *p; diff --git a/sys/dev/dpt/dpt_control.c b/sys/dev/dpt/dpt_control.c index fe3188d..ad7b0df 100644 --- a/sys/dev/dpt/dpt_control.c +++ b/sys/dev/dpt/dpt_control.c @@ -36,7 +36,7 @@ * future. */ -#ident "$Id: dpt_control.c,v 1.4 1998/04/17 22:36:20 des Exp $" +#ident "$Id: dpt_control.c,v 1.5 1998/06/02 00:32:38 eivind Exp $" #include "opt_dpt.h" @@ -74,7 +74,7 @@ static int dpt_open(dev_t dev, int flags, int fmt, struct proc * p); static int dpt_close(dev_t dev, int flags, int fmt, struct proc * p); static int dpt_write(dev_t dev, struct uio * uio, int ioflag); static int dpt_read(dev_t dev, struct uio * uio, int ioflag); -static int dpt_ioctl(dev_t dev, int cmd, caddr_t cmdarg, int flags, struct proc * p); +static int dpt_ioctl(dev_t dev, u_long cmd, caddr_t cmdarg, int flags, struct proc * p); /* This has to be modified as the processor and CPU are not known yet */ @@ -666,7 +666,7 @@ dpt_read(dev_t dev, struct uio * uio, int ioflag) */ static int -dpt_ioctl(dev_t dev, int cmd, caddr_t cmdarg, int flags, struct proc * p) +dpt_ioctl(dev_t dev, u_long cmd, caddr_t cmdarg, int flags, struct proc * p) { int minor_no; dpt_softc_t *dpt; diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c index 3e15d49..d670bf2 100644 --- a/sys/dev/ed/if_ed.c +++ b/sys/dev/ed/if_ed.c @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ed.c,v 1.139 1998/04/15 17:45:15 bde Exp $ + * $Id: if_ed.c,v 1.140 1998/04/17 22:36:34 des Exp $ */ /* @@ -139,7 +139,7 @@ static int ed_attach __P((struct ed_softc *, int, int)); static int ed_attach_isa __P((struct isa_device *)); static void ed_init __P((void *)); -static int ed_ioctl __P((struct ifnet *, int, caddr_t)); +static int ed_ioctl __P((struct ifnet *, u_long, caddr_t)); static int ed_probe __P((struct isa_device *)); static void ed_start __P((struct ifnet *)); static void ed_reset __P((struct ifnet *)); @@ -2582,7 +2582,7 @@ edintr(unit) static int ed_ioctl(ifp, command, data) register struct ifnet *ifp; - int command; + u_long command; caddr_t data; { struct ed_softc *sc = ifp->if_softc; diff --git a/sys/dev/en/midwayvar.h b/sys/dev/en/midwayvar.h index c17db92..b9f41da 100644 --- a/sys/dev/en/midwayvar.h +++ b/sys/dev/en/midwayvar.h @@ -72,7 +72,7 @@ #define EN_INTR_TYPE void #define EN_INTR_RET(X) return -#define EN_IOCTL_CMDT int +#define EN_IOCTL_CMDT u_long struct device { char dv_xname[IFNAMSIZ]; diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c index 6e96c8f..9087bb5 100644 --- a/sys/dev/ep/if_ep.c +++ b/sys/dev/ep/if_ep.c @@ -38,7 +38,7 @@ */ /* - * $Id: if_ep.c,v 1.73 1998/02/27 05:38:30 msmith Exp $ + * $Id: if_ep.c,v 1.74 1998/03/28 13:24:01 bde Exp $ * * Promiscuous mode added and interrupt logic slightly changed * to reduce the number of adapter failures. Transceiver select @@ -116,7 +116,7 @@ static int eeprom_rdy __P((struct ep_softc *sc)); static int ep_isa_probe __P((struct isa_device *)); static struct ep_board * ep_look_for_board_at __P((struct isa_device *is)); static int ep_isa_attach __P((struct isa_device *)); -static int epioctl __P((struct ifnet * ifp, int, caddr_t)); +static int epioctl __P((struct ifnet * ifp, u_long, caddr_t)); static void epinit __P((struct ep_softc *)); static void epread __P((struct ep_softc *)); @@ -1197,7 +1197,7 @@ out: static int epioctl(ifp, cmd, data) register struct ifnet *ifp; - int cmd; + u_long cmd; caddr_t data; { register struct ifaddr *ifa = (struct ifaddr *) data; diff --git a/sys/dev/ex/if_ex.c b/sys/dev/ex/if_ex.c index 1f58a06..f64ef74 100644 --- a/sys/dev/ex/if_ex.c +++ b/sys/dev/ex/if_ex.c @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ex.c,v 1.10 1998/01/08 23:40:52 eivind Exp $ + * $Id: if_ex.c,v 1.11 1998/03/28 13:24:06 bde Exp $ */ /* @@ -119,7 +119,7 @@ static int ex_attach __P((struct isa_device *)); static void ex_init __P((void *)); static void ex_start __P((struct ifnet *)); static void ex_stop __P((int)); -static int ex_ioctl __P((struct ifnet *, int, caddr_t)); +static int ex_ioctl __P((struct ifnet *, u_long, caddr_t)); static void ex_reset __P((int)); static void ex_watchdog __P((struct ifnet *)); @@ -760,7 +760,7 @@ void ex_rx_intr(int unit) } -int ex_ioctl(register struct ifnet *ifp, int cmd, caddr_t data) +int ex_ioctl(register struct ifnet *ifp, u_long cmd, caddr_t data) { register struct ifaddr *ifa = (struct ifaddr *) data; struct ex_softc *sc = &ex_sc[ifp->if_unit]; diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index 5445b3f..5a9d93c 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -43,7 +43,7 @@ * SUCH DAMAGE. * * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 - * $Id: fd.c,v 1.111 1998/05/06 22:14:41 julian Exp $ + * $Id: fd.c,v 1.112 1998/05/06 23:35:36 julian Exp $ * */ @@ -2040,7 +2040,7 @@ fdformat(dev, finfo, p) static int fdioctl(dev, cmd, addr, flag, p) dev_t dev; - int cmd; + u_long cmd; caddr_t addr; int flag; struct proc *p; diff --git a/sys/dev/fe/if_fe.c b/sys/dev/fe/if_fe.c index 81a4b72..8fae123 100644 --- a/sys/dev/fe/if_fe.c +++ b/sys/dev/fe/if_fe.c @@ -21,7 +21,7 @@ */ /* - * $Id: if_fe.c,v 1.39 1998/02/27 06:39:31 msmith Exp $ + * $Id: if_fe.c,v 1.40 1998/03/28 13:24:09 bde Exp $ * * Device driver for Fujitsu MB86960A/MB86965A based Ethernet cards. * To be used with FreeBSD 2.x @@ -239,7 +239,7 @@ static struct fe_softc { static int fe_probe ( struct isa_device * ); static int fe_attach ( struct isa_device * ); static void fe_init ( int ); -static int fe_ioctl ( struct ifnet *, int, caddr_t ); +static int fe_ioctl ( struct ifnet *, u_long, caddr_t ); static void fe_start ( struct ifnet * ); static void fe_reset ( int ); static void fe_watchdog ( struct ifnet * ); @@ -2471,7 +2471,7 @@ feintr ( int unit ) * pretty ugly. */ static int -fe_ioctl ( struct ifnet * ifp, int command, caddr_t data ) +fe_ioctl ( struct ifnet * ifp, u_long command, caddr_t data ) { struct fe_softc *sc = ifp->if_softc; int s, error = 0; diff --git a/sys/dev/fxp/if_fxpvar.h b/sys/dev/fxp/if_fxpvar.h index 53945e0..a9d845b 100644 --- a/sys/dev/fxp/if_fxpvar.h +++ b/sys/dev/fxp/if_fxpvar.h @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_fxpvar.h,v 1.3 1997/09/29 11:27:43 davidg Exp $ + * $Id: if_fxpvar.h,v 1.4 1997/11/29 08:11:01 davidg Exp $ */ /* @@ -107,6 +107,6 @@ struct fxp_softc { #define FXP_FORMAT "fxp%d" #define FXP_ARGS(sc) (sc)->arpcom.ac_if.if_unit #define FXP_INTR_TYPE void -#define FXP_IOCTLCMD_TYPE int +#define FXP_IOCTLCMD_TYPE u_long #define FXP_BPFTAP_ARG(ifp) ifp #endif /* __NetBSD__ */ diff --git a/sys/dev/ie/if_ie.c b/sys/dev/ie/if_ie.c index a34f11d..0e96d6f 100644 --- a/sys/dev/ie/if_ie.c +++ b/sys/dev/ie/if_ie.c @@ -47,7 +47,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ie.c,v 1.51 1998/03/28 13:24:13 bde Exp $ + * $Id: if_ie.c,v 1.52 1998/04/15 17:45:20 bde Exp $ */ /* @@ -184,7 +184,7 @@ static int ee16_probe(struct isa_device * dvp); static int check_ie_present(int unit, caddr_t where, unsigned size); static void ieinit(int unit); static void ie_stop(int unit); -static int ieioctl(struct ifnet * ifp, int command, caddr_t data); +static int ieioctl(struct ifnet * ifp, u_long command, caddr_t data); static void iestart(struct ifnet * ifp); static void el_reset_586(int unit); @@ -2251,7 +2251,7 @@ ie_stop(int unit) } static int -ieioctl(struct ifnet *ifp, int command, caddr_t data) +ieioctl(struct ifnet *ifp, u_long command, caddr_t data) { struct ifaddr *ifa = (struct ifaddr *) data; struct ie_softc *ie = ifp->if_softc; diff --git a/sys/dev/joy/joy.c b/sys/dev/joy/joy.c index 072be4e..f64d99e5 100644 --- a/sys/dev/joy/joy.c +++ b/sys/dev/joy/joy.c @@ -188,7 +188,7 @@ joyread (dev_t dev, struct uio *uio, int flag) } static int -joyioctl (dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) +joyioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) { int unit = UNIT (dev); int i = joypart (dev); diff --git a/sys/dev/lnc/if_lnc.c b/sys/dev/lnc/if_lnc.c index eb1c4fe..bff5d17 100644 --- a/sys/dev/lnc/if_lnc.c +++ b/sys/dev/lnc/if_lnc.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_lnc.c,v 1.41 1998/05/27 09:59:13 paul Exp $ + * $Id: if_lnc.c,v 1.42 1998/05/27 11:05:17 paul Exp $ */ /* @@ -175,7 +175,7 @@ static void lnc_init __P((struct lnc_softc *sc)); static __inline int mbuf_to_buffer __P((struct mbuf *m, char *buffer)); static __inline struct mbuf *chain_to_cluster __P((struct mbuf *m)); static void lnc_start __P((struct ifnet *ifp)); -static int lnc_ioctl __P((struct ifnet *ifp, int command, caddr_t data)); +static int lnc_ioctl __P((struct ifnet *ifp, u_long command, caddr_t data)); static void lnc_watchdog __P((struct ifnet *ifp)); #ifdef DEBUG static void lnc_dump_state __P((struct lnc_softc *sc)); @@ -1749,7 +1749,7 @@ lnc_start(struct ifnet *ifp) } static int -lnc_ioctl(struct ifnet * ifp, int command, caddr_t data) +lnc_ioctl(struct ifnet * ifp, u_long command, caddr_t data) { struct lnc_softc *sc = ifp->if_softc; diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c index 9121a71..1129d94 100644 --- a/sys/dev/mcd/mcd.c +++ b/sys/dev/mcd/mcd.c @@ -40,7 +40,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: mcd.c,v 1.96 1997/12/02 21:06:25 phk Exp $ + * $Id: mcd.c,v 1.97 1998/01/24 02:54:22 eivind Exp $ */ static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; @@ -506,7 +506,7 @@ static void mcd_start(int unit) return; } -int mcdioctl(dev_t dev, int cmd, caddr_t addr, int flags, struct proc *p) +int mcdioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) { struct mcd_data *cd; int unit,part,retry,r; diff --git a/sys/dev/mse/mse.c b/sys/dev/mse/mse.c index 2f558d8..d907e4c 100644 --- a/sys/dev/mse/mse.c +++ b/sys/dev/mse/mse.c @@ -11,7 +11,7 @@ * this software for any purpose. It is provided "as is" * without express or implied warranty. * - * $Id: mse.c,v 1.36 1997/12/07 08:09:16 yokota Exp $ + * $Id: mse.c,v 1.37 1998/01/24 02:54:22 eivind Exp $ */ /* * Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and @@ -401,7 +401,7 @@ mseread(dev, uio, ioflag) static int mseioctl(dev, cmd, addr, flag, p) dev_t dev; - int cmd; + u_long cmd; caddr_t addr; int flag; struct proc *p; diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 530408b..a88ee89 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pci.c,v 1.81 1998/01/24 02:54:47 eivind Exp $ + * $Id: pci.c,v 1.82 1998/04/01 21:07:36 tegge Exp $ * */ @@ -31,6 +31,7 @@ #if NPCI > 0 #include "opt_devfs.h" +#include "opt_simos.h" #include <sys/param.h> #include <sys/systm.h> @@ -434,6 +435,11 @@ pci_probebus(int bus) pcicfgregs probe; int bushigh = bus; +#ifdef SIMOS +#undef PCI_SLOTMAX +#define PCI_SLOTMAX 0 +#endif + bzero(&probe, sizeof probe); probe.parent = pci_bridgeto(bus); probe.bus = bus; @@ -509,7 +515,7 @@ pci_close(dev_t dev, int flag, int devtype, struct proc *p) } static int -pci_ioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) +pci_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) { struct pci_io *io; int error; diff --git a/sys/dev/pdq/pdqvar.h b/sys/dev/pdq/pdqvar.h index 6bb3065..5587d18 100644 --- a/sys/dev/pdq/pdqvar.h +++ b/sys/dev/pdq/pdqvar.h @@ -21,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pdqvar.h,v 1.19 1996/07/31 21:38:44 thomas Exp $ + * $Id: pdqvar.h,v 1.1.1.1 1997/01/17 23:19:49 joerg Exp $ * */ @@ -105,7 +105,7 @@ enum _pdq_type_t { #include <machine/cpufunc.h> #include <machine/clock.h> typedef void ifnet_ret_t; -typedef int ioctl_cmd_t; +typedef u_long ioctl_cmd_t; typedef enum { PDQ_BUS_EISA, PDQ_BUS_PCI } pdq_bus_t; typedef u_int16_t pdq_bus_ioport_t; typedef volatile pdq_uint32_t *pdq_bus_memaddr_t; diff --git a/sys/dev/ppbus/nlpt.c b/sys/dev/ppbus/nlpt.c index 46a1ea1..2915806 100644 --- a/sys/dev/ppbus/nlpt.c +++ b/sys/dev/ppbus/nlpt.c @@ -47,7 +47,7 @@ * * from: unknown origin, 386BSD 0.1 * From Id: lpt.c,v 1.55.2.1 1996/11/12 09:08:38 phk Exp - * $Id: nlpt.c,v 1.6 1997/12/02 21:06:09 phk Exp $ + * $Id: nlpt.c,v 1.7 1998/01/24 02:54:05 eivind Exp $ */ /* @@ -760,7 +760,7 @@ nlptintr(int unit) } static int -nlptioctl(dev_t dev, int cmd, caddr_t data, int flags, struct proc *p) +nlptioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p) { int error = 0; struct lpt_data *sc; diff --git a/sys/dev/ppbus/ppi.c b/sys/dev/ppbus/ppi.c index bbc2bdc..f742e4b 100644 --- a/sys/dev/ppbus/ppi.c +++ b/sys/dev/ppbus/ppi.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ppi.c,v 1.5 1997/09/01 00:51:49 bde Exp $ + * $Id: ppi.c,v 1.6 1998/01/02 09:30:39 msmith Exp $ * */ #include "ppi.h" @@ -164,7 +164,7 @@ ppiclose(dev_t dev, int flags, int fmt, struct proc *p) } static int -ppiioctl(dev_t dev, int cmd, caddr_t data, int flags, struct proc *p) +ppiioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p) { u_int unit = minor(dev); struct ppi_data *ppi = ppidata[unit]; diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c index 784527f..31d738c 100644 --- a/sys/dev/rc/rc.c +++ b/sys/dev/rc/rc.c @@ -1090,7 +1090,8 @@ struct rc_softc *rcb; static int rcioctl(dev, cmd, data, flag, p) dev_t dev; -int cmd, flag; +u_long cmd; +int flag; caddr_t data; struct proc *p; { diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c index e6f2af0..1c6e526 100644 --- a/sys/dev/rp/rp.c +++ b/sys/dev/rp/rp.c @@ -1586,7 +1586,7 @@ rpdtrwakeup(void *chan) int rpioctl(dev, cmd, data, flag, p) dev_t dev; - int cmd; + u_long cmd; caddr_t data; int flag; struct proc *p; diff --git a/sys/dev/scd/scd.c b/sys/dev/scd/scd.c index 6d25f89..339ccfd 100644 --- a/sys/dev/scd/scd.c +++ b/sys/dev/scd/scd.c @@ -41,7 +41,7 @@ */ -/* $Id: scd.c,v 1.35 1998/01/24 02:54:24 eivind Exp $ */ +/* $Id: scd.c,v 1.36 1998/04/15 17:45:48 bde Exp $ */ /* Please send any comments to micke@dynas.se */ @@ -418,7 +418,7 @@ scd_start(int unit) } static int -scdioctl(dev_t dev, int cmd, caddr_t addr, int flags, struct proc *p) +scdioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) { struct scd_data *cd; int unit,part; diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c index 52838cf..92dda3d 100644 --- a/sys/dev/si/si.c +++ b/sys/dev/si/si.c @@ -30,7 +30,7 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN * NO EVENT SHALL THE AUTHORS BE LIABLE. * - * $Id: si.c,v 1.69 1998/03/23 16:27:37 peter Exp $ + * $Id: si.c,v 1.70 1998/03/28 13:24:39 bde Exp $ */ #ifndef lint @@ -1481,7 +1481,7 @@ sidevtotty(dev_t dev) static int siioctl(dev, cmd, data, flag, p) dev_t dev; - int cmd; + u_long cmd; caddr_t data; int flag; struct proc *p; diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index 898f080..776a50c 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.204 1998/06/03 09:43:38 bde Exp $ + * $Id: sio.c,v 1.205 1998/06/03 12:30:10 bde Exp $ */ #include "opt_comconsole.h" @@ -1688,7 +1688,7 @@ cont: static int sioioctl(dev, cmd, data, flag, p) dev_t dev; - int cmd; + u_long cmd; caddr_t data; int flag; struct proc *p; diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c index 4679f01..c4b13e5 100644 --- a/sys/dev/snp/snp.c +++ b/sys/dev/snp/snp.c @@ -395,7 +395,7 @@ snpdown(snp) static int snpioctl(dev, cmd, data, flags, p) dev_t dev; - int cmd; + u_long cmd; caddr_t data; int flags; struct proc *p; diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c index 952d822..e090bc8 100644 --- a/sys/dev/speaker/spkr.c +++ b/sys/dev/speaker/spkr.c @@ -4,7 +4,7 @@ * v1.4 by Eric S. Raymond (esr@snark.thyrsus.com) Aug 1993 * modified for FreeBSD by Andrew A. Chernov <ache@astral.msk.su> * - * $Id: spkr.c,v 1.32 1998/02/09 06:08:41 eivind Exp $ + * $Id: spkr.c,v 1.33 1998/02/20 13:46:55 bde Exp $ */ #include "speaker.h" @@ -540,7 +540,7 @@ spkrclose(dev, flags, fmt, p) int spkrioctl(dev, cmd, cmdarg, flags, p) dev_t dev; - int cmd; + u_long cmd; caddr_t cmdarg; int flags; struct proc *p; diff --git a/sys/dev/sr/if_sr.c b/sys/dev/sr/if_sr.c index 546756f..00427ba 100644 --- a/sys/dev/sr/if_sr.c +++ b/sys/dev/sr/if_sr.c @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_sr.c,v 1.11 1998/01/30 19:49:54 jhay Exp $ + * $Id: if_sr.c,v 1.12 1998/04/17 22:36:35 des Exp $ */ /* @@ -273,7 +273,7 @@ void srintr_hc(struct sr_hardc *hc); static int srattach(struct sr_hardc *hc); static void sr_xmit(struct sr_softc *sc); static void srstart(struct ifnet *ifp); -static int srioctl(struct ifnet *ifp, int cmd, caddr_t data); +static int srioctl(struct ifnet *ifp, u_long cmd, caddr_t data); static void srwatchdog(struct ifnet *ifp); static int sr_packet_avail(struct sr_softc *sc, int *len, u_char *rxstat); static void sr_copy_rxbuf(struct mbuf *m, struct sr_softc *sc, int len); @@ -1243,7 +1243,7 @@ static int bug_splats[] = {0, 0, 0, 0, 0, 0, 0, 0}; #endif static int -srioctl(struct ifnet *ifp, int cmd, caddr_t data) +srioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { int s, error, was_up, should_be_up; struct sppp *sp = (struct sppp *)ifp; diff --git a/sys/dev/sr/if_sr_isa.c b/sys/dev/sr/if_sr_isa.c index 546756f..00427ba 100644 --- a/sys/dev/sr/if_sr_isa.c +++ b/sys/dev/sr/if_sr_isa.c @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_sr.c,v 1.11 1998/01/30 19:49:54 jhay Exp $ + * $Id: if_sr.c,v 1.12 1998/04/17 22:36:35 des Exp $ */ /* @@ -273,7 +273,7 @@ void srintr_hc(struct sr_hardc *hc); static int srattach(struct sr_hardc *hc); static void sr_xmit(struct sr_softc *sc); static void srstart(struct ifnet *ifp); -static int srioctl(struct ifnet *ifp, int cmd, caddr_t data); +static int srioctl(struct ifnet *ifp, u_long cmd, caddr_t data); static void srwatchdog(struct ifnet *ifp); static int sr_packet_avail(struct sr_softc *sc, int *len, u_char *rxstat); static void sr_copy_rxbuf(struct mbuf *m, struct sr_softc *sc, int len); @@ -1243,7 +1243,7 @@ static int bug_splats[] = {0, 0, 0, 0, 0, 0, 0, 0}; #endif static int -srioctl(struct ifnet *ifp, int cmd, caddr_t data) +srioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { int s, error, was_up, should_be_up; struct sppp *sp = (struct sppp *)ifp; diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index c7c02e9..748833b 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.260 1998/04/17 10:03:11 des Exp $ + * $Id: syscons.c,v 1.261 1998/05/17 11:52:18 phk Exp $ */ #include "sc.h" @@ -984,7 +984,7 @@ scparam(struct tty *tp, struct termios *t) } int -scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) +scioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) { int error; u_int i; diff --git a/sys/dev/tx/if_tx.c b/sys/dev/tx/if_tx.c index 5e3da26..691f2fc 100644 --- a/sys/dev/tx/if_tx.c +++ b/sys/dev/tx/if_tx.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_tx.c,v 1.9 1998/04/13 14:15:40 semenu Exp $ + * $Id: if_tx.c,v 1.10 1998/04/15 17:47:05 bde Exp $ * */ @@ -106,7 +106,7 @@ DATA_SET ( pcidevice_set, txdevice ); static int epic_ifioctl __P(( register struct ifnet * ifp, - int command, caddr_t data)) + u_long command, caddr_t data)) { epic_softc_t *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *) data; diff --git a/sys/dev/vn/vn.c b/sys/dev/vn/vn.c index 516a9f8..57ba1ca 100644 --- a/sys/dev/vn/vn.c +++ b/sys/dev/vn/vn.c @@ -38,7 +38,7 @@ * from: Utah Hdr: vn.c 1.13 94/04/02 * * from: @(#)vn.c 8.6 (Berkeley) 4/1/94 - * $Id: vn.c,v 1.58 1998/04/24 07:53:59 julian Exp $ + * $Id: vn.c,v 1.59 1998/05/06 22:14:38 julian Exp $ */ /* @@ -605,7 +605,7 @@ vniodone( struct buf *bp) { /* ARGSUSED */ static int -vnioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) +vnioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) { struct vn_softc *vn = vn_softc[vnunit(dev)]; struct vn_ioctl *vio; diff --git a/sys/dev/vx/if_vx.c b/sys/dev/vx/if_vx.c index abefc3c..c02fd75 100644 --- a/sys/dev/vx/if_vx.c +++ b/sys/dev/vx/if_vx.c @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id$ + * $Id: if_vx.c,v 1.16 1998/02/21 05:35:02 gpalmer Exp $ * */ @@ -118,7 +118,7 @@ static struct connector_entry { static void vxtxstat __P((struct vx_softc *)); static int vxstatus __P((struct vx_softc *)); static void vxinit __P((void *)); -static int vxioctl __P((struct ifnet *, int, caddr_t)); +static int vxioctl __P((struct ifnet *, u_long, caddr_t)); static void vxstart __P((struct ifnet *ifp)); static void vxwatchdog __P((struct ifnet *)); static void vxreset __P((struct vx_softc *)); @@ -896,7 +896,7 @@ vxget(sc, totlen) static int vxioctl(ifp, cmd, data) register struct ifnet *ifp; - int cmd; + u_long cmd; caddr_t data; { struct vx_softc *sc = vx_softc[ifp->if_unit]; diff --git a/sys/dev/wl/if_wl.c b/sys/dev/wl/if_wl.c index 8908c20..c4bd4db 100644 --- a/sys/dev/wl/if_wl.c +++ b/sys/dev/wl/if_wl.c @@ -1,4 +1,4 @@ -/* $Id: if_wl.c,v 1.10 1998/01/08 23:41:04 eivind Exp $ */ +/* $Id: if_wl.c,v 1.11 1998/02/20 13:11:47 bde Exp $ */ /* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -301,7 +301,7 @@ SYSCTL_INT(_machdep, OID_AUTO, wl_gather_snr, CTLFLAG_RW, &gathersnr, 0, ""); static void wlstart(struct ifnet *ifp); static void wlinit(void *xsc); -static int wlioctl(struct ifnet *ifp, int cmd, caddr_t data); +static int wlioctl(struct ifnet *ifp, u_long cmd, caddr_t data); static timeout_t wlwatchdog; static void wlxmt(int unt, struct mbuf *m); static int wldiag(int unt); @@ -1169,7 +1169,7 @@ wlread(int unit, u_short fd_p) * */ static int -wlioctl(struct ifnet *ifp, int cmd, caddr_t data) +wlioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { register struct ifaddr *ifa = (struct ifaddr *)data; register struct ifreq *ifr = (struct ifreq *)data; diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index b5e9915..84a6f20 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)cd9660_vfsops.c 8.18 (Berkeley) 5/22/95 - * $Id: cd9660_vfsops.c,v 1.38 1998/04/20 23:18:46 julian Exp $ + * $Id: cd9660_vfsops.c,v 1.39 1998/05/06 05:29:30 msmith Exp $ */ #include <sys/param.h> @@ -197,7 +197,7 @@ cd9660_mount(mp, path, data, ndp, p) { struct vnode *devvp; struct iso_args args; - u_int size; + size_t size; int error; struct iso_mnt *imp = 0; diff --git a/sys/fs/procfs/procfs_mem.c b/sys/fs/procfs/procfs_mem.c index 29c883c..27cb4f5 100644 --- a/sys/fs/procfs/procfs_mem.c +++ b/sys/fs/procfs/procfs_mem.c @@ -37,7 +37,7 @@ * * @(#)procfs_mem.c 8.5 (Berkeley) 6/15/94 * - * $Id: procfs_mem.c,v 1.31 1998/04/17 22:36:55 des Exp $ + * $Id: procfs_mem.c,v 1.32 1998/05/19 00:00:14 tegge Exp $ */ /* @@ -159,7 +159,7 @@ procfs_rwmem(curp, p, uio) fill_eproc (p, &p->p_addr->u_kproc.kp_eproc); /* locate the in-core address */ - tkva = (u_int)p->p_addr + uva - VM_MAXUSER_ADDRESS; + tkva = (u_long)p->p_addr + uva - VM_MAXUSER_ADDRESS; /* transfer it */ error = uiomove((caddr_t)tkva, len, uio); diff --git a/sys/fs/procfs/procfs_vfsops.c b/sys/fs/procfs/procfs_vfsops.c index f75de09..0827be1 100644 --- a/sys/fs/procfs/procfs_vfsops.c +++ b/sys/fs/procfs/procfs_vfsops.c @@ -36,7 +36,7 @@ * * @(#)procfs_vfsops.c 8.7 (Berkeley) 5/10/95 * - * $Id: procfs_vfsops.c,v 1.20 1998/03/01 22:46:22 msmith Exp $ + * $Id: procfs_vfsops.c,v 1.21 1998/05/06 05:29:36 msmith Exp $ */ /* @@ -75,7 +75,7 @@ procfs_mount(mp, path, data, ndp, p) struct nameidata *ndp; struct proc *p; { - u_int size; + size_t size; if (UIO_MX & (UIO_MX-1)) { log(LOG_ERR, "procfs: invalid directory entry size\n"); diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c index a168bc8..ef39ab5 100644 --- a/sys/fs/specfs/spec_vnops.c +++ b/sys/fs/specfs/spec_vnops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)spec_vnops.c 8.14 (Berkeley) 5/21/95 - * $Id: spec_vnops.c,v 1.61 1998/04/19 23:32:26 julian Exp $ + * $Id: spec_vnops.c,v 1.62 1998/05/21 07:47:49 dyson Exp $ */ #include <sys/param.h> @@ -431,7 +431,7 @@ spec_ioctl(ap) ap->a_fflag, ap->a_p)); case VBLK: - if (ap->a_command == 0 && (int)ap->a_data == B_TAPE) + if (ap->a_command == 0 && (long)ap->a_data == B_TAPE) if ((bdevsw[major(dev)]->d_flags & D_TYPEMASK) == D_TAPE) return (0); diff --git a/sys/geom/geom_ccd.c b/sys/geom/geom_ccd.c index 683b2be..00791e8 100644 --- a/sys/geom/geom_ccd.c +++ b/sys/geom/geom_ccd.c @@ -1,4 +1,4 @@ -/* $Id: ccd.c,v 1.31 1998/02/22 10:01:23 jkh Exp $ */ +/* $Id: ccd.c,v 1.32 1998/03/09 20:39:26 julian Exp $ */ /* $NetBSD: ccd.c,v 1.22 1995/12/08 19:13:26 thorpej Exp $ */ @@ -1027,7 +1027,7 @@ ccdiodone(cbp) static int ccdioctl(dev, cmd, data, flag, p) dev_t dev; - int cmd; + u_long cmd; caddr_t data; int flag; struct proc *p; diff --git a/sys/gnu/i386/isa/dgb.c b/sys/gnu/i386/isa/dgb.c index 27ee53b..d975422 100644 --- a/sys/gnu/i386/isa/dgb.c +++ b/sys/gnu/i386/isa/dgb.c @@ -1,5 +1,5 @@ /*- - * dgb.c $Id: dgb.c,v 1.34 1998/04/21 21:06:22 brian Exp $ + * dgb.c $Id: dgb.c,v 1.35 1998/04/21 21:06:56 brian Exp $ * * Digiboard driver. * @@ -1567,7 +1567,7 @@ dgbpoll(unit_c) static int dgbioctl(dev, cmd, data, flag, p) dev_t dev; - int cmd; + u_long cmd; caddr_t data; int flag; struct proc *p; diff --git a/sys/i386/apm/apm.c b/sys/i386/apm/apm.c index 73e43c0..89e127f 100644 --- a/sys/i386/apm/apm.c +++ b/sys/i386/apm/apm.c @@ -15,7 +15,7 @@ * * Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) * - * $Id: apm.c,v 1.70 1998/03/30 09:47:57 phk Exp $ + * $Id: apm.c,v 1.71 1998/06/03 01:59:32 msmith Exp $ */ #include "opt_devfs.h" @@ -917,7 +917,7 @@ apmclose(dev_t dev, int flag, int fmt, struct proc *p) } static int -apmioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p) +apmioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) { struct apm_softc *sc = &apm_softc; int error = 0; diff --git a/sys/i386/bios/apm.c b/sys/i386/bios/apm.c index 73e43c0..89e127f 100644 --- a/sys/i386/bios/apm.c +++ b/sys/i386/bios/apm.c @@ -15,7 +15,7 @@ * * Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) * - * $Id: apm.c,v 1.70 1998/03/30 09:47:57 phk Exp $ + * $Id: apm.c,v 1.71 1998/06/03 01:59:32 msmith Exp $ */ #include "opt_devfs.h" @@ -917,7 +917,7 @@ apmclose(dev_t dev, int flag, int fmt, struct proc *p) } static int -apmioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p) +apmioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) { struct apm_softc *sc = &apm_softc; int error = 0; diff --git a/sys/i386/i386/cons.c b/sys/i386/i386/cons.c index a90283a..fceb4dd 100644 --- a/sys/i386/i386/cons.c +++ b/sys/i386/i386/cons.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)cons.c 7.2 (Berkeley) 5/9/91 - * $Id: cons.c,v 1.56 1998/01/24 02:54:12 eivind Exp $ + * $Id: cons.c,v 1.57 1998/03/28 10:32:56 bde Exp $ */ #include "opt_devfs.h" @@ -352,7 +352,7 @@ cnwrite(dev, uio, flag) static int cnioctl(dev, cmd, data, flag, p) dev_t dev; - int cmd; + u_long cmd; caddr_t data; int flag; struct proc *p; diff --git a/sys/i386/i386/db_interface.c b/sys/i386/i386/db_interface.c index 513c97e..1889d0a 100644 --- a/sys/i386/i386/db_interface.c +++ b/sys/i386/i386/db_interface.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_interface.c,v 1.37 1997/10/27 17:23:12 bde Exp $ + * $Id: db_interface.c,v 1.38 1997/11/20 18:09:36 bde Exp $ */ /* @@ -213,7 +213,7 @@ kdb_trap(type, code, regs) void db_read_bytes(addr, size, data) vm_offset_t addr; - register int size; + register size_t size; register char *data; { register char *src; @@ -233,7 +233,7 @@ db_read_bytes(addr, size, data) void db_write_bytes(addr, size, data) vm_offset_t addr; - register int size; + register size_t size; register char *data; { register char *dst; diff --git a/sys/i386/i386/db_trace.c b/sys/i386/i386/db_trace.c index 7dec82b..ed3ccd7 100644 --- a/sys/i386/i386/db_trace.c +++ b/sys/i386/i386/db_trace.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_trace.c,v 1.26 1997/10/27 17:23:18 bde Exp $ + * $Id: db_trace.c,v 1.27 1997/11/20 18:24:52 bde Exp $ */ #include <sys/param.h> @@ -44,24 +44,24 @@ * Machine register set. */ struct db_variable db_regs[] = { - "cs", (int *)&ddb_regs.tf_cs, FCN_NULL, - "ds", (int *)&ddb_regs.tf_ds, FCN_NULL, - "es", (int *)&ddb_regs.tf_es, FCN_NULL, + "cs", (long *)&ddb_regs.tf_cs, FCN_NULL, + "ds", (long *)&ddb_regs.tf_ds, FCN_NULL, + "es", (long *)&ddb_regs.tf_es, FCN_NULL, #if 0 - "fs", (int *)&ddb_regs.tf_fs, FCN_NULL, - "gs", (int *)&ddb_regs.tf_gs, FCN_NULL, + "fs", (long *)&ddb_regs.tf_fs, FCN_NULL, + "gs", (long *)&ddb_regs.tf_gs, FCN_NULL, #endif - "ss", (int *)&ddb_regs.tf_ss, FCN_NULL, - "eax", (int *)&ddb_regs.tf_eax, FCN_NULL, - "ecx", (int *)&ddb_regs.tf_ecx, FCN_NULL, - "edx", (int *)&ddb_regs.tf_edx, FCN_NULL, - "ebx", (int *)&ddb_regs.tf_ebx, FCN_NULL, - "esp", (int *)&ddb_regs.tf_esp,FCN_NULL, - "ebp", (int *)&ddb_regs.tf_ebp, FCN_NULL, - "esi", (int *)&ddb_regs.tf_esi, FCN_NULL, - "edi", (int *)&ddb_regs.tf_edi, FCN_NULL, - "eip", (int *)&ddb_regs.tf_eip, FCN_NULL, - "efl", (int *)&ddb_regs.tf_eflags, FCN_NULL, + "ss", (long *)&ddb_regs.tf_ss, FCN_NULL, + "eax", (long *)&ddb_regs.tf_eax, FCN_NULL, + "ecx", (long *)&ddb_regs.tf_ecx, FCN_NULL, + "edx", (long *)&ddb_regs.tf_edx, FCN_NULL, + "ebx", (long *)&ddb_regs.tf_ebx, FCN_NULL, + "esp", (long *)&ddb_regs.tf_esp,FCN_NULL, + "ebp", (long *)&ddb_regs.tf_ebp, FCN_NULL, + "esi", (long *)&ddb_regs.tf_esi, FCN_NULL, + "edi", (long *)&ddb_regs.tf_edi, FCN_NULL, + "eip", (long *)&ddb_regs.tf_eip, FCN_NULL, + "efl", (long *)&ddb_regs.tf_eflags, FCN_NULL, }; struct db_variable *db_eregs = db_regs + sizeof(db_regs)/sizeof(db_regs[0]); diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index d57a2f0..331770d 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.297 1998/05/28 09:29:57 phk Exp $ + * $Id: machdep.c,v 1.298 1998/06/03 07:56:59 bde Exp $ */ #include "apm.h" @@ -1614,7 +1614,7 @@ f00f_hack(void *unused) { int ptrace_set_pc(p, addr) struct proc *p; - unsigned int addr; + unsigned long addr; { p->p_md.md_regs->tf_eip = addr; return (0); @@ -1653,7 +1653,7 @@ int ptrace_read_u_check(p, addr, len) int ptrace_write_u(p, off, data) struct proc *p; vm_offset_t off; - int data; + long data; { struct trapframe frame_copy; vm_offset_t min; diff --git a/sys/i386/i386/mem.c b/sys/i386/i386/mem.c index 14343de..8db7d3c 100644 --- a/sys/i386/i386/mem.c +++ b/sys/i386/i386/mem.c @@ -38,7 +38,7 @@ * * from: Utah $Hdr: mem.c 1.13 89/10/08$ * from: @(#)mem.c 7.2 (Berkeley) 5/9/91 - * $Id: mem.c,v 1.49 1998/01/24 02:54:13 eivind Exp $ + * $Id: mem.c,v 1.50 1998/03/12 09:14:18 bde Exp $ */ /* @@ -405,7 +405,7 @@ memmmap(dev_t dev, int offset, int nprot) static int mmioctl(dev, cmd, cmdarg, flags, p) dev_t dev; - int cmd; + u_long cmd; caddr_t cmdarg; int flags; struct proc *p; diff --git a/sys/i386/ibcs2/ibcs2_ioctl.c b/sys/i386/ibcs2/ibcs2_ioctl.c index 873ecc8..e285071 100644 --- a/sys/i386/ibcs2/ibcs2_ioctl.c +++ b/sys/i386/ibcs2/ibcs2_ioctl.c @@ -338,7 +338,7 @@ ibcs2_ioctl(p, uap) { struct filedesc *fdp = p->p_fd; struct file *fp; - int (*ctl) __P((struct file *, int, caddr_t, struct proc *)); + int (*ctl) __P((struct file *, u_long, caddr_t, struct proc *)); int error; if (SCARG(uap, fd) < 0 || SCARG(uap, fd) >= fdp->fd_nfiles || diff --git a/sys/i386/ibcs2/ibcs2_isc_sysent.c b/sys/i386/ibcs2/ibcs2_isc_sysent.c index 344dcab..51dab23 100644 --- a/sys/i386/ibcs2/ibcs2_isc_sysent.c +++ b/sys/i386/ibcs2/ibcs2_isc_sysent.c @@ -5,6 +5,8 @@ * created from Id: syscalls.isc,v 1.4 1997/04/09 15:44:44 bde Exp */ +#include "opt_compat.h" + #include <sys/param.h> #include <sys/sysent.h> #include <sys/sysproto.h> diff --git a/sys/i386/ibcs2/ibcs2_proto.h b/sys/i386/ibcs2/ibcs2_proto.h index 75ea03e..9f378dd 100644 --- a/sys/i386/ibcs2/ibcs2_proto.h +++ b/sys/i386/ibcs2/ibcs2_proto.h @@ -10,260 +10,265 @@ #include <sys/signal.h> +struct proc; + +#define PAD_(t) sizeof(register_t) <= sizeof(t) ? \ + 0 : sizeof(register_t) - sizeof(t) + struct ibcs2_read_args { - int fd; - char * buf; - u_int nbytes; + int fd; char fd_[PAD_(int)]; + char * buf; char buf_[PAD_(char *)]; + u_int nbytes; char nbytes_[PAD_(u_int)]; }; struct ibcs2_open_args { - char * path; - int flags; - int mode; + char * path; char path_[PAD_(char *)]; + int flags; char flags_[PAD_(int)]; + int mode; char mode_[PAD_(int)]; }; struct ibcs2_wait_args { - int a1; - int a2; - int a3; + int a1; char a1_[PAD_(int)]; + int a2; char a2_[PAD_(int)]; + int a3; char a3_[PAD_(int)]; }; struct ibcs2_creat_args { - char * path; - int mode; + char * path; char path_[PAD_(char *)]; + int mode; char mode_[PAD_(int)]; }; struct ibcs2_unlink_args { - char * path; + char * path; char path_[PAD_(char *)]; }; struct ibcs2_execv_args { - char * path; - char ** argp; + char * path; char path_[PAD_(char *)]; + char ** argp; char argp_[PAD_(char **)]; }; struct ibcs2_chdir_args { - char * path; + char * path; char path_[PAD_(char *)]; }; struct ibcs2_time_args { - ibcs2_time_t * tp; + ibcs2_time_t * tp; char tp_[PAD_(ibcs2_time_t *)]; }; struct ibcs2_mknod_args { - char * path; - int mode; - int dev; + char * path; char path_[PAD_(char *)]; + int mode; char mode_[PAD_(int)]; + int dev; char dev_[PAD_(int)]; }; struct ibcs2_chmod_args { - char * path; - int mode; + char * path; char path_[PAD_(char *)]; + int mode; char mode_[PAD_(int)]; }; struct ibcs2_chown_args { - char * path; - int uid; - int gid; + char * path; char path_[PAD_(char *)]; + int uid; char uid_[PAD_(int)]; + int gid; char gid_[PAD_(int)]; }; struct ibcs2_stat_args { - char * path; - struct ibcs2_stat * st; + char * path; char path_[PAD_(char *)]; + struct ibcs2_stat * st; char st_[PAD_(struct ibcs2_stat *)]; }; struct ibcs2_lseek_args { - int fd; - long offset; - int whence; + int fd; char fd_[PAD_(int)]; + long offset; char offset_[PAD_(long)]; + int whence; char whence_[PAD_(int)]; }; struct ibcs2_mount_args { - char * special; - char * dir; - int flags; - int fstype; - char * data; - int len; + char * special; char special_[PAD_(char *)]; + char * dir; char dir_[PAD_(char *)]; + int flags; char flags_[PAD_(int)]; + int fstype; char fstype_[PAD_(int)]; + char * data; char data_[PAD_(char *)]; + int len; char len_[PAD_(int)]; }; struct ibcs2_umount_args { - char * name; + char * name; char name_[PAD_(char *)]; }; struct ibcs2_setuid_args { - int uid; + int uid; char uid_[PAD_(int)]; }; struct ibcs2_stime_args { - long * timep; + long * timep; char timep_[PAD_(long *)]; }; struct ibcs2_alarm_args { - unsigned sec; + unsigned sec; char sec_[PAD_(unsigned)]; }; struct ibcs2_fstat_args { - int fd; - struct ibcs2_stat * st; + int fd; char fd_[PAD_(int)]; + struct ibcs2_stat * st; char st_[PAD_(struct ibcs2_stat *)]; }; struct ibcs2_pause_args { - int dummy; + register_t dummy; }; struct ibcs2_utime_args { - char * path; - struct ibcs2_utimbuf * buf; + char * path; char path_[PAD_(char *)]; + struct ibcs2_utimbuf * buf; char buf_[PAD_(struct ibcs2_utimbuf *)]; }; struct ibcs2_stty_args { - int fd; - struct sgttyb * buf; + int fd; char fd_[PAD_(int)]; + struct sgttyb * buf; char buf_[PAD_(struct sgttyb *)]; }; struct ibcs2_gtty_args { - int fd; - struct sgttyb * buf; + int fd; char fd_[PAD_(int)]; + struct sgttyb * buf; char buf_[PAD_(struct sgttyb *)]; }; struct ibcs2_access_args { - char * path; - int flags; + char * path; char path_[PAD_(char *)]; + int flags; char flags_[PAD_(int)]; }; struct ibcs2_nice_args { - int incr; + int incr; char incr_[PAD_(int)]; }; struct ibcs2_statfs_args { - char * path; - struct ibcs2_statfs * buf; - int len; - int fstype; + char * path; char path_[PAD_(char *)]; + struct ibcs2_statfs * buf; char buf_[PAD_(struct ibcs2_statfs *)]; + int len; char len_[PAD_(int)]; + int fstype; char fstype_[PAD_(int)]; }; struct ibcs2_kill_args { - int pid; - int signo; + int pid; char pid_[PAD_(int)]; + int signo; char signo_[PAD_(int)]; }; struct ibcs2_fstatfs_args { - int fd; - struct ibcs2_statfs * buf; - int len; - int fstype; + int fd; char fd_[PAD_(int)]; + struct ibcs2_statfs * buf; char buf_[PAD_(struct ibcs2_statfs *)]; + int len; char len_[PAD_(int)]; + int fstype; char fstype_[PAD_(int)]; }; struct ibcs2_pgrpsys_args { - int type; - caddr_t dummy; - int pid; - int pgid; + int type; char type_[PAD_(int)]; + caddr_t dummy; char dummy_[PAD_(caddr_t)]; + int pid; char pid_[PAD_(int)]; + int pgid; char pgid_[PAD_(int)]; }; struct ibcs2_xenix_args { - int a1; - int a2; - int a3; - int a4; - int a5; + int a1; char a1_[PAD_(int)]; + int a2; char a2_[PAD_(int)]; + int a3; char a3_[PAD_(int)]; + int a4; char a4_[PAD_(int)]; + int a5; char a5_[PAD_(int)]; }; struct ibcs2_times_args { - struct tms * tp; + struct tms * tp; char tp_[PAD_(struct tms *)]; }; struct ibcs2_plock_args { - int cmd; + int cmd; char cmd_[PAD_(int)]; }; struct ibcs2_setgid_args { - int gid; + int gid; char gid_[PAD_(int)]; }; struct ibcs2_sigsys_args { - int sig; - ibcs2_sig_t fp; + int sig; char sig_[PAD_(int)]; + ibcs2_sig_t fp; char fp_[PAD_(ibcs2_sig_t)]; }; struct ibcs2_msgsys_args { - int which; - int a2; - int a3; - int a4; - int a5; - int a6; + int which; char which_[PAD_(int)]; + int a2; char a2_[PAD_(int)]; + int a3; char a3_[PAD_(int)]; + int a4; char a4_[PAD_(int)]; + int a5; char a5_[PAD_(int)]; + int a6; char a6_[PAD_(int)]; }; struct ibcs2_sysi86_args { - int cmd; - int * arg; + int cmd; char cmd_[PAD_(int)]; + int * arg; char arg_[PAD_(int *)]; }; struct ibcs2_shmsys_args { - int which; - int a2; - int a3; - int a4; + int which; char which_[PAD_(int)]; + int a2; char a2_[PAD_(int)]; + int a3; char a3_[PAD_(int)]; + int a4; char a4_[PAD_(int)]; }; struct ibcs2_semsys_args { - int which; - int a2; - int a3; - int a4; - int a5; + int which; char which_[PAD_(int)]; + int a2; char a2_[PAD_(int)]; + int a3; char a3_[PAD_(int)]; + int a4; char a4_[PAD_(int)]; + int a5; char a5_[PAD_(int)]; }; struct ibcs2_ioctl_args { - int fd; - int cmd; - caddr_t data; + int fd; char fd_[PAD_(int)]; + int cmd; char cmd_[PAD_(int)]; + caddr_t data; char data_[PAD_(caddr_t)]; }; struct ibcs2_uadmin_args { - int cmd; - int func; - caddr_t data; + int cmd; char cmd_[PAD_(int)]; + int func; char func_[PAD_(int)]; + caddr_t data; char data_[PAD_(caddr_t)]; }; struct ibcs2_utssys_args { - int a1; - int a2; - int flag; + int a1; char a1_[PAD_(int)]; + int a2; char a2_[PAD_(int)]; + int flag; char flag_[PAD_(int)]; }; struct ibcs2_execve_args { - char * path; - char ** argp; - char ** envp; + char * path; char path_[PAD_(char *)]; + char ** argp; char argp_[PAD_(char **)]; + char ** envp; char envp_[PAD_(char **)]; }; struct ibcs2_fcntl_args { - int fd; - int cmd; - char * arg; + int fd; char fd_[PAD_(int)]; + int cmd; char cmd_[PAD_(int)]; + char * arg; char arg_[PAD_(char *)]; }; struct ibcs2_ulimit_args { - int cmd; - int newlimit; + int cmd; char cmd_[PAD_(int)]; + int newlimit; char newlimit_[PAD_(int)]; }; struct ibcs2_rmdir_args { - char * path; + char * path; char path_[PAD_(char *)]; }; struct ibcs2_mkdir_args { - char * path; - int mode; + char * path; char path_[PAD_(char *)]; + int mode; char mode_[PAD_(int)]; }; struct ibcs2_getdents_args { - int fd; - char * buf; - int nbytes; + int fd; char fd_[PAD_(int)]; + char * buf; char buf_[PAD_(char *)]; + int nbytes; char nbytes_[PAD_(int)]; }; struct ibcs2_sysfs_args { - int cmd; - caddr_t d1; - char * buf; + int cmd; char cmd_[PAD_(int)]; + caddr_t d1; char d1_[PAD_(caddr_t)]; + char * buf; char buf_[PAD_(char *)]; }; struct ibcs2_getmsg_args { - int fd; - struct ibcs2_stropts * ctl; - struct ibcs2_stropts * dat; - int * flags; + int fd; char fd_[PAD_(int)]; + struct ibcs2_stropts * ctl; char ctl_[PAD_(struct ibcs2_stropts *)]; + struct ibcs2_stropts * dat; char dat_[PAD_(struct ibcs2_stropts *)]; + int * flags; char flags_[PAD_(int *)]; }; struct ibcs2_putmsg_args { - int fd; - struct ibcs2_stropts * ctl; - struct ibcs2_stropts * dat; - int flags; + int fd; char fd_[PAD_(int)]; + struct ibcs2_stropts * ctl; char ctl_[PAD_(struct ibcs2_stropts *)]; + struct ibcs2_stropts * dat; char dat_[PAD_(struct ibcs2_stropts *)]; + int flags; char flags_[PAD_(int)]; }; struct ibcs2_poll_args { - struct ibcs2_poll * fds; - long nfds; - int timeout; + struct ibcs2_poll * fds; char fds_[PAD_(struct ibcs2_poll *)]; + long nfds; char nfds_[PAD_(long)]; + int timeout; char timeout_[PAD_(int)]; }; struct ibcs2_secure_args { - int cmd; - int a1; - int a2; - int a3; - int a4; - int a5; + int cmd; char cmd_[PAD_(int)]; + int a1; char a1_[PAD_(int)]; + int a2; char a2_[PAD_(int)]; + int a3; char a3_[PAD_(int)]; + int a4; char a4_[PAD_(int)]; + int a5; char a5_[PAD_(int)]; }; struct ibcs2_symlink_args { - char * path; - char * link; + char * path; char path_[PAD_(char *)]; + char * link; char link_[PAD_(char *)]; }; struct ibcs2_lstat_args { - char * path; - struct ibcs2_stat * st; + char * path; char path_[PAD_(char *)]; + struct ibcs2_stat * st; char st_[PAD_(struct ibcs2_stat *)]; }; struct ibcs2_readlink_args { - char * path; - char * buf; - int count; + char * path; char path_[PAD_(char *)]; + char * buf; char buf_[PAD_(char *)]; + int count; char count_[PAD_(int)]; }; struct ibcs2_isc_args { - int dummy; + register_t dummy; }; int ibcs2_read __P((struct proc *, struct ibcs2_read_args *)); int ibcs2_open __P((struct proc *, struct ibcs2_open_args *)); @@ -327,4 +332,6 @@ int ibcs2_isc __P((struct proc *, struct ibcs2_isc_args *)); #endif /* COMPAT_43 */ +#undef PAD_ + #endif /* !_IBCS2_SYSPROTO_H_ */ diff --git a/sys/i386/ibcs2/ibcs2_sysent.c b/sys/i386/ibcs2/ibcs2_sysent.c index f011ec6..175b734 100644 --- a/sys/i386/ibcs2/ibcs2_sysent.c +++ b/sys/i386/ibcs2/ibcs2_sysent.c @@ -5,6 +5,8 @@ * created from Id: syscalls.master,v 1.8 1997/04/09 15:44:46 bde Exp */ +#include "opt_compat.h" + #include <sys/param.h> #include <sys/sysent.h> #include <sys/sysproto.h> diff --git a/sys/i386/ibcs2/ibcs2_xenix.h b/sys/i386/ibcs2/ibcs2_xenix.h index df0568e..f83f268 100644 --- a/sys/i386/ibcs2/ibcs2_xenix.h +++ b/sys/i386/ibcs2/ibcs2_xenix.h @@ -10,67 +10,72 @@ #include <sys/signal.h> +struct proc; + +#define PAD_(t) sizeof(register_t) <= sizeof(t) ? \ + 0 : sizeof(register_t) - sizeof(t) + struct xenix_rdchk_args { - int fd; + int fd; char fd_[PAD_(int)]; }; struct xenix_chsize_args { - int fd; - long size; + int fd; char fd_[PAD_(int)]; + long size; char size_[PAD_(long)]; }; struct xenix_ftime_args { - struct timeb * tp; + struct timeb * tp; char tp_[PAD_(struct timeb *)]; }; struct xenix_nap_args { - int millisec; + int millisec; char millisec_[PAD_(int)]; }; struct xenix_scoinfo_args { - int dummy; + register_t dummy; }; struct xenix_eaccess_args { - char * path; - int flags; + char * path; char path_[PAD_(char *)]; + int flags; char flags_[PAD_(int)]; }; struct ibcs2_sigaction_args { - int sig; - struct ibcs2_sigaction * act; - struct ibcs2_sigaction * oact; + int sig; char sig_[PAD_(int)]; + struct ibcs2_sigaction * act; char act_[PAD_(struct ibcs2_sigaction *)]; + struct ibcs2_sigaction * oact; char oact_[PAD_(struct ibcs2_sigaction *)]; }; struct ibcs2_sigprocmask_args { - int how; - ibcs2_sigset_t * set; - ibcs2_sigset_t * oset; + int how; char how_[PAD_(int)]; + ibcs2_sigset_t * set; char set_[PAD_(ibcs2_sigset_t *)]; + ibcs2_sigset_t * oset; char oset_[PAD_(ibcs2_sigset_t *)]; }; struct ibcs2_sigpending_args { - ibcs2_sigset_t * mask; + ibcs2_sigset_t * mask; char mask_[PAD_(ibcs2_sigset_t *)]; }; struct ibcs2_sigsuspend_args { - ibcs2_sigset_t * mask; + ibcs2_sigset_t * mask; char mask_[PAD_(ibcs2_sigset_t *)]; }; struct ibcs2_getgroups_args { - int gidsetsize; - ibcs2_gid_t * gidset; + int gidsetsize; char gidsetsize_[PAD_(int)]; + ibcs2_gid_t * gidset; char gidset_[PAD_(ibcs2_gid_t *)]; }; struct ibcs2_setgroups_args { - int gidsetsize; - ibcs2_gid_t * gidset; + int gidsetsize; char gidsetsize_[PAD_(int)]; + ibcs2_gid_t * gidset; char gidset_[PAD_(ibcs2_gid_t *)]; }; struct ibcs2_sysconf_args { - int name; + int name; char name_[PAD_(int)]; }; struct ibcs2_pathconf_args { - char * path; - int name; + char * path; char path_[PAD_(char *)]; + int name; char name_[PAD_(int)]; }; struct ibcs2_fpathconf_args { - int fd; - int name; + int fd; char fd_[PAD_(int)]; + int name; char name_[PAD_(int)]; }; struct ibcs2_rename_args { - char * from; - char * to; + char * from; char from_[PAD_(char *)]; + char * to; char to_[PAD_(char *)]; }; struct xenix_utsname_args { - long addr; + long addr; char addr_[PAD_(long)]; }; int xenix_rdchk __P((struct proc *, struct xenix_rdchk_args *)); int xenix_chsize __P((struct proc *, struct xenix_chsize_args *)); @@ -90,4 +95,11 @@ int ibcs2_fpathconf __P((struct proc *, struct ibcs2_fpathconf_args *)); int ibcs2_rename __P((struct proc *, struct ibcs2_rename_args *)); int xenix_utsname __P((struct proc *, struct xenix_utsname_args *)); +#ifdef COMPAT_43 + + +#endif /* COMPAT_43 */ + +#undef PAD_ + #endif /* !_IBCS2_XENIX_H_ */ diff --git a/sys/i386/ibcs2/ibcs2_xenix_sysent.c b/sys/i386/ibcs2/ibcs2_xenix_sysent.c index c8804fe..eb81543 100644 --- a/sys/i386/ibcs2/ibcs2_xenix_sysent.c +++ b/sys/i386/ibcs2/ibcs2_xenix_sysent.c @@ -5,6 +5,8 @@ * created from Id: syscalls.xenix,v 1.5 1997/04/09 15:44:47 bde Exp */ +#include "opt_compat.h" + #include <sys/param.h> #include <sys/sysent.h> #include <sys/sysproto.h> diff --git a/sys/i386/ibcs2/syscalls.conf b/sys/i386/ibcs2/syscalls.conf index 4474f6e..ebdaa97 100644 --- a/sys/i386/ibcs2/syscalls.conf +++ b/sys/i386/ibcs2/syscalls.conf @@ -1,8 +1,9 @@ -# syscalls.conf $Id$ +# syscalls.conf $Id: syscalls.conf,v 1.4 1997/02/22 09:33:32 peter Exp $ sysnames="/dev/null" sysproto="ibcs2_proto.h" sysproto_h=_IBCS2_SYSPROTO_H_ syshdr="ibcs2_syscall.h" +sysmk="/dev/null" syssw="ibcs2_sysent.c" syshide="/dev/null" syscallprefix="IBCS2_SYS_" diff --git a/sys/i386/ibcs2/syscalls.isc.conf b/sys/i386/ibcs2/syscalls.isc.conf index fc52716..90e30ff 100644 --- a/sys/i386/ibcs2/syscalls.isc.conf +++ b/sys/i386/ibcs2/syscalls.isc.conf @@ -1,9 +1,10 @@ -# syscalls.conf $Id$ +# syscalls.conf $Id: syscalls.isc.conf,v 1.3 1997/02/22 09:33:37 peter Exp $ sysnames="/dev/null" #sysproto="ibcs2_isc.h" sysproto="/dev/null" sysproto_h=_IBCS2_ISC_H_ syshdr="ibcs2_isc_syscall.h" +sysmk="/dev/null" syssw="ibcs2_isc_sysent.c" syshide="/dev/null" syscallprefix="IBCS2_ISC_" diff --git a/sys/i386/ibcs2/syscalls.xenix.conf b/sys/i386/ibcs2/syscalls.xenix.conf index 742080e..4b4af8b 100644 --- a/sys/i386/ibcs2/syscalls.xenix.conf +++ b/sys/i386/ibcs2/syscalls.xenix.conf @@ -1,8 +1,9 @@ -# syscalls.conf $Id$ +# syscalls.conf $Id: syscalls.xenix.conf,v 1.3 1997/02/22 09:33:40 peter Exp $ sysnames="/dev/null" sysproto="ibcs2_xenix.h" sysproto_h=_IBCS2_XENIX_H_ syshdr="ibcs2_xenix_syscall.h" +sysmk="/dev/null" syssw="ibcs2_xenix_sysent.c" syshide="/dev/null" syscallprefix="IBCS2_XENIX_" diff --git a/sys/i386/isa/alog.c b/sys/i386/isa/alog.c index eeb6c96..8fbe576 100644 --- a/sys/i386/isa/alog.c +++ b/sys/i386/isa/alog.c @@ -193,7 +193,7 @@ static int sync_clock2 (int unit, long period); /* setup clock 2 period */ static int putfifo (talog_chan *pchan, u_short fifoent); static int alog_open (dev_t dev, int oflags, int devtype, struct proc *p); static int alog_close (dev_t dev, int fflag, int devtype, struct proc *p); -static int alog_ioctl (dev_t dev, int cmd, caddr_t data, +static int alog_ioctl (dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p); static int alog_read (dev_t dev, struct uio *uio, int ioflag); static int alog_poll (dev_t dev, int events, struct proc *p); @@ -215,7 +215,7 @@ struct isa_driver alogdriver = { alog_probe, alog_attach, "alog", 0 }; /* handle the ioctls */ -static int alog_ioctl (dev_t dev, int cmd, caddr_t data, +static int alog_ioctl (dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p) { int unit = UNIT(dev); diff --git a/sys/i386/isa/asc.c b/sys/i386/isa/asc.c index cd40df4..7f788d7 100644 --- a/sys/i386/isa/asc.c +++ b/sys/i386/isa/asc.c @@ -34,7 +34,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* - * $Id: asc.c,v 1.28 1998/01/24 02:54:15 eivind Exp $ + * $Id: asc.c,v 1.29 1998/03/28 10:32:59 bde Exp $ */ #include "asc.h" @@ -831,7 +831,7 @@ ascread(dev_t dev, struct uio *uio, int ioflag) ***/ STATIC int -ascioctl(dev_t dev, int cmd, caddr_t data, int flags, struct proc *p) +ascioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p) { int unit = UNIT(minor(dev)); struct asc_unit *scu = unittab + unit; diff --git a/sys/i386/isa/b004.c b/sys/i386/isa/b004.c index 7cacaf1..5a9357d 100644 --- a/sys/i386/isa/b004.c +++ b/sys/i386/isa/b004.c @@ -487,7 +487,7 @@ bqupoll(dev_t dev, int events, struct proc *p) */ static int -bquioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p) +bquioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) { unsigned int dev_min = minor(dev) & 7; int result = 0; diff --git a/sys/i386/isa/ctx.c b/sys/i386/isa/ctx.c index 92b48b8..c16e636 100644 --- a/sys/i386/isa/ctx.c +++ b/sys/i386/isa/ctx.c @@ -8,7 +8,7 @@ * of this software, nor does the author assume any responsibility * for damages incurred with its use. * - * $Id: ctx.c,v 1.25 1997/07/20 14:09:52 bde Exp $ + * $Id: ctx.c,v 1.26 1998/01/24 02:54:17 eivind Exp $ */ /* @@ -360,7 +360,7 @@ ctxread(dev_t dev, struct uio * uio, int ioflag) } static int -ctxioctl(dev_t dev, int cmd, caddr_t data, int flags, struct proc *p) +ctxioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p) { int error; int unit, i; diff --git a/sys/i386/isa/cx.c b/sys/i386/isa/cx.c index d40f3e7..4a8d144 100644 --- a/sys/i386/isa/cx.c +++ b/sys/i386/isa/cx.c @@ -295,7 +295,7 @@ int cxwrite (dev_t dev, struct uio *uio, int flag) return ((*linesw[tp->t_line].l_write) (tp, uio, flag)); } -int cxioctl (dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) +int cxioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) { int unit = UNIT (dev); cx_chan_t *c, *m; diff --git a/sys/i386/isa/cy.c b/sys/i386/isa/cy.c index 5dd4762..04a0a1c 100644 --- a/sys/i386/isa/cy.c +++ b/sys/i386/isa/cy.c @@ -27,7 +27,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: cy.c,v 1.61 1998/02/13 12:45:47 phk Exp $ + * $Id: cy.c,v 1.62 1998/03/18 20:52:28 dg Exp $ */ #include "opt_compat.h" @@ -1383,7 +1383,7 @@ siointr1(com) static int sioioctl(dev, cmd, data, flag, p) dev_t dev; - int cmd; + u_long cmd; caddr_t data; int flag; struct proc *p; diff --git a/sys/i386/isa/fd.c b/sys/i386/isa/fd.c index 5445b3f..5a9d93c 100644 --- a/sys/i386/isa/fd.c +++ b/sys/i386/isa/fd.c @@ -43,7 +43,7 @@ * SUCH DAMAGE. * * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 - * $Id: fd.c,v 1.111 1998/05/06 22:14:41 julian Exp $ + * $Id: fd.c,v 1.112 1998/05/06 23:35:36 julian Exp $ * */ @@ -2040,7 +2040,7 @@ fdformat(dev, finfo, p) static int fdioctl(dev, cmd, addr, flag, p) dev_t dev; - int cmd; + u_long cmd; caddr_t addr; int flag; struct proc *p; diff --git a/sys/i386/isa/gpib.c b/sys/i386/isa/gpib.c index 61f651b7..b03b712 100644 --- a/sys/i386/isa/gpib.c +++ b/sys/i386/isa/gpib.c @@ -387,7 +387,7 @@ gpwrite(dev, uio, ioflag) write to using a minor device = its GPIB address */ static int -gpioctl(dev_t dev, int cmd, caddr_t data, int flags, struct proc *p) +gpioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p) { struct gpibdata *gd = (struct gpibdata *)data; int error,result; diff --git a/sys/i386/isa/gsc.c b/sys/i386/isa/gsc.c index 966249f..44a97ea 100644 --- a/sys/i386/isa/gsc.c +++ b/sys/i386/isa/gsc.c @@ -742,7 +742,7 @@ gscread (dev_t dev, struct uio *uio, int ioflag) */ static int -gscioctl (dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) +gscioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) { int unit = UNIT(minor(dev)); struct gsc_unit *scu = unittab + unit; diff --git a/sys/i386/isa/if_ar.c b/sys/i386/isa/if_ar.c index 53c4b20..72704e1 100644 --- a/sys/i386/isa/if_ar.c +++ b/sys/i386/isa/if_ar.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ar.c,v 1.17 1998/01/08 23:40:37 eivind Exp $ + * $Id: if_ar.c,v 1.18 1998/04/17 22:36:33 des Exp $ */ /* @@ -181,7 +181,7 @@ struct isa_driver ardriver = {arprobe, arattach, "arc"}; static void ar_xmit(struct ar_softc *sc); static void arstart(struct ifnet *ifp); -static int arioctl(struct ifnet *ifp, int cmd, caddr_t data); +static int arioctl(struct ifnet *ifp, u_long cmd, caddr_t data); static void arwatchdog(struct ifnet *ifp); static int ar_packet_avail(struct ar_softc *sc, int *len, u_char *rxstat); static void ar_copy_rxbuf(struct mbuf *m, struct ar_softc *sc, int len); @@ -597,7 +597,7 @@ top_arstart: } static int -arioctl(struct ifnet *ifp, int cmd, caddr_t data) +arioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { int s, error; int was_up, should_be_up; diff --git a/sys/i386/isa/if_cx.c b/sys/i386/isa/if_cx.c index 01f58f7..ded05ec 100644 --- a/sys/i386/isa/if_cx.c +++ b/sys/i386/isa/if_cx.c @@ -83,7 +83,7 @@ static int cxtinth __P((cx_chan_t *c)); #define IFSTRUCTSZ (sizeof (struct sppp)) #define IFNETSZ (sizeof (struct ifnet)) -static int cxsioctl (struct ifnet *ifp, int cmd, caddr_t data); +static int cxsioctl (struct ifnet *ifp, u_long cmd, caddr_t data); static void cxstart (struct ifnet *ifp); static void cxwatchdog (struct ifnet *ifp); static void cxinput (cx_chan_t *c, void *buf, unsigned len); @@ -316,7 +316,7 @@ struct isa_driver cxdriver = { cxprobe, cxattach, "cx" }; * Process an ioctl request. */ static int -cxsioctl (struct ifnet *ifp, int cmd, caddr_t data) +cxsioctl (struct ifnet *ifp, u_long cmd, caddr_t data) { cx_chan_t *q, *c = ifp->if_softc; int error, s, was_up, should_be_up; diff --git a/sys/i386/isa/if_ed.c b/sys/i386/isa/if_ed.c index 3e15d49..d670bf2 100644 --- a/sys/i386/isa/if_ed.c +++ b/sys/i386/isa/if_ed.c @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ed.c,v 1.139 1998/04/15 17:45:15 bde Exp $ + * $Id: if_ed.c,v 1.140 1998/04/17 22:36:34 des Exp $ */ /* @@ -139,7 +139,7 @@ static int ed_attach __P((struct ed_softc *, int, int)); static int ed_attach_isa __P((struct isa_device *)); static void ed_init __P((void *)); -static int ed_ioctl __P((struct ifnet *, int, caddr_t)); +static int ed_ioctl __P((struct ifnet *, u_long, caddr_t)); static int ed_probe __P((struct isa_device *)); static void ed_start __P((struct ifnet *)); static void ed_reset __P((struct ifnet *)); @@ -2582,7 +2582,7 @@ edintr(unit) static int ed_ioctl(ifp, command, data) register struct ifnet *ifp; - int command; + u_long command; caddr_t data; { struct ed_softc *sc = ifp->if_softc; diff --git a/sys/i386/isa/if_eg.c b/sys/i386/isa/if_eg.c index 7500016..7f68aa6 100644 --- a/sys/i386/isa/if_eg.c +++ b/sys/i386/isa/if_eg.c @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_eg.c,v 1.26 1998/01/08 23:40:47 eivind Exp $ + * $Id: if_eg.c,v 1.27 1998/03/28 13:23:56 bde Exp $ * * Support for 3Com 3c505 Etherlink+ card. */ @@ -104,7 +104,7 @@ static int egreadPCBready __P((struct eg_softc *sc)); static int egwritePCB __P((struct eg_softc *sc)); static int egreadPCB __P((struct eg_softc *sc)); static void eginit __P((struct eg_softc *sc)); -static int egioctl (struct ifnet *, int, caddr_t); +static int egioctl (struct ifnet *, u_long, caddr_t); static void egrecv(struct eg_softc *); static void egstart(struct ifnet *); static void egread __P((struct eg_softc *, caddr_t, int)); @@ -699,7 +699,7 @@ egget(sc, buf, totlen) static int egioctl(ifp, command, data) register struct ifnet *ifp; - int command; + u_long command; caddr_t data; { struct eg_softc *sc = ifp->if_softc; diff --git a/sys/i386/isa/if_el.c b/sys/i386/isa/if_el.c index 2faef84..1fe6064 100644 --- a/sys/i386/isa/if_el.c +++ b/sys/i386/isa/if_el.c @@ -6,7 +6,7 @@ * * Questions, comments, bug reports and fixes to kimmel@cs.umass.edu. * - * $Id: if_el.c,v 1.34 1998/03/28 13:23:58 bde Exp $ + * $Id: if_el.c,v 1.35 1998/04/15 17:45:18 bde Exp $ */ /* Except of course for the portions of code lifted from other FreeBSD * drivers (mainly elread, elget and el_ioctl) @@ -75,7 +75,7 @@ static struct el_softc { /* Prototypes */ static int el_attach(struct isa_device *); static void el_init(int); -static int el_ioctl(struct ifnet *,int,caddr_t); +static int el_ioctl(struct ifnet *,u_long,caddr_t); static int el_probe(struct isa_device *); static void el_start(struct ifnet *); static void el_reset(int); @@ -645,7 +645,7 @@ elget(buf, totlen, off0, ifp) static int el_ioctl(ifp, command, data) register struct ifnet *ifp; - int command; + u_long command; caddr_t data; { register struct ifaddr *ifa = (struct ifaddr *)data; diff --git a/sys/i386/isa/if_ep.c b/sys/i386/isa/if_ep.c index 6e96c8f..9087bb5 100644 --- a/sys/i386/isa/if_ep.c +++ b/sys/i386/isa/if_ep.c @@ -38,7 +38,7 @@ */ /* - * $Id: if_ep.c,v 1.73 1998/02/27 05:38:30 msmith Exp $ + * $Id: if_ep.c,v 1.74 1998/03/28 13:24:01 bde Exp $ * * Promiscuous mode added and interrupt logic slightly changed * to reduce the number of adapter failures. Transceiver select @@ -116,7 +116,7 @@ static int eeprom_rdy __P((struct ep_softc *sc)); static int ep_isa_probe __P((struct isa_device *)); static struct ep_board * ep_look_for_board_at __P((struct isa_device *is)); static int ep_isa_attach __P((struct isa_device *)); -static int epioctl __P((struct ifnet * ifp, int, caddr_t)); +static int epioctl __P((struct ifnet * ifp, u_long, caddr_t)); static void epinit __P((struct ep_softc *)); static void epread __P((struct ep_softc *)); @@ -1197,7 +1197,7 @@ out: static int epioctl(ifp, cmd, data) register struct ifnet *ifp; - int cmd; + u_long cmd; caddr_t data; { register struct ifaddr *ifa = (struct ifaddr *) data; diff --git a/sys/i386/isa/if_ex.c b/sys/i386/isa/if_ex.c index 1f58a06..f64ef74 100644 --- a/sys/i386/isa/if_ex.c +++ b/sys/i386/isa/if_ex.c @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ex.c,v 1.10 1998/01/08 23:40:52 eivind Exp $ + * $Id: if_ex.c,v 1.11 1998/03/28 13:24:06 bde Exp $ */ /* @@ -119,7 +119,7 @@ static int ex_attach __P((struct isa_device *)); static void ex_init __P((void *)); static void ex_start __P((struct ifnet *)); static void ex_stop __P((int)); -static int ex_ioctl __P((struct ifnet *, int, caddr_t)); +static int ex_ioctl __P((struct ifnet *, u_long, caddr_t)); static void ex_reset __P((int)); static void ex_watchdog __P((struct ifnet *)); @@ -760,7 +760,7 @@ void ex_rx_intr(int unit) } -int ex_ioctl(register struct ifnet *ifp, int cmd, caddr_t data) +int ex_ioctl(register struct ifnet *ifp, u_long cmd, caddr_t data) { register struct ifaddr *ifa = (struct ifaddr *) data; struct ex_softc *sc = &ex_sc[ifp->if_unit]; diff --git a/sys/i386/isa/if_fe.c b/sys/i386/isa/if_fe.c index 81a4b72..8fae123 100644 --- a/sys/i386/isa/if_fe.c +++ b/sys/i386/isa/if_fe.c @@ -21,7 +21,7 @@ */ /* - * $Id: if_fe.c,v 1.39 1998/02/27 06:39:31 msmith Exp $ + * $Id: if_fe.c,v 1.40 1998/03/28 13:24:09 bde Exp $ * * Device driver for Fujitsu MB86960A/MB86965A based Ethernet cards. * To be used with FreeBSD 2.x @@ -239,7 +239,7 @@ static struct fe_softc { static int fe_probe ( struct isa_device * ); static int fe_attach ( struct isa_device * ); static void fe_init ( int ); -static int fe_ioctl ( struct ifnet *, int, caddr_t ); +static int fe_ioctl ( struct ifnet *, u_long, caddr_t ); static void fe_start ( struct ifnet * ); static void fe_reset ( int ); static void fe_watchdog ( struct ifnet * ); @@ -2471,7 +2471,7 @@ feintr ( int unit ) * pretty ugly. */ static int -fe_ioctl ( struct ifnet * ifp, int command, caddr_t data ) +fe_ioctl ( struct ifnet * ifp, u_long command, caddr_t data ) { struct fe_softc *sc = ifp->if_softc; int s, error = 0; diff --git a/sys/i386/isa/if_ie.c b/sys/i386/isa/if_ie.c index a34f11d..0e96d6f 100644 --- a/sys/i386/isa/if_ie.c +++ b/sys/i386/isa/if_ie.c @@ -47,7 +47,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ie.c,v 1.51 1998/03/28 13:24:13 bde Exp $ + * $Id: if_ie.c,v 1.52 1998/04/15 17:45:20 bde Exp $ */ /* @@ -184,7 +184,7 @@ static int ee16_probe(struct isa_device * dvp); static int check_ie_present(int unit, caddr_t where, unsigned size); static void ieinit(int unit); static void ie_stop(int unit); -static int ieioctl(struct ifnet * ifp, int command, caddr_t data); +static int ieioctl(struct ifnet * ifp, u_long command, caddr_t data); static void iestart(struct ifnet * ifp); static void el_reset_586(int unit); @@ -2251,7 +2251,7 @@ ie_stop(int unit) } static int -ieioctl(struct ifnet *ifp, int command, caddr_t data) +ieioctl(struct ifnet *ifp, u_long command, caddr_t data) { struct ifaddr *ifa = (struct ifaddr *) data; struct ie_softc *ie = ifp->if_softc; diff --git a/sys/i386/isa/if_le.c b/sys/i386/isa/if_le.c index 3481903..67e175e 100644 --- a/sys/i386/isa/if_le.c +++ b/sys/i386/isa/if_le.c @@ -21,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_le.c,v 1.43 1998/01/08 23:40:58 eivind Exp $ + * $Id: if_le.c,v 1.44 1998/03/28 13:24:17 bde Exp $ */ /* @@ -241,7 +241,7 @@ struct le_softc { static int le_probe(struct isa_device *dvp); static int le_attach(struct isa_device *dvp); -static int le_ioctl(struct ifnet *ifp, int command, caddr_t data); +static int le_ioctl(struct ifnet *ifp, u_long command, caddr_t data); static void le_input(le_softc_t *sc, caddr_t seg1, size_t total_len, size_t len2, caddr_t seg2); static void le_multi_filter(le_softc_t *sc); @@ -504,7 +504,7 @@ le_input( static int le_ioctl( struct ifnet *ifp, - int cmd, + u_long cmd, caddr_t data) { le_softc_t *sc = ifp->if_softc; diff --git a/sys/i386/isa/if_lnc.c b/sys/i386/isa/if_lnc.c index eb1c4fe..bff5d17 100644 --- a/sys/i386/isa/if_lnc.c +++ b/sys/i386/isa/if_lnc.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_lnc.c,v 1.41 1998/05/27 09:59:13 paul Exp $ + * $Id: if_lnc.c,v 1.42 1998/05/27 11:05:17 paul Exp $ */ /* @@ -175,7 +175,7 @@ static void lnc_init __P((struct lnc_softc *sc)); static __inline int mbuf_to_buffer __P((struct mbuf *m, char *buffer)); static __inline struct mbuf *chain_to_cluster __P((struct mbuf *m)); static void lnc_start __P((struct ifnet *ifp)); -static int lnc_ioctl __P((struct ifnet *ifp, int command, caddr_t data)); +static int lnc_ioctl __P((struct ifnet *ifp, u_long command, caddr_t data)); static void lnc_watchdog __P((struct ifnet *ifp)); #ifdef DEBUG static void lnc_dump_state __P((struct lnc_softc *sc)); @@ -1749,7 +1749,7 @@ lnc_start(struct ifnet *ifp) } static int -lnc_ioctl(struct ifnet * ifp, int command, caddr_t data) +lnc_ioctl(struct ifnet * ifp, u_long command, caddr_t data) { struct lnc_softc *sc = ifp->if_softc; diff --git a/sys/i386/isa/if_sr.c b/sys/i386/isa/if_sr.c index 546756f..00427ba 100644 --- a/sys/i386/isa/if_sr.c +++ b/sys/i386/isa/if_sr.c @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_sr.c,v 1.11 1998/01/30 19:49:54 jhay Exp $ + * $Id: if_sr.c,v 1.12 1998/04/17 22:36:35 des Exp $ */ /* @@ -273,7 +273,7 @@ void srintr_hc(struct sr_hardc *hc); static int srattach(struct sr_hardc *hc); static void sr_xmit(struct sr_softc *sc); static void srstart(struct ifnet *ifp); -static int srioctl(struct ifnet *ifp, int cmd, caddr_t data); +static int srioctl(struct ifnet *ifp, u_long cmd, caddr_t data); static void srwatchdog(struct ifnet *ifp); static int sr_packet_avail(struct sr_softc *sc, int *len, u_char *rxstat); static void sr_copy_rxbuf(struct mbuf *m, struct sr_softc *sc, int len); @@ -1243,7 +1243,7 @@ static int bug_splats[] = {0, 0, 0, 0, 0, 0, 0, 0}; #endif static int -srioctl(struct ifnet *ifp, int cmd, caddr_t data) +srioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { int s, error, was_up, should_be_up; struct sppp *sp = (struct sppp *)ifp; diff --git a/sys/i386/isa/if_wl.c b/sys/i386/isa/if_wl.c index 8908c20..c4bd4db 100644 --- a/sys/i386/isa/if_wl.c +++ b/sys/i386/isa/if_wl.c @@ -1,4 +1,4 @@ -/* $Id: if_wl.c,v 1.10 1998/01/08 23:41:04 eivind Exp $ */ +/* $Id: if_wl.c,v 1.11 1998/02/20 13:11:47 bde Exp $ */ /* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -301,7 +301,7 @@ SYSCTL_INT(_machdep, OID_AUTO, wl_gather_snr, CTLFLAG_RW, &gathersnr, 0, ""); static void wlstart(struct ifnet *ifp); static void wlinit(void *xsc); -static int wlioctl(struct ifnet *ifp, int cmd, caddr_t data); +static int wlioctl(struct ifnet *ifp, u_long cmd, caddr_t data); static timeout_t wlwatchdog; static void wlxmt(int unt, struct mbuf *m); static int wldiag(int unt); @@ -1169,7 +1169,7 @@ wlread(int unit, u_short fd_p) * */ static int -wlioctl(struct ifnet *ifp, int cmd, caddr_t data) +wlioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { register struct ifaddr *ifa = (struct ifaddr *)data; register struct ifreq *ifr = (struct ifreq *)data; diff --git a/sys/i386/isa/if_ze.c b/sys/i386/isa/if_ze.c index c420c4e..83e3957 100644 --- a/sys/i386/isa/if_ze.c +++ b/sys/i386/isa/if_ze.c @@ -47,7 +47,7 @@ */ /* - * $Id: if_ze.c,v 1.51 1998/03/28 13:24:24 bde Exp $ + * $Id: if_ze.c,v 1.52 1998/04/15 17:45:26 bde Exp $ */ /* XXX don't mix different PCCARD support code. */ @@ -167,7 +167,7 @@ static void ze_init __P((int unit)); static __inline void ze_xmit __P((struct ifnet *ifp)); static void ze_start __P((struct ifnet *ifp)); static __inline void ze_rint __P((int unit)); -static int ze_ioctl __P((struct ifnet *ifp, int command, caddr_t data)); +static int ze_ioctl __P((struct ifnet *ifp, u_long command, caddr_t data)); static void ze_get_packet __P((struct ze_softc *sc, char *buf, int len)); static __inline char *ze_ring_copy __P((struct ze_softc *sc, char *src, char *dst, int amount)); @@ -1322,7 +1322,7 @@ zeintr(unit) static int ze_ioctl(ifp, command, data) register struct ifnet *ifp; - int command; + u_long command; caddr_t data; { register struct ifaddr *ifa = (struct ifaddr *)data; diff --git a/sys/i386/isa/if_zp.c b/sys/i386/isa/if_zp.c index f4b2de0..b2e9ad8 100644 --- a/sys/i386/isa/if_zp.c +++ b/sys/i386/isa/if_zp.c @@ -34,7 +34,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * From: if_ep.c,v 1.9 1994/01/25 10:46:29 deraadt Exp $ - * $Id: if_zp.c,v 1.46 1998/03/28 13:24:28 bde Exp $ + * $Id: if_zp.c,v 1.47 1998/05/26 02:28:18 jmb Exp $ */ /*- * TODO: @@ -194,7 +194,7 @@ static int zpprobe __P((struct isa_device *)); static int zpattach __P((struct isa_device *)); static int zp_suspend __P((void *visa_dev)); static int zp_resume __P((void *visa_dev)); -static int zpioctl __P((struct ifnet * ifp, int, caddr_t)); +static int zpioctl __P((struct ifnet * ifp, u_long, caddr_t)); static u_short read_eeprom_data __P((int, int)); static void zpinit __P((int)); @@ -1007,7 +1007,7 @@ out: outw(BASE + EP_COMMAND, RX_DISCARD_TOP_PACK); static int zpioctl(ifp, cmd, data) register struct ifnet *ifp; - int cmd; + u_long cmd; caddr_t data; { register struct ifaddr *ifa = (struct ifaddr *) data; diff --git a/sys/i386/isa/istallion.c b/sys/i386/isa/istallion.c index 8593169..c05b29c 100644 --- a/sys/i386/isa/istallion.c +++ b/sys/i386/isa/istallion.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: istallion.c,v 1.17 1998/02/13 12:45:52 phk Exp $ + * $Id: istallion.c,v 1.18 1998/04/15 17:45:29 bde Exp $ */ /*****************************************************************************/ @@ -1158,7 +1158,7 @@ STATIC int stliwrite(dev_t dev, struct uio *uiop, int flag) /*****************************************************************************/ -STATIC int stliioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) +STATIC int stliioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) { struct termios *newtios, *localtios; struct tty *tp; diff --git a/sys/i386/isa/joy.c b/sys/i386/isa/joy.c index 072be4e..f64d99e5 100644 --- a/sys/i386/isa/joy.c +++ b/sys/i386/isa/joy.c @@ -188,7 +188,7 @@ joyread (dev_t dev, struct uio *uio, int flag) } static int -joyioctl (dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) +joyioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) { int unit = UNIT (dev); int i = joypart (dev); diff --git a/sys/i386/isa/labpc.c b/sys/i386/isa/labpc.c index 049bbc8..3a5b0a6 100644 --- a/sys/i386/isa/labpc.c +++ b/sys/i386/isa/labpc.c @@ -1018,7 +1018,7 @@ labpcstrategy(struct buf *bp) } static int -labpcioctl(dev_t dev, int cmd, caddr_t arg, int mode, struct proc *p) +labpcioctl(dev_t dev, u_long cmd, caddr_t arg, int mode, struct proc *p) { struct ctlr *ctlr = labpcs[UNIT(dev)]; diff --git a/sys/i386/isa/lpt.c b/sys/i386/isa/lpt.c index 1af5f8a..b25e2e7 100644 --- a/sys/i386/isa/lpt.c +++ b/sys/i386/isa/lpt.c @@ -46,7 +46,7 @@ * SUCH DAMAGE. * * from: unknown origin, 386BSD 0.1 - * $Id: lpt.c,v 1.67 1998/02/20 04:19:39 steve Exp $ + * $Id: lpt.c,v 1.68 1998/04/15 17:45:34 bde Exp $ */ /* @@ -276,7 +276,7 @@ static u_char *ctxmith; /* Functions for the lp# interface */ static void lpattach(struct lpt_softc *,int); static int lpinittables(void); -static int lpioctl(struct ifnet *, int, caddr_t); +static int lpioctl(struct ifnet *, u_long, caddr_t); static int lpoutput(struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *); static void lpintr(int); @@ -808,7 +808,7 @@ lptintr(int unit) } static int -lptioctl(dev_t dev, int cmd, caddr_t data, int flags, struct proc *p) +lptioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p) { int error = 0; struct lpt_softc *sc; @@ -918,7 +918,7 @@ lpinittables (void) */ static int -lpioctl (struct ifnet *ifp, int cmd, caddr_t data) +lpioctl (struct ifnet *ifp, u_long cmd, caddr_t data) { struct lpt_softc *sc = lpt_sc + ifp->if_unit; struct ifaddr *ifa = (struct ifaddr *)data; diff --git a/sys/i386/isa/matcd/matcd.c b/sys/i386/isa/matcd/matcd.c index ba30c2f..d3bd4e5 100644 --- a/sys/i386/isa/matcd/matcd.c +++ b/sys/i386/isa/matcd/matcd.c @@ -337,7 +337,7 @@ static char MATCDVERSION[]="Version 1(26) 18-Oct-95"; static char MATCDCOPYRIGHT[] = "Matsushita CD-ROM driver, Copr. 1994,1995 Frank Durda IV"; /* The proceeding strings may not be changed*/ -/* $Id: matcd.c,v 1.31 1997/12/02 21:06:37 phk Exp $ */ +/* $Id: matcd.c,v 1.32 1998/01/24 02:54:32 eivind Exp $ */ /*--------------------------------------------------------------------------- Include declarations @@ -979,7 +979,7 @@ static void matcd_start(int controller) things that don't fit into the block read scheme of things. ---------------------------------------------------------------------------*/ -int matcdioctl(dev_t dev, int command, caddr_t addr, +int matcdioctl(dev_t dev, u_long command, caddr_t addr, int flags, struct proc *p) { struct matcd_data *cd; diff --git a/sys/i386/isa/mcd.c b/sys/i386/isa/mcd.c index 9121a71..1129d94 100644 --- a/sys/i386/isa/mcd.c +++ b/sys/i386/isa/mcd.c @@ -40,7 +40,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: mcd.c,v 1.96 1997/12/02 21:06:25 phk Exp $ + * $Id: mcd.c,v 1.97 1998/01/24 02:54:22 eivind Exp $ */ static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; @@ -506,7 +506,7 @@ static void mcd_start(int unit) return; } -int mcdioctl(dev_t dev, int cmd, caddr_t addr, int flags, struct proc *p) +int mcdioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) { struct mcd_data *cd; int unit,part,retry,r; diff --git a/sys/i386/isa/mse.c b/sys/i386/isa/mse.c index 2f558d8..d907e4c 100644 --- a/sys/i386/isa/mse.c +++ b/sys/i386/isa/mse.c @@ -11,7 +11,7 @@ * this software for any purpose. It is provided "as is" * without express or implied warranty. * - * $Id: mse.c,v 1.36 1997/12/07 08:09:16 yokota Exp $ + * $Id: mse.c,v 1.37 1998/01/24 02:54:22 eivind Exp $ */ /* * Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and @@ -401,7 +401,7 @@ mseread(dev, uio, ioflag) static int mseioctl(dev, cmd, addr, flag, p) dev_t dev; - int cmd; + u_long cmd; caddr_t addr; int flag; struct proc *p; diff --git a/sys/i386/isa/pcaudio.c b/sys/i386/isa/pcaudio.c index c43139b..a574afb 100644 --- a/sys/i386/isa/pcaudio.c +++ b/sys/i386/isa/pcaudio.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pcaudio.c,v 1.39 1998/01/24 02:54:22 eivind Exp $ + * $Id: pcaudio.c,v 1.40 1998/04/15 17:45:40 bde Exp $ */ #include "pca.h" @@ -390,7 +390,7 @@ pcawrite(dev_t dev, struct uio *uio, int flag) static int -pcaioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) +pcaioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) { audio_info_t *auptr; diff --git a/sys/i386/isa/pcvt/pcvt_drv.c b/sys/i386/isa/pcvt/pcvt_drv.c index c589b0d..ff6566a 100644 --- a/sys/i386/isa/pcvt/pcvt_drv.c +++ b/sys/i386/isa/pcvt/pcvt_drv.c @@ -585,7 +585,7 @@ pcwrite(Dev_t dev, struct uio *uio, int flag) } int -pcioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) +pcioctl(Dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) { register error; register struct tty *tp; diff --git a/sys/i386/isa/psm.c b/sys/i386/isa/psm.c index b36a7a7..440347f 100644 --- a/sys/i386/isa/psm.c +++ b/sys/i386/isa/psm.c @@ -20,7 +20,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: psm.c,v 1.51 1998/03/28 10:33:01 bde Exp $ + * $Id: psm.c,v 1.52 1998/04/15 17:06:52 phk Exp $ */ /* @@ -1366,7 +1366,7 @@ unblock_mouse_data(struct psm_softc *sc, int c) } static int -psmioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p) +psmioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) { struct psm_softc *sc = psm_softc[PSM_UNIT(dev)]; mousemode_t mode; diff --git a/sys/i386/isa/rc.c b/sys/i386/isa/rc.c index 784527f..31d738c 100644 --- a/sys/i386/isa/rc.c +++ b/sys/i386/isa/rc.c @@ -1090,7 +1090,8 @@ struct rc_softc *rcb; static int rcioctl(dev, cmd, data, flag, p) dev_t dev; -int cmd, flag; +u_long cmd; +int flag; caddr_t data; struct proc *p; { diff --git a/sys/i386/isa/rp.c b/sys/i386/isa/rp.c index e6f2af0..1c6e526 100644 --- a/sys/i386/isa/rp.c +++ b/sys/i386/isa/rp.c @@ -1586,7 +1586,7 @@ rpdtrwakeup(void *chan) int rpioctl(dev, cmd, data, flag, p) dev_t dev; - int cmd; + u_long cmd; caddr_t data; int flag; struct proc *p; diff --git a/sys/i386/isa/scd.c b/sys/i386/isa/scd.c index 6d25f89..339ccfd 100644 --- a/sys/i386/isa/scd.c +++ b/sys/i386/isa/scd.c @@ -41,7 +41,7 @@ */ -/* $Id: scd.c,v 1.35 1998/01/24 02:54:24 eivind Exp $ */ +/* $Id: scd.c,v 1.36 1998/04/15 17:45:48 bde Exp $ */ /* Please send any comments to micke@dynas.se */ @@ -418,7 +418,7 @@ scd_start(int unit) } static int -scdioctl(dev_t dev, int cmd, caddr_t addr, int flags, struct proc *p) +scdioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) { struct scd_data *cd; int unit,part; diff --git a/sys/i386/isa/si.c b/sys/i386/isa/si.c index 52838cf..92dda3d 100644 --- a/sys/i386/isa/si.c +++ b/sys/i386/isa/si.c @@ -30,7 +30,7 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN * NO EVENT SHALL THE AUTHORS BE LIABLE. * - * $Id: si.c,v 1.69 1998/03/23 16:27:37 peter Exp $ + * $Id: si.c,v 1.70 1998/03/28 13:24:39 bde Exp $ */ #ifndef lint @@ -1481,7 +1481,7 @@ sidevtotty(dev_t dev) static int siioctl(dev, cmd, data, flag, p) dev_t dev; - int cmd; + u_long cmd; caddr_t data; int flag; struct proc *p; diff --git a/sys/i386/isa/sio.c b/sys/i386/isa/sio.c index 898f080..776a50c 100644 --- a/sys/i386/isa/sio.c +++ b/sys/i386/isa/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.204 1998/06/03 09:43:38 bde Exp $ + * $Id: sio.c,v 1.205 1998/06/03 12:30:10 bde Exp $ */ #include "opt_comconsole.h" @@ -1688,7 +1688,7 @@ cont: static int sioioctl(dev, cmd, data, flag, p) dev_t dev; - int cmd; + u_long cmd; caddr_t data; int flag; struct proc *p; diff --git a/sys/i386/isa/sound/soundcard.c b/sys/i386/isa/sound/soundcard.c index c3cbbc0..c1ffa7d 100644 --- a/sys/i386/isa/sound/soundcard.c +++ b/sys/i386/isa/sound/soundcard.c @@ -218,7 +218,7 @@ sndclose(dev_t dev, int flags, int mode, struct proc * p) } static int -sndioctl(dev_t dev, int cmd, caddr_t arg, int mode, struct proc * p) +sndioctl(dev_t dev, u_long cmd, caddr_t arg, int mode, struct proc * p) { dev = minor(dev); FIX_RETURN(sound_ioctl_sw(dev, &files[dev], cmd, arg)); diff --git a/sys/i386/isa/spigot.c b/sys/i386/isa/spigot.c index bda05c8..4639a14 100644 --- a/sys/i386/isa/spigot.c +++ b/sys/i386/isa/spigot.c @@ -204,7 +204,7 @@ spigot_read(dev_t dev, struct uio *uio, int ioflag) static int -spigot_ioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) +spigot_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) { int error; struct spigot_softc *ss = (struct spigot_softc *)&spigot_softc[UNIT(dev)]; diff --git a/sys/i386/isa/spkr.c b/sys/i386/isa/spkr.c index 952d822..e090bc8 100644 --- a/sys/i386/isa/spkr.c +++ b/sys/i386/isa/spkr.c @@ -4,7 +4,7 @@ * v1.4 by Eric S. Raymond (esr@snark.thyrsus.com) Aug 1993 * modified for FreeBSD by Andrew A. Chernov <ache@astral.msk.su> * - * $Id: spkr.c,v 1.32 1998/02/09 06:08:41 eivind Exp $ + * $Id: spkr.c,v 1.33 1998/02/20 13:46:55 bde Exp $ */ #include "speaker.h" @@ -540,7 +540,7 @@ spkrclose(dev, flags, fmt, p) int spkrioctl(dev, cmd, cmdarg, flags, p) dev_t dev; - int cmd; + u_long cmd; caddr_t cmdarg; int flags; struct proc *p; diff --git a/sys/i386/isa/stallion.c b/sys/i386/isa/stallion.c index 3737b00..d12befc 100644 --- a/sys/i386/isa/stallion.c +++ b/sys/i386/isa/stallion.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: stallion.c,v 1.18 1998/03/28 13:24:43 bde Exp $ + * $Id: stallion.c,v 1.19 1998/04/15 17:45:50 bde Exp $ */ /*****************************************************************************/ @@ -963,7 +963,7 @@ STATIC int stlwrite(dev_t dev, struct uio *uiop, int flag) /*****************************************************************************/ -STATIC int stlioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) +STATIC int stlioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) { struct termios *newtios, *localtios; struct tty *tp; diff --git a/sys/i386/isa/syscons.c b/sys/i386/isa/syscons.c index c7c02e9..748833b 100644 --- a/sys/i386/isa/syscons.c +++ b/sys/i386/isa/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.260 1998/04/17 10:03:11 des Exp $ + * $Id: syscons.c,v 1.261 1998/05/17 11:52:18 phk Exp $ */ #include "sc.h" @@ -984,7 +984,7 @@ scparam(struct tty *tp, struct termios *t) } int -scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) +scioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) { int error; u_int i; diff --git a/sys/i386/isa/wcd.c b/sys/i386/isa/wcd.c index 88f74d5..d961964 100644 --- a/sys/i386/isa/wcd.c +++ b/sys/i386/isa/wcd.c @@ -13,7 +13,7 @@ * all derivative works or modified versions. * * From: Version 1.9, Mon Oct 9 20:27:42 MSK 1995 - * $Id: wcd.c,v 1.51 1998/02/09 06:08:43 eivind Exp $ + * $Id: wcd.c,v 1.52 1998/04/15 17:45:53 bde Exp $ */ #include "wdc.h" @@ -742,7 +742,7 @@ static __inline void lba2msf (int lba, u_char *m, u_char *s, u_char *f) * Perform special action on behalf of the user. * Knows about the internals of this device */ -int wcdioctl (dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p) +int wcdioctl (dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) { int lun = dkunit(dev); struct wcd *t = wcdtab[lun]; diff --git a/sys/i386/isa/wd.c b/sys/i386/isa/wd.c index 36e1d4f..367dfb9 100644 --- a/sys/i386/isa/wd.c +++ b/sys/i386/isa/wd.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)wd.c 7.2 (Berkeley) 5/9/91 - * $Id: wd.c,v 1.166 1998/05/07 01:15:23 julian Exp $ + * $Id: wd.c,v 1.167 1998/05/11 15:30:43 sos Exp $ */ /* TODO: @@ -2127,7 +2127,7 @@ wdclose(dev_t dev, int flags, int fmt, struct proc *p) } int -wdioctl(dev_t dev, int cmd, caddr_t addr, int flags, struct proc *p) +wdioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) { int lunit = dkunit(dev); register struct disk *du; diff --git a/sys/i386/isa/wfd.c b/sys/i386/isa/wfd.c index ed84f5f..f63ebaa 100644 --- a/sys/i386/isa/wfd.c +++ b/sys/i386/isa/wfd.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: wfd.c,v 1.8 1998/02/13 22:41:00 pst Exp $ + * $Id: wfd.c,v 1.9 1998/03/20 23:14:52 msmith Exp $ */ /* @@ -617,7 +617,7 @@ static int wfd_request_wait (struct wfd *t, u_char cmd, u_char a1, u_char a2, * Perform special action on behalf of the user. * Knows about the internals of this device */ -int wfdioctl (dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p) +int wfdioctl (dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) { int lun = UNIT(dev); struct wfd *t = wfdtab[lun]; diff --git a/sys/i386/isa/wt.c b/sys/i386/isa/wt.c index 3f4e735..9c317a6 100644 --- a/sys/i386/isa/wt.c +++ b/sys/i386/isa/wt.c @@ -20,7 +20,7 @@ * the original CMU copyright notice. * * Version 1.3, Thu Nov 11 12:09:13 MSK 1993 - * $Id: wt.c,v 1.42 1997/12/02 21:06:34 phk Exp $ + * $Id: wt.c,v 1.43 1998/01/24 02:54:28 eivind Exp $ * */ @@ -423,7 +423,7 @@ done: * ioctl (int fd, MTIOCTOP, struct mtop *buf) -- do BSD-like op */ int -wtioctl (dev_t dev, int cmd, caddr_t arg, int flags, struct proc *p) +wtioctl (dev_t dev, u_long cmd, caddr_t arg, int flags, struct proc *p) { int u = minor (dev) & T_UNIT; wtinfo_t *t = wttab + u; diff --git a/sys/i386/linux/linux_ioctl.c b/sys/i386/linux/linux_ioctl.c index dfe001d..ed5f751 100644 --- a/sys/i386/linux/linux_ioctl.c +++ b/sys/i386/linux/linux_ioctl.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_ioctl.c,v 1.22 1997/11/17 04:00:32 ahasty Exp $ + * $Id: linux_ioctl.c,v 1.23 1997/12/15 06:09:11 msmith Exp $ */ #include <sys/param.h> @@ -455,7 +455,7 @@ linux_ioctl(struct proc *p, struct linux_ioctl_args *args) struct linux_termio linux_termio; struct filedesc *fdp = p->p_fd; struct file *fp; - int (*func)(struct file *fp, int com, caddr_t data, struct proc *p); + int (*func)(struct file *fp, u_long com, caddr_t data, struct proc *p); int bsd_line, linux_line; int error; diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index 8fd2ed0..c5909b6 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -12,362 +12,365 @@ struct proc; +#define PAD_(t) sizeof(register_t) <= sizeof(t) ? \ + 0 : sizeof(register_t) - sizeof(t) + struct linux_setup_args { - int dummy; + register_t dummy; }; struct linux_fork_args { - int dummy; + register_t dummy; }; struct linux_open_args { - char * path; - int flags; - int mode; + char * path; char path_[PAD_(char *)]; + int flags; char flags_[PAD_(int)]; + int mode; char mode_[PAD_(int)]; }; struct linux_waitpid_args { - int pid; - int * status; - int options; + int pid; char pid_[PAD_(int)]; + int * status; char status_[PAD_(int *)]; + int options; char options_[PAD_(int)]; }; struct linux_creat_args { - char * path; - int mode; + char * path; char path_[PAD_(char *)]; + int mode; char mode_[PAD_(int)]; }; struct linux_unlink_args { - char * path; + char * path; char path_[PAD_(char *)]; }; struct linux_execve_args { - char * path; - char ** argp; - char ** envp; + char * path; char path_[PAD_(char *)]; + char ** argp; char argp_[PAD_(char **)]; + char ** envp; char envp_[PAD_(char **)]; }; struct linux_chdir_args { - char * path; + char * path; char path_[PAD_(char *)]; }; struct linux_time_args { - linux_time_t * tm; + linux_time_t * tm; char tm_[PAD_(linux_time_t *)]; }; struct linux_mknod_args { - char * path; - int mode; - int dev; + char * path; char path_[PAD_(char *)]; + int mode; char mode_[PAD_(int)]; + int dev; char dev_[PAD_(int)]; }; struct linux_chmod_args { - char * path; - int mode; + char * path; char path_[PAD_(char *)]; + int mode; char mode_[PAD_(int)]; }; struct linux_lchown_args { - char * path; - int uid; - int gid; + char * path; char path_[PAD_(char *)]; + int uid; char uid_[PAD_(int)]; + int gid; char gid_[PAD_(int)]; }; struct linux_break_args { - char * nsize; + char * nsize; char nsize_[PAD_(char *)]; }; struct linux_stat_args { - char * path; - struct ostat * up; + char * path; char path_[PAD_(char *)]; + struct ostat * up; char up_[PAD_(struct ostat *)]; }; struct linux_lseek_args { - int fdes; - long off; - int whence; + int fdes; char fdes_[PAD_(int)]; + long off; char off_[PAD_(long)]; + int whence; char whence_[PAD_(int)]; }; struct linux_mount_args { - int dummy; + register_t dummy; }; struct linux_umount_args { - int dummy; + register_t dummy; }; struct linux_stime_args { - int dummy; + register_t dummy; }; struct linux_ptrace_args { - int dummy; + register_t dummy; }; struct linux_alarm_args { - unsigned int secs; + unsigned int secs; char secs_[PAD_(unsigned int)]; }; struct linux_fstat_args { - int fd; - struct ostat * up; + int fd; char fd_[PAD_(int)]; + struct ostat * up; char up_[PAD_(struct ostat *)]; }; struct linux_pause_args { - int dummy; + register_t dummy; }; struct linux_utime_args { - char * fname; - struct linux_utimbuf * times; + char * fname; char fname_[PAD_(char *)]; + struct linux_utimbuf * times; char times_[PAD_(struct linux_utimbuf *)]; }; struct linux_stty_args { - int dummy; + register_t dummy; }; struct linux_gtty_args { - int dummy; + register_t dummy; }; struct linux_access_args { - char * path; - int flags; + char * path; char path_[PAD_(char *)]; + int flags; char flags_[PAD_(int)]; }; struct linux_nice_args { - int inc; + int inc; char inc_[PAD_(int)]; }; struct linux_ftime_args { - int dummy; + register_t dummy; }; struct linux_kill_args { - int pid; - int signum; + int pid; char pid_[PAD_(int)]; + int signum; char signum_[PAD_(int)]; }; struct linux_rename_args { - char * from; - char * to; + char * from; char from_[PAD_(char *)]; + char * to; char to_[PAD_(char *)]; }; struct linux_mkdir_args { - char * path; - int mode; + char * path; char path_[PAD_(char *)]; + int mode; char mode_[PAD_(int)]; }; struct linux_rmdir_args { - char * path; + char * path; char path_[PAD_(char *)]; }; struct linux_pipe_args { - int * pipefds; + int * pipefds; char pipefds_[PAD_(int *)]; }; struct linux_times_args { - struct linux_times_argv * buf; + struct linux_times_argv * buf; char buf_[PAD_(struct linux_times_argv *)]; }; struct linux_prof_args { - int dummy; + register_t dummy; }; struct linux_brk_args { - char * dsend; + char * dsend; char dsend_[PAD_(char *)]; }; struct linux_signal_args { - int sig; - linux_handler_t handler; + int sig; char sig_[PAD_(int)]; + linux_handler_t handler; char handler_[PAD_(linux_handler_t)]; }; struct linux_phys_args { - int dummy; + register_t dummy; }; struct linux_lock_args { - int dummy; + register_t dummy; }; struct linux_ioctl_args { - int fd; - u_long cmd; - int arg; + int fd; char fd_[PAD_(int)]; + u_long cmd; char cmd_[PAD_(u_long)]; + int arg; char arg_[PAD_(int)]; }; struct linux_fcntl_args { - int fd; - int cmd; - int arg; + int fd; char fd_[PAD_(int)]; + int cmd; char cmd_[PAD_(int)]; + int arg; char arg_[PAD_(int)]; }; struct linux_mpx_args { - int dummy; + register_t dummy; }; struct linux_ulimit_args { - int dummy; + register_t dummy; }; struct linux_olduname_args { - struct linux_oldold_utsname * up; + struct linux_oldold_utsname * up; char up_[PAD_(struct linux_oldold_utsname *)]; }; struct linux_ustat_args { - int dummy; + register_t dummy; }; struct linux_sigaction_args { - int sig; - struct linux_sigaction * nsa; - struct linux_sigaction * osa; + int sig; char sig_[PAD_(int)]; + struct linux_sigaction * nsa; char nsa_[PAD_(struct linux_sigaction *)]; + struct linux_sigaction * osa; char osa_[PAD_(struct linux_sigaction *)]; }; struct linux_siggetmask_args { - int dummy; + register_t dummy; }; struct linux_sigsetmask_args { - linux_sigset_t mask; + linux_sigset_t mask; char mask_[PAD_(linux_sigset_t)]; }; struct linux_sigsuspend_args { - int restart; - linux_sigset_t oldmask; - linux_sigset_t mask; + int restart; char restart_[PAD_(int)]; + linux_sigset_t oldmask; char oldmask_[PAD_(linux_sigset_t)]; + linux_sigset_t mask; char mask_[PAD_(linux_sigset_t)]; }; struct linux_sigpending_args { - linux_sigset_t * mask; + linux_sigset_t * mask; char mask_[PAD_(linux_sigset_t *)]; }; struct linux_select_args { - struct linux_select_argv * ptr; + struct linux_select_argv * ptr; char ptr_[PAD_(struct linux_select_argv *)]; }; struct linux_symlink_args { - char * path; - char * to; + char * path; char path_[PAD_(char *)]; + char * to; char to_[PAD_(char *)]; }; struct linux_readlink_args { - char * name; - char * buf; - int count; + char * name; char name_[PAD_(char *)]; + char * buf; char buf_[PAD_(char *)]; + int count; char count_[PAD_(int)]; }; struct linux_uselib_args { - char * library; + char * library; char library_[PAD_(char *)]; }; struct linux_readdir_args { - int fd; - struct linux_dirent * dent; - unsigned int count; + int fd; char fd_[PAD_(int)]; + struct linux_dirent * dent; char dent_[PAD_(struct linux_dirent *)]; + unsigned int count; char count_[PAD_(unsigned int)]; }; struct linux_mmap_args { - struct linux_mmap_argv * ptr; + struct linux_mmap_argv * ptr; char ptr_[PAD_(struct linux_mmap_argv *)]; }; struct linux_truncate_args { - char * path; - long length; + char * path; char path_[PAD_(char *)]; + long length; char length_[PAD_(long)]; }; struct linux_statfs_args { - char * path; - struct linux_statfs_buf * buf; + char * path; char path_[PAD_(char *)]; + struct linux_statfs_buf * buf; char buf_[PAD_(struct linux_statfs_buf *)]; }; struct linux_fstatfs_args { - int fd; - struct linux_statfs_buf * buf; + int fd; char fd_[PAD_(int)]; + struct linux_statfs_buf * buf; char buf_[PAD_(struct linux_statfs_buf *)]; }; struct linux_ioperm_args { - unsigned int lo; - unsigned int hi; - int val; + unsigned int lo; char lo_[PAD_(unsigned int)]; + unsigned int hi; char hi_[PAD_(unsigned int)]; + int val; char val_[PAD_(int)]; }; struct linux_socketcall_args { - int what; - void * args; + int what; char what_[PAD_(int)]; + void * args; char args_[PAD_(void *)]; }; struct linux_ksyslog_args { - int what; + int what; char what_[PAD_(int)]; }; struct linux_setitimer_args { - u_int which; - struct itimerval * itv; - struct itimerval * oitv; + u_int which; char which_[PAD_(u_int)]; + struct itimerval * itv; char itv_[PAD_(struct itimerval *)]; + struct itimerval * oitv; char oitv_[PAD_(struct itimerval *)]; }; struct linux_getitimer_args { - u_int which; - struct itimerval * itv; + u_int which; char which_[PAD_(u_int)]; + struct itimerval * itv; char itv_[PAD_(struct itimerval *)]; }; struct linux_newstat_args { - char * path; - struct linux_newstat * buf; + char * path; char path_[PAD_(char *)]; + struct linux_newstat * buf; char buf_[PAD_(struct linux_newstat *)]; }; struct linux_newlstat_args { - char * path; - struct linux_newstat * buf; + char * path; char path_[PAD_(char *)]; + struct linux_newstat * buf; char buf_[PAD_(struct linux_newstat *)]; }; struct linux_newfstat_args { - int fd; - struct linux_newstat * buf; + int fd; char fd_[PAD_(int)]; + struct linux_newstat * buf; char buf_[PAD_(struct linux_newstat *)]; }; struct linux_uname_args { - struct linux_old_utsname * up; + struct linux_old_utsname * up; char up_[PAD_(struct linux_old_utsname *)]; }; struct linux_iopl_args { - int level; + int level; char level_[PAD_(int)]; }; struct linux_vhangup_args { - int dummy; + register_t dummy; }; struct linux_idle_args { - int dummy; + register_t dummy; }; struct linux_vm86_args { - int dummy; + register_t dummy; }; struct linux_wait4_args { - int pid; - int * status; - int options; - struct rusage * rusage; + int pid; char pid_[PAD_(int)]; + int * status; char status_[PAD_(int *)]; + int options; char options_[PAD_(int)]; + struct rusage * rusage; char rusage_[PAD_(struct rusage *)]; }; struct linux_swapoff_args { - int dummy; + register_t dummy; }; struct linux_sysinfo_args { - int dummy; + register_t dummy; }; struct linux_ipc_args { - int what; - int arg1; - int arg2; - int arg3; - caddr_t ptr; + int what; char what_[PAD_(int)]; + int arg1; char arg1_[PAD_(int)]; + int arg2; char arg2_[PAD_(int)]; + int arg3; char arg3_[PAD_(int)]; + caddr_t ptr; char ptr_[PAD_(caddr_t)]; }; struct linux_sigreturn_args { - struct linux_sigcontext * scp; + struct linux_sigcontext * scp; char scp_[PAD_(struct linux_sigcontext *)]; }; struct linux_clone_args { - int dummy; + register_t dummy; }; struct linux_newuname_args { - struct linux_newuname_t * buf; + struct linux_newuname_t * buf; char buf_[PAD_(struct linux_newuname_t *)]; }; struct linux_modify_ldt_args { - int func; - void * ptr; - size_t bytecount; + int func; char func_[PAD_(int)]; + void * ptr; char ptr_[PAD_(void *)]; + size_t bytecount; char bytecount_[PAD_(size_t)]; }; struct linux_adjtimex_args { - int dummy; + register_t dummy; }; struct linux_sigprocmask_args { - int how; - linux_sigset_t * mask; - linux_sigset_t * omask; + int how; char how_[PAD_(int)]; + linux_sigset_t * mask; char mask_[PAD_(linux_sigset_t *)]; + linux_sigset_t * omask; char omask_[PAD_(linux_sigset_t *)]; }; struct linux_create_module_args { - int dummy; + register_t dummy; }; struct linux_init_module_args { - int dummy; + register_t dummy; }; struct linux_delete_module_args { - int dummy; + register_t dummy; }; struct linux_get_kernel_syms_args { - int dummy; + register_t dummy; }; struct linux_quotactl_args { - int dummy; + register_t dummy; }; struct linux_getpgid_args { - int pid; + int pid; char pid_[PAD_(int)]; }; struct linux_bdflush_args { - int dummy; + register_t dummy; }; struct linux_personality_args { - int per; + int per; char per_[PAD_(int)]; }; struct linux_llseek_args { - int fd; - u_int32_t ohigh; - u_int32_t olow; - caddr_t res; - int whence; + int fd; char fd_[PAD_(int)]; + u_int32_t ohigh; char ohigh_[PAD_(u_int32_t)]; + u_int32_t olow; char olow_[PAD_(u_int32_t)]; + caddr_t res; char res_[PAD_(caddr_t)]; + int whence; char whence_[PAD_(int)]; }; struct linux_getdents_args { - int fd; - void * dent; - unsigned count; + int fd; char fd_[PAD_(int)]; + void * dent; char dent_[PAD_(void *)]; + unsigned count; char count_[PAD_(unsigned)]; }; struct linux_newselect_args { - int nfds; - fd_set * readfds; - fd_set * writefds; - fd_set * exceptfds; - struct timeval * timeout; + int nfds; char nfds_[PAD_(int)]; + fd_set * readfds; char readfds_[PAD_(fd_set *)]; + fd_set * writefds; char writefds_[PAD_(fd_set *)]; + fd_set * exceptfds; char exceptfds_[PAD_(fd_set *)]; + struct timeval * timeout; char timeout_[PAD_(struct timeval *)]; }; struct linux_msync_args { - caddr_t addr; - int len; - int fl; + caddr_t addr; char addr_[PAD_(caddr_t)]; + int len; char len_[PAD_(int)]; + int fl; char fl_[PAD_(int)]; }; struct linux_chown_args { - char * path; - int uid; - int gid; + char * path; char path_[PAD_(char *)]; + int uid; char uid_[PAD_(int)]; + int gid; char gid_[PAD_(int)]; }; int linux_setup __P((struct proc *, struct linux_setup_args *)); int linux_fork __P((struct proc *, struct linux_fork_args *)); @@ -470,4 +473,6 @@ int linux_chown __P((struct proc *, struct linux_chown_args *)); #endif /* COMPAT_43 */ +#undef PAD_ + #endif /* !_LINUX_SYSPROTO_H_ */ diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index 798d9a9..f63b9aa 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_sysvec.c,v 1.28 1998/04/28 18:15:06 eivind Exp $ + * $Id: linux_sysvec.c,v 1.29 1998/05/07 00:42:25 eivind Exp $ */ /* XXX we use functions that might not exist. */ @@ -56,9 +56,9 @@ #include <i386/linux/linux.h> #include <i386/linux/linux_proto.h> -static int linux_fixup __P((int **stack_base, +static int linux_fixup __P((long **stack_base, struct image_params *iparams)); -static int elf_linux_fixup __P((int **stack_base, +static int elf_linux_fixup __P((long **stack_base, struct image_params *iparams)); static void linux_prepsyscall __P((struct trapframe *tf, int *args, u_int *code, caddr_t *params)); @@ -119,26 +119,26 @@ translate_traps(int signal, int trap_code) } static int -linux_fixup(int **stack_base, struct image_params *imgp) +linux_fixup(long **stack_base, struct image_params *imgp) { - int *argv, *envp; + long *argv, *envp; argv = *stack_base; envp = *stack_base + (imgp->argc + 1); (*stack_base)--; - **stack_base = (int)envp; + **stack_base = (long)envp; (*stack_base)--; - **stack_base = (int)argv; + **stack_base = (long)argv; (*stack_base)--; - **stack_base = (int)imgp->argc; + **stack_base = (long)imgp->argc; return 0; } static int -elf_linux_fixup(int **stack_base, struct image_params *imgp) +elf_linux_fixup(long **stack_base, struct image_params *imgp) { Elf32_Auxargs *args = (Elf32_Auxargs *)imgp->auxargs; - int *pos; + long *pos; pos = *stack_base + (imgp->argc + imgp->envc + 2); @@ -165,7 +165,7 @@ elf_linux_fixup(int **stack_base, struct image_params *imgp) imgp->auxargs = NULL; (*stack_base)--; - **stack_base = (int)imgp->argc; + **stack_base = (long)imgp->argc; return 0; } @@ -316,7 +316,7 @@ linux_sigreturn(p, args) * It is unsafe to keep track of it ourselves, in the event that a * program jumps out of a signal handler. */ - scp = args->scp; + scp = SCARG(args,scp); if (copyin((caddr_t)scp, &context, sizeof(*scp)) != 0) return (EFAULT); diff --git a/sys/isa/fd.c b/sys/isa/fd.c index 5445b3f..5a9d93c 100644 --- a/sys/isa/fd.c +++ b/sys/isa/fd.c @@ -43,7 +43,7 @@ * SUCH DAMAGE. * * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 - * $Id: fd.c,v 1.111 1998/05/06 22:14:41 julian Exp $ + * $Id: fd.c,v 1.112 1998/05/06 23:35:36 julian Exp $ * */ @@ -2040,7 +2040,7 @@ fdformat(dev, finfo, p) static int fdioctl(dev, cmd, addr, flag, p) dev_t dev; - int cmd; + u_long cmd; caddr_t addr; int flag; struct proc *p; diff --git a/sys/isa/joy.c b/sys/isa/joy.c index 072be4e..f64d99e5 100644 --- a/sys/isa/joy.c +++ b/sys/isa/joy.c @@ -188,7 +188,7 @@ joyread (dev_t dev, struct uio *uio, int flag) } static int -joyioctl (dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) +joyioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) { int unit = UNIT (dev); int i = joypart (dev); diff --git a/sys/isa/sio.c b/sys/isa/sio.c index 898f080..776a50c 100644 --- a/sys/isa/sio.c +++ b/sys/isa/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.204 1998/06/03 09:43:38 bde Exp $ + * $Id: sio.c,v 1.205 1998/06/03 12:30:10 bde Exp $ */ #include "opt_comconsole.h" @@ -1688,7 +1688,7 @@ cont: static int sioioctl(dev, cmd, data, flag, p) dev_t dev; - int cmd; + u_long cmd; caddr_t data; int flag; struct proc *p; diff --git a/sys/isa/syscons.c b/sys/isa/syscons.c index c7c02e9..748833b 100644 --- a/sys/isa/syscons.c +++ b/sys/isa/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.260 1998/04/17 10:03:11 des Exp $ + * $Id: syscons.c,v 1.261 1998/05/17 11:52:18 phk Exp $ */ #include "sc.h" @@ -984,7 +984,7 @@ scparam(struct tty *tp, struct termios *t) } int -scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) +scioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) { int error; u_int i; diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index b5e9915..84a6f20 100644 --- a/sys/isofs/cd9660/cd9660_vfsops.c +++ b/sys/isofs/cd9660/cd9660_vfsops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)cd9660_vfsops.c 8.18 (Berkeley) 5/22/95 - * $Id: cd9660_vfsops.c,v 1.38 1998/04/20 23:18:46 julian Exp $ + * $Id: cd9660_vfsops.c,v 1.39 1998/05/06 05:29:30 msmith Exp $ */ #include <sys/param.h> @@ -197,7 +197,7 @@ cd9660_mount(mp, path, data, ndp, p) { struct vnode *devvp; struct iso_args args; - u_int size; + size_t size; int error; struct iso_mnt *imp = 0; diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 7cfebf0..aabe534 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: imgact_elf.c,v 1.23 1998/03/28 13:24:52 bde Exp $ + * $Id: imgact_elf.c,v 1.24 1998/04/28 18:15:07 eivind Exp $ */ #include "opt_rlimit.h" @@ -60,10 +60,27 @@ #define MAX_PHDR 32 /* XXX enough ? */ -static int elf_check_header __P((const Elf32_Ehdr *hdr, int type)); +#if ELF_TARG_CLASS == ELFCLASS32 + +#define Elf_Ehdr Elf32_Ehdr +#define Elf_Phdr Elf32_Phdr +#define Elf_Auxargs Elf32_Auxargs +#define Elf_Brandinfo Elf32_Brandinfo + +#else + +#define Elf_Ehdr Elf64_Ehdr +#define Elf_Phdr Elf64_Phdr +#define Elf_Auxargs Elf64_Auxargs +#define Elf_Brandinfo Elf64_Brandinfo + +#endif + + +static int elf_check_header __P((const Elf_Ehdr *hdr, int type)); static int elf_load_section __P((struct vmspace *vmspace, struct vnode *vp, vm_offset_t offset, caddr_t vmaddr, size_t memsz, size_t filsz, vm_prot_t prot)); static int elf_load_file __P((struct proc *p, char *file, u_long *addr, u_long *entry)); -static int elf_freebsd_fixup __P((int **stack_base, struct image_params *imgp)); +static int elf_freebsd_fixup __P((long **stack_base, struct image_params *imgp)); static int exec_elf_imgact __P((struct image_params *imgp)); static int elf_trace = 0; @@ -87,20 +104,20 @@ static struct sysentvec elf_freebsd_sysvec = { "FreeBSD ELF" }; -static Elf32_Brandinfo freebsd_brand_info = { +static Elf_Brandinfo freebsd_brand_info = { "FreeBSD", "", "/usr/libexec/ld-elf.so.1", &elf_freebsd_sysvec }; -static Elf32_Brandinfo *elf_brand_list[MAX_BRANDS] = { +static Elf_Brandinfo *elf_brand_list[MAX_BRANDS] = { &freebsd_brand_info, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; int -elf_insert_brand_entry(Elf32_Brandinfo *entry) +elf_insert_brand_entry(Elf_Brandinfo *entry) { int i; @@ -116,7 +133,7 @@ elf_insert_brand_entry(Elf32_Brandinfo *entry) } int -elf_remove_brand_entry(Elf32_Brandinfo *entry) +elf_remove_brand_entry(Elf_Brandinfo *entry) { int i; @@ -132,7 +149,7 @@ elf_remove_brand_entry(Elf32_Brandinfo *entry) } static int -elf_check_header(const Elf32_Ehdr *hdr, int type) +elf_check_header(const Elf_Ehdr *hdr, int type) { if (!(hdr->e_ident[EI_MAG0] == ELFMAG0 && hdr->e_ident[EI_MAG1] == ELFMAG1 && @@ -140,9 +157,15 @@ elf_check_header(const Elf32_Ehdr *hdr, int type) hdr->e_ident[EI_MAG3] == ELFMAG3)) return ENOEXEC; +#ifdef __i396__ if (hdr->e_machine != EM_386 && hdr->e_machine != EM_486) +#endif +#ifdef __alpha__ + if (hdr->e_machine != EM_ALPHA) +#endif return ENOEXEC; + if (hdr->e_type != type) return ENOEXEC; @@ -222,8 +245,8 @@ elf_load_section(struct vmspace *vmspace, struct vnode *vp, vm_offset_t offset, static int elf_load_file(struct proc *p, char *file, u_long *addr, u_long *entry) { - Elf32_Ehdr *hdr = NULL; - Elf32_Phdr *phdr = NULL; + Elf_Ehdr *hdr = NULL; + Elf_Phdr *phdr = NULL; struct nameidata nd; struct vmspace *vmspace = p->p_vmspace; struct vattr attr; @@ -273,7 +296,7 @@ elf_load_file(struct proc *p, char *file, u_long *addr, u_long *entry) if (error) goto fail; - hdr = (Elf32_Ehdr *)imgp->image_header; + hdr = (Elf_Ehdr *)imgp->image_header; if (error = elf_check_header(hdr, ET_DYN)) goto fail; @@ -294,7 +317,7 @@ elf_load_file(struct proc *p, char *file, u_long *addr, u_long *entry) goto fail; } - phdr = (Elf32_Phdr *)(imgp->image_header + hdr->e_phoff); + phdr = (Elf_Phdr *)(imgp->image_header + hdr->e_phoff); for (i = 0; i < hdr->e_phnum; i++) { switch(phdr[i].p_type) { @@ -380,9 +403,9 @@ fail: static int exec_elf_imgact(struct image_params *imgp) { - const Elf32_Ehdr *hdr = (const Elf32_Ehdr *) imgp->image_header; - const Elf32_Phdr *phdr, *mapped_phdr = NULL; - Elf32_Auxargs *elf_auxargs = NULL; + const Elf_Ehdr *hdr = (const Elf_Ehdr *) imgp->image_header; + const Elf_Phdr *phdr, *mapped_phdr = NULL; + Elf_Auxargs *elf_auxargs = NULL; struct vmspace *vmspace; vm_prot_t prot = 0; u_long text_size = 0, data_size = 0; @@ -419,7 +442,7 @@ exec_elf_imgact(struct image_params *imgp) /* Only support headers in first page for now */ return ENOEXEC; } else { - phdr = (const Elf32_Phdr*) + phdr = (const Elf_Phdr*) ((const char *)imgp->image_header + hdr->e_phoff); } @@ -514,7 +537,7 @@ exec_elf_imgact(struct image_params *imgp) vmspace->vm_dsize = data_size >> PAGE_SHIFT; vmspace->vm_daddr = (caddr_t)data_addr; - addr = 2*MAXDSIZ; /* May depend on OS type XXX */ + addr = 2L*MAXDSIZ; /* May depend on OS type XXX */ imgp->entry_addr = entry; @@ -564,8 +587,13 @@ exec_elf_imgact(struct image_params *imgp) } if (i == MAX_BRANDS) { uprintf("ELF binary type not known\n"); +#ifdef __alpha__ + uprintf("assuming FreeBSD\n"); + i = 0; +#else error = ENOEXEC; goto fail; +#endif } if (interp) { if (error = elf_load_file(imgp->proc, @@ -582,7 +610,7 @@ exec_elf_imgact(struct image_params *imgp) /* * Construct auxargs table (used by the fixup routine) */ - elf_auxargs = malloc(sizeof(Elf32_Auxargs), M_TEMP, M_WAITOK); + elf_auxargs = malloc(sizeof(Elf_Auxargs), M_TEMP, M_WAITOK); elf_auxargs->execfd = -1; elf_auxargs->phdr = proghdr; elf_auxargs->phent = hdr->e_phentsize; @@ -604,10 +632,10 @@ fail: } static int -elf_freebsd_fixup(int **stack_base, struct image_params *imgp) +elf_freebsd_fixup(long **stack_base, struct image_params *imgp) { - Elf32_Auxargs *args = (Elf32_Auxargs *)imgp->auxargs; - int *pos; + Elf_Auxargs *args = (Elf_Auxargs *)imgp->auxargs; + long *pos; pos = *stack_base + (imgp->argc + imgp->envc + 2); @@ -630,7 +658,7 @@ elf_freebsd_fixup(int **stack_base, struct image_params *imgp) imgp->auxargs = NULL; (*stack_base)--; - **stack_base = (int)imgp->argc; + **stack_base = (long)imgp->argc; return 0; } diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index ea599a7..ff5a0c5 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -39,7 +39,7 @@ * SUCH DAMAGE. * * @(#)init_main.c 8.9 (Berkeley) 1/21/94 - * $Id: init_main.c,v 1.92 1998/05/17 11:52:35 phk Exp $ + * $Id: init_main.c,v 1.93 1998/05/28 09:30:15 phk Exp $ */ #include "opt_devfs.h" @@ -390,6 +390,7 @@ proc0_init(dummy) vmspace0.vm_map.pmap = &vmspace0.vm_pmap; p->p_addr = proc0paddr; /* XXX */ +#ifndef __alpha__ /* XXX what is this? */ #define INCOMPAT_LITES2 #ifdef INCOMPAT_LITES2 /* @@ -397,6 +398,7 @@ proc0_init(dummy) */ cpu_set_init_frame(p, init_framep); /* XXX! */ #endif /* INCOMPAT_LITES2*/ +#endif /* * We continue to place resource usage info and signal @@ -603,10 +605,10 @@ start_init(p) /* * Move out the arg pointers. */ - uap = (char **)((int)ucp & ~(NBPW-1)); + uap = (char **)((long)ucp & ~(NBPW-1)); (void)suword((caddr_t)--uap, 0); /* terminator */ - (void)suword((caddr_t)--uap, (int)arg1); - (void)suword((caddr_t)--uap, (int)arg0); + (void)suword((caddr_t)--uap, (long)arg1); + (void)suword((caddr_t)--uap, (long)arg0); /* * Point at the arguments. diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index e66ebe1..912c4c5 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -30,11 +30,12 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: kern_conf.c,v 1.22 1997/09/27 13:39:03 kato Exp $ + * $Id: kern_conf.c,v 1.23 1997/11/22 08:35:37 bde Exp $ */ #include <sys/param.h> #include <sys/systm.h> +#include <sys/module.h> #include <sys/conf.h> #include <sys/vnode.h> @@ -212,3 +213,64 @@ bdevsw_add_generic(int bdev, int cdev, struct bdevsw *bdevsw) dev = makedev(bdev, 0); bdevsw_add(&dev, bdevsw , NULL); } + +int +cdevsw_module_handler(module_t mod, modeventtype_t what, void* arg) +{ + struct cdevsw_module_data* data = (struct cdevsw_module_data*) arg; + int error; + + switch (what) { + case MOD_LOAD: + if (error = cdevsw_add(&data->dev, data->cdevsw, NULL)) + return error; + break; + + case MOD_UNLOAD: + if (error = cdevsw_add(&data->dev, NULL, NULL)) + return error; + break; + } + + if (data->chainevh) + return data->chainevh(mod, what, data->chainarg); + else + return 0; +} + +int +bdevsw_module_handler(module_t mod, modeventtype_t what, void* arg) +{ + struct bdevsw_module_data* data = (struct bdevsw_module_data*) arg; + int error; + + switch (what) { + case MOD_LOAD: + /* + * XXX hack alert. + */ + if (isdisk(data->bdev, VBLK) && data->bdevsw->d_flags != D_DISK) { + printf("bdevsw_module_handler: adding D_DISK flag for device %d\n", + major(data->bdev)); + data->bdevsw->d_flags = D_DISK; + } + cdevsw_make(data->bdevsw); + if (error = cdevsw_add(&data->cdev, data->bdevsw->d_cdev, NULL)) + return error; + if (error = bdevsw_add(&data->bdev, data->bdevsw, NULL)) + return error; + break; + + case MOD_UNLOAD: + if (error = cdevsw_add(&data->cdev, NULL, NULL)) + return error; + if (error = cdevsw_add(&data->bdev, NULL, NULL)) + return error; + break; + } + + if (data->chainevh) + return data->chainevh(mod, what, data->chainarg); + else + return 0; +} diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 04e0f1a..aaeb50b 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: kern_exec.c,v 1.81 1998/03/08 06:21:33 dyson Exp $ + * $Id: kern_exec.c,v 1.82 1998/04/17 22:36:50 des Exp $ */ #include <sys/param.h> @@ -63,7 +63,7 @@ #include <machine/reg.h> -static int *exec_copyout_strings __P((struct image_params *)); +static long *exec_copyout_strings __P((struct image_params *)); /* * XXX trouble here if sizeof(caddr_t) != sizeof(int), other parts @@ -99,7 +99,7 @@ execve(p, uap) register struct execve_args *uap; { struct nameidata nd, *ndp; - int *stack_base; + long *stack_base; int error, len, i; struct image_params image_params, *imgp; struct vattr attr; @@ -388,8 +388,10 @@ exec_map_first_page(imgp) ma[0] = vm_page_lookup(object, 0); if ((rv != VM_PAGER_OK) || (ma[0] == NULL) || (ma[0]->valid == 0)) { - vm_page_protect(ma[0], VM_PROT_NONE); - vm_page_free(ma[0]); + if (ma[0]) { + vm_page_protect(ma[0], VM_PROT_NONE); + vm_page_free(ma[0]); + } splx(s); return EIO; } @@ -473,7 +475,8 @@ exec_extract_strings(imgp) { char **argv, **envv; char *argp, *envp; - int error, length; + int error; + size_t length; /* * extract arguments first @@ -536,14 +539,14 @@ exec_extract_strings(imgp) * new arg and env vector tables. Return a pointer to the base * so that it can be used as the initial stack pointer. */ -int * +long * exec_copyout_strings(imgp) struct image_params *imgp; { int argc, envc; char **vectp; char *stringp, *destp; - int *stack_base; + long *stack_base; struct ps_strings *arginfo; int szsigcode; @@ -586,7 +589,7 @@ exec_copyout_strings(imgp) /* * vectp also becomes our initial stack base */ - stack_base = (int *)vectp; + stack_base = (long *)vectp; stringp = imgp->stringbase; argc = imgp->argc; @@ -600,14 +603,14 @@ exec_copyout_strings(imgp) /* * Fill in "ps_strings" struct for ps, w, etc. */ - suword(&arginfo->ps_argvstr, (int)vectp); + suword(&arginfo->ps_argvstr, (long)vectp); suword(&arginfo->ps_nargvstr, argc); /* * Fill in argument portion of vector table. */ for (; argc > 0; --argc) { - suword(vectp++, (int)destp); + suword(vectp++, (long)destp); while (*stringp++ != 0) destp++; destp++; @@ -616,14 +619,14 @@ exec_copyout_strings(imgp) /* a null vector table pointer seperates the argp's from the envp's */ suword(vectp++, 0); - suword(&arginfo->ps_envstr, (int)vectp); + suword(&arginfo->ps_envstr, (long)vectp); suword(&arginfo->ps_nenvstr, envc); /* * Fill in environment portion of vector table. */ for (; envc > 0; --envc) { - suword(vectp++, (int)destp); + suword(vectp++, (long)destp); while (*stringp++ != 0) destp++; destp++; diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index 384a2d2..5d927e0 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: kern_intr.c,v 1.13 1998/02/10 17:10:23 eivind Exp $ + * $Id: kern_intr.c,v 1.14 1998/04/17 04:53:39 bde Exp $ * */ @@ -78,7 +78,7 @@ intr_mux(void *arg) while (p != NULL) { int oldspl = splq(p->mask); /* inthand2_t should take (void*) argument */ - p->handler((int)p->argument); + p->handler((long)p->argument); splx(oldspl); p = p->next; } @@ -189,7 +189,7 @@ add_intrdesc(intrec *idesc) idesc->maskptr, idesc->flags) != 0) return (-1); - update_intrname(irq, (int)idesc->devdata); + update_intrname(irq, (long)idesc->devdata); /* keep reference */ intreclist_head[irq] = idesc; } else { @@ -318,7 +318,7 @@ intr_disconnect(intrec *idesc) head->argument, head->maskptr, head->flags); if (errcode == 0) - update_intrname(irq, (int)head->devdata); + update_intrname(irq, (long)head->devdata); } } splx(oldspl); @@ -410,8 +410,8 @@ register_intr(int intr, int device_id, u_int flags, intrec *idesc; flags |= INTR_EXCL; - idesc = intr_create((void *)device_id, intr, handler, - (void*)unit, maskptr, flags); + idesc = intr_create((void *)(long)device_id, intr, handler, + (void*)(long)unit, maskptr, flags); return (intr_connect(idesc)); } diff --git a/sys/kern/kern_lkm.c b/sys/kern/kern_lkm.c index 02e7d5e..e384fd9 100644 --- a/sys/kern/kern_lkm.c +++ b/sys/kern/kern_lkm.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: kern_lkm.c,v 1.47 1998/02/11 20:47:55 dima Exp $ + * $Id: kern_lkm.c,v 1.48 1998/02/12 18:02:07 eivind Exp $ */ #include "opt_devfs.h" @@ -190,7 +190,7 @@ lkmcclose(dev, flag, mode, p) static int lkmcioctl(dev, cmd, data, flag, p) dev_t dev; - int cmd; + u_long cmd; caddr_t data; int flag; struct proc *p; @@ -315,7 +315,7 @@ lkmcioctl(dev, cmd, data, flag, p) /* XXX gack */ curp->entry = (int (*) __P((struct lkm_table *, int, int))) - (*((int *)data)); + (*((long *)data)); /* call entry(load)... (assigns "private" portion) */ err = (*(curp->entry))(curp, LKM_E_LOAD, LKM_VERSION); diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index e48c1ad..e65453f 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94 - * $Id: kern_shutdown.c,v 1.31 1998/05/12 17:34:02 bde Exp $ + * $Id: kern_shutdown.c,v 1.32 1998/05/17 22:12:13 tegge Exp $ */ #include "opt_ddb.h" @@ -278,7 +278,9 @@ boot(howto) if (howto & RB_DUMP) { if (!cold) { savectx(&dumppcb); +#ifdef __i386__ dumppcb.pcb_cr3 = rcr3(); +#endif dumpsys(); } diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index d7f4dc3..9026fb2 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_sig.c 8.7 (Berkeley) 4/18/94 - * $Id: kern_sig.c,v 1.39 1998/02/06 12:13:24 eivind Exp $ + * $Id: kern_sig.c,v 1.40 1998/03/03 20:55:26 tegge Exp $ */ #include "opt_compat.h" @@ -1028,7 +1028,7 @@ issignal(p) * Return the signal's number, or fall through * to clear it from the pending mask. */ - switch ((int)p->p_sigacts->ps_sigact[signum]) { + switch ((int)(long)p->p_sigacts->ps_sigact[signum]) { case (int)SIG_DFL: /* diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c index 1f2f28b..a225192 100644 --- a/sys/kern/kern_subr.c +++ b/sys/kern/kern_subr.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_subr.c 8.3 (Berkeley) 1/21/94 - * $Id: kern_subr.c,v 1.18 1998/02/05 03:32:07 dyson Exp $ + * $Id: kern_subr.c,v 1.19 1998/02/06 12:13:25 eivind Exp $ */ #include <sys/param.h> @@ -143,9 +143,9 @@ uiomoveco(cp, n, uio, obj) case UIO_USERISPACE: if (uio->uio_rw == UIO_READ) { if (vfs_ioopt && ((cnt & PAGE_MASK) == 0) && - ((((int) iov->iov_base) & PAGE_MASK) == 0) && + ((((long) iov->iov_base) & PAGE_MASK) == 0) && ((uio->uio_offset & PAGE_MASK) == 0) && - ((((int) cp) & PAGE_MASK) == 0)) { + ((((long) cp) & PAGE_MASK) == 0)) { error = vm_uiomove(&curproc->p_vmspace->vm_map, obj, uio->uio_offset, cnt, (vm_offset_t) iov->iov_base, NULL); @@ -208,7 +208,7 @@ uioread(n, uio, obj, nread) cnt = n; if ((uio->uio_segflg == UIO_USERSPACE) && - ((((int) iov->iov_base) & PAGE_MASK) == 0) && + ((((long) iov->iov_base) & PAGE_MASK) == 0) && ((uio->uio_offset & PAGE_MASK) == 0) ) { if (cnt < PAGE_SIZE) diff --git a/sys/kern/link_aout.c b/sys/kern/link_aout.c index 58c403b..5afe7c9 100644 --- a/sys/kern/link_aout.c +++ b/sys/kern/link_aout.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: link_aout.c,v 1.4 1997/11/07 08:52:59 phk Exp $ + * $Id: link_aout.c,v 1.5 1997/11/20 20:07:50 bde Exp $ */ #include <sys/param.h> @@ -38,6 +38,8 @@ #include <a.out.h> #include <link.h> +#ifndef __alpha__ + static int link_aout_load_file(const char*, linker_file_t*); static int link_aout_lookup_symbol(linker_file_t, const char*, @@ -443,3 +445,6 @@ restart: return 0; } + +#endif /* !__alpha__ */ + diff --git a/sys/kern/makesyscalls.sh b/sys/kern/makesyscalls.sh index 9f5339b..43a8562 100644 --- a/sys/kern/makesyscalls.sh +++ b/sys/kern/makesyscalls.sh @@ -1,6 +1,6 @@ #! /bin/sh - # @(#)makesyscalls.sh 8.1 (Berkeley) 6/10/93 -# $Id: makesyscalls.sh,v 1.30 1998/02/03 17:39:13 bde Exp $ +# $Id: makesyscalls.sh,v 1.31 1998/03/09 04:00:42 jb Exp $ set -e @@ -37,7 +37,7 @@ case $# in ;; esac -if [ -f $2 ]; then +if [ -n "$2" -a -f "$2" ]; then . $2 fi @@ -112,6 +112,8 @@ s/\$//g printf "#define\t%s\n\n", sysproto_h > sysarg printf "#include <sys/signal.h>\n\n" > sysarg printf "struct proc;\n\n" > sysarg + printf "#define PAD_(t) sizeof(register_t) <= sizeof(t) ? \\\n" > sysarg + printf "\t\t0 : sizeof(register_t) - sizeof(t)\n\n" > sysarg printf " * created from%s\n */\n\n", $0 > sysnames printf "char *%s[] = {\n", namesname > sysnames @@ -257,12 +259,13 @@ s/\$//g if (argc != 0 && $2 != "NOARGS" && $2 != "NOPROTO") { printf("struct\t%s {\n", argalias) > sysarg for (i = 1; i <= argc; i++) - printf("\t%s %s;\n", argtype[i], - argname[i]) > sysarg + printf("\t%s %s;\tchar %s_[PAD_(%s)];\n", + argtype[i], argname[i], + argname[i], argtype[i]) > sysarg printf("};\n") > sysarg } else if($2 != "NOARGS" && $2 != "NOPROTO") - printf("struct\t%s {\n\tint dummy;\n};\n", \ + printf("struct\t%s {\n\tregister_t dummy;\n};\n", \ argalias) > sysarg } if ($2 != "NOPROTO" && (!nosys || funcname != "nosys") && \ @@ -307,12 +310,13 @@ s/\$//g if (argc != 0 && $2 != "CPT_NOA") { printf("struct\t%s {\n", argalias) > syscompat for (i = 1; i <= argc; i++) - printf("\t%s %s;\n", argtype[i], - argname[i]) > syscompat + printf("\t%s %s;\tchar %s_[PAD_(%s)];\n", + argtype[i], argname[i], + argname[i], argtype[i]) > syscompat printf("};\n") > syscompat } else if($2 != "CPT_NOA") - printf("struct\t%s {\n\tint dummy;\n};\n", \ + printf("struct\t%s {\n\tregister_t dummy;\n};\n", \ argalias) > sysarg printf("%s\to%s __P((struct proc *, struct %s *));\n", \ rettype, funcname, argalias) > syscompatdcl @@ -369,9 +373,11 @@ s/\$//g exit 1 } END { - printf("\n#endif /* %s */\n", compat) > syscompatdcl + printf("\n#endif /* %s */\n\n", compat) > syscompatdcl + printf("#undef PAD_\n") > syscompatdcl printf("\n#endif /* !%s */\n", sysproto_h) > syscompatdcl + printf("};\n") > sysent printf("};\n") > sysnames printf("#define\t%sMAXSYSCALL\t%d\n", syscallprefix, syscall) \ diff --git a/sys/kern/md5c.c b/sys/kern/md5c.c index 2b23ac7..d6175ee 100644 --- a/sys/kern/md5c.c +++ b/sys/kern/md5c.c @@ -22,7 +22,7 @@ * These notices must be retained in any copies of any part of this * documentation and/or software. * - * $Id: md5c.c,v 1.13 1998/04/15 17:46:21 bde Exp $ + * $Id: md5c.c,v 1.14 1998/05/01 16:40:19 bde Exp $ * * This code is the same as the code published by RSA Inc. It has been * edited for clarity and style only. @@ -44,7 +44,7 @@ #define memcpy(x,y,z) bcopy(y, x, z) #endif -#ifdef __i386__ +#if defined(__i386__) || defined(__alpha__) #define Encode memcpy #define Decode memcpy #else /* __i386__ */ diff --git a/sys/kern/subr_log.c b/sys/kern/subr_log.c index d35f83b..80193d4 100644 --- a/sys/kern/subr_log.c +++ b/sys/kern/subr_log.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)subr_log.c 8.1 (Berkeley) 6/10/93 - * $Id: subr_log.c,v 1.28 1998/05/19 08:58:51 phk Exp $ + * $Id: subr_log.c,v 1.29 1998/05/28 09:30:20 phk Exp $ */ /* @@ -199,7 +199,7 @@ logwakeup() static int logioctl(dev, com, data, flag, p) dev_t dev; - int com; + u_long com; caddr_t data; int flag; struct proc *p; diff --git a/sys/kern/subr_xxx.c b/sys/kern/subr_xxx.c index 06e7320..6145679 100644 --- a/sys/kern/subr_xxx.c +++ b/sys/kern/subr_xxx.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)subr_xxx.c 8.1 (Berkeley) 6/10/93 - * $Id: subr_xxx.c,v 1.8 1997/02/22 09:39:18 peter Exp $ + * $Id: subr_xxx.c,v 1.9 1997/09/14 02:50:28 peter Exp $ */ /* @@ -124,7 +124,7 @@ nowrite(dev, uio, ioflag) int noioctl(dev, cmd, data, flags, p) dev_t dev; - int cmd; + u_long cmd; caddr_t data; int flags; struct proc *p; @@ -267,7 +267,7 @@ nxwrite(dev, uio, ioflag) int nxioctl(dev, cmd, data, flags, p) dev_t dev; - int cmd; + u_long cmd; caddr_t data; int flags; struct proc *p; diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index c6b9320..2c8f9ae 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -16,7 +16,7 @@ * 4. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: sys_pipe.c,v 1.40 1998/03/26 20:51:47 phk Exp $ + * $Id: sys_pipe.c,v 1.41 1998/03/28 10:33:07 bde Exp $ */ /* @@ -93,7 +93,7 @@ static int pipe_write __P((struct file *fp, struct uio *uio, static int pipe_close __P((struct file *fp, struct proc *p)); static int pipe_poll __P((struct file *fp, int events, struct ucred *cred, struct proc *p)); -static int pipe_ioctl __P((struct file *fp, int cmd, caddr_t data, struct proc *p)); +static int pipe_ioctl __P((struct file *fp, u_long cmd, caddr_t data, struct proc *p)); static struct fileops pipeops = { pipe_read, pipe_write, pipe_ioctl, pipe_poll, pipe_close }; @@ -927,7 +927,7 @@ pipe_write(fp, uio, cred) int pipe_ioctl(fp, cmd, data, p) struct file *fp; - int cmd; + u_long cmd; register caddr_t data; struct proc *p; { diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index 8231b23..bc45495 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: sys_process.c,v 1.36 1998/02/06 12:13:27 eivind Exp $ + * $Id: sys_process.c,v 1.37 1998/05/19 00:00:12 tegge Exp $ */ #include <sys/param.h> @@ -338,7 +338,7 @@ ptrace(curp, uap) if (uap->addr != (caddr_t)1) { fill_eproc (p, &p->p_addr->u_kproc.kp_eproc); - if ((error = ptrace_set_pc (p, (u_int)uap->addr))) { + if ((error = ptrace_set_pc (p, (u_long)uap->addr))) { PRELE(p); return error; } @@ -406,11 +406,11 @@ ptrace(curp, uap) return (error); case PT_READ_U: - if ((u_int)uap->addr > (UPAGES * PAGE_SIZE - sizeof(int))) { + if ((u_long)uap->addr > (UPAGES * PAGE_SIZE - sizeof(long))) { return EFAULT; } if (ptrace_read_u_check(p,(vm_offset_t) uap->addr, - sizeof(int)) && + sizeof(long)) && !procfs_kmemaccess(curp)) { return EFAULT; } @@ -419,7 +419,7 @@ ptrace(curp, uap) if (p->p_flag & P_INMEM) { p->p_addr->u_kproc.kp_proc = *p; fill_eproc (p, &p->p_addr->u_kproc.kp_eproc); - curp->p_retval[0] = *(int*)((u_int)p->p_addr + (u_int)uap->addr); + curp->p_retval[0] = *(long*)((u_long)p->p_addr + (u_long)uap->addr); } else { curp->p_retval[0] = 0; error = EFAULT; diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c index 5814c3a..5b65bea 100644 --- a/sys/kern/sys_socket.c +++ b/sys/kern/sys_socket.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)sys_socket.c 8.1 (Berkeley) 6/10/93 - * $Id: sys_socket.c,v 1.16 1997/09/14 02:52:15 peter Exp $ + * $Id: sys_socket.c,v 1.17 1998/03/28 10:33:07 bde Exp $ */ #include <sys/param.h> @@ -83,7 +83,7 @@ soo_write(fp, uio, cred) int soo_ioctl(fp, cmd, data, p) struct file *fp; - int cmd; + u_long cmd; register caddr_t data; struct proc *p; { diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index a26615c..bf55a2b 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1,4 +1,4 @@ - $Id: syscalls.master,v 1.50 1998/05/11 03:55:27 dyson Exp $ + $Id: syscalls.master,v 1.51 1998/05/14 11:28:11 peter Exp $ ; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94 ; ; System call name/number master file. @@ -150,7 +150,7 @@ 89 STD BSD { int getdtablesize(void); } 90 STD POSIX { int dup2(u_int from, u_int to); } 91 UNIMPL BSD getdopt -92 STD POSIX { int fcntl(int fd, int cmd, int arg); } +92 STD POSIX { int fcntl(int fd, int cmd, long arg); } ; XXX should be { int fcntl(int fd, int cmd, ...); } ; but we're not ready for varargs. ; XXX man page says `int arg' too. diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 56fc183..7793446 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -38,7 +38,7 @@ static volatile int ttyverbose = 0; * SUCH DAMAGE. * * @(#)tty.c 8.8 (Berkeley) 1/21/94 - * $Id: tty.c,v 1.102 1998/03/30 09:50:54 phk Exp $ + * $Id: tty.c,v 1.103 1998/05/17 20:08:05 bde Exp $ */ /*- @@ -695,7 +695,8 @@ ttyoutput(c, tp) int ttioctl(tp, cmd, data, flag) register struct tty *tp; - int cmd, flag; + u_long cmd; + int flag; void *data; { register struct proc *p; diff --git a/sys/kern/tty_compat.c b/sys/kern/tty_compat.c index 59a3c4f..fa2ae5c 100644 --- a/sys/kern/tty_compat.c +++ b/sys/kern/tty_compat.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tty_compat.c 8.1 (Berkeley) 6/10/93 - * $Id: tty_compat.c,v 1.26 1998/01/25 17:25:34 steve Exp $ + * $Id: tty_compat.c,v 1.27 1998/02/25 06:16:37 bde Exp $ */ #include "opt_compat.h" @@ -99,7 +99,7 @@ ttcompatspeedtab(speed, table) int ttsetcompat(tp, com, data, term) register struct tty *tp; - int *com; + u_long *com; caddr_t data; struct termios *term; { @@ -182,7 +182,7 @@ ttsetcompat(tp, com, data, term) int ttcompat(tp, com, data, flag) register struct tty *tp; - int com; + u_long com; caddr_t data; int flag; { diff --git a/sys/kern/tty_conf.c b/sys/kern/tty_conf.c index 714a4a5..12f26e0 100644 --- a/sys/kern/tty_conf.c +++ b/sys/kern/tty_conf.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)tty_conf.c 8.4 (Berkeley) 1/21/94 - * $Id: tty_conf.c,v 1.11 1997/12/06 13:24:04 bde Exp $ + * $Id: tty_conf.c,v 1.12 1997/12/16 17:40:27 eivind Exp $ */ #include "opt_compat.h" @@ -200,7 +200,7 @@ l_nostart(tp) static int l_nullioctl(tp, cmd, data, flags, p) struct tty *tp; - int cmd; + u_long cmd; char *data; int flags; struct proc *p; diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c index a90283a..fceb4dd 100644 --- a/sys/kern/tty_cons.c +++ b/sys/kern/tty_cons.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)cons.c 7.2 (Berkeley) 5/9/91 - * $Id: cons.c,v 1.56 1998/01/24 02:54:12 eivind Exp $ + * $Id: cons.c,v 1.57 1998/03/28 10:32:56 bde Exp $ */ #include "opt_devfs.h" @@ -352,7 +352,7 @@ cnwrite(dev, uio, flag) static int cnioctl(dev, cmd, data, flag, p) dev_t dev; - int cmd; + u_long cmd; caddr_t data; int flag; struct proc *p; diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index c9c24e3..7c5df09 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tty_pty.c 8.4 (Berkeley) 2/20/95 - * $Id: tty_pty.c,v 1.50 1998/01/24 02:54:35 eivind Exp $ + * $Id: tty_pty.c,v 1.51 1998/02/25 06:19:15 bde Exp $ */ /* @@ -635,7 +635,7 @@ ptydevtotty(dev) static int ptyioctl(dev, cmd, data, flag, p) dev_t dev; - int cmd; + u_long cmd; caddr_t data; int flag; struct proc *p; diff --git a/sys/kern/tty_snoop.c b/sys/kern/tty_snoop.c index 4679f01..c4b13e5 100644 --- a/sys/kern/tty_snoop.c +++ b/sys/kern/tty_snoop.c @@ -395,7 +395,7 @@ snpdown(snp) static int snpioctl(dev, cmd, data, flags, p) dev_t dev; - int cmd; + u_long cmd; caddr_t data; int flags; struct proc *p; diff --git a/sys/kern/tty_tty.c b/sys/kern/tty_tty.c index e5a9791..409be70 100644 --- a/sys/kern/tty_tty.c +++ b/sys/kern/tty_tty.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tty_tty.c 8.2 (Berkeley) 9/23/93 - * $Id: tty_tty.c,v 1.22 1998/01/24 02:54:35 eivind Exp $ + * $Id: tty_tty.c,v 1.23 1998/02/20 13:46:56 bde Exp $ */ /* @@ -141,7 +141,7 @@ cttywrite(dev, uio, flag) static int cttyioctl(dev, cmd, addr, flag, p) dev_t dev; - int cmd; + u_long cmd; caddr_t addr; int flag; struct proc *p; diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c index 79de43c..a056020 100644 --- a/sys/kern/uipc_sockbuf.c +++ b/sys/kern/uipc_sockbuf.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)uipc_socket2.c 8.1 (Berkeley) 6/10/93 - * $Id: uipc_socket2.c,v 1.35 1998/05/17 11:52:56 phk Exp $ + * $Id: uipc_socket2.c,v 1.36 1998/05/31 18:38:43 peter Exp $ */ #include <sys/param.h> @@ -839,7 +839,7 @@ pru_connect2_notsupp(struct socket *so1, struct socket *so2) } int -pru_control_notsupp(struct socket *so, int cmd, caddr_t data, +pru_control_notsupp(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp, struct proc *p) { return EOPNOTSUPP; diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c index 79de43c..a056020 100644 --- a/sys/kern/uipc_socket2.c +++ b/sys/kern/uipc_socket2.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)uipc_socket2.c 8.1 (Berkeley) 6/10/93 - * $Id: uipc_socket2.c,v 1.35 1998/05/17 11:52:56 phk Exp $ + * $Id: uipc_socket2.c,v 1.36 1998/05/31 18:38:43 peter Exp $ */ #include <sys/param.h> @@ -839,7 +839,7 @@ pru_connect2_notsupp(struct socket *so1, struct socket *so2) } int -pru_control_notsupp(struct socket *so, int cmd, caddr_t data, +pru_control_notsupp(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp, struct proc *p) { return EOPNOTSUPP; diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index 7edf44a..f4d947d 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 - * $Id: vfs_subr.c,v 1.152 1998/04/19 23:32:03 julian Exp $ + * $Id: vfs_subr.c,v 1.153 1998/05/17 19:38:55 tegge Exp $ */ /* @@ -241,6 +241,8 @@ vfs_rootmountalloc(fstypename, devname, mpp) struct vfsconf *vfsp; struct mount *mp; + if (fstypename == NULL) + return (ENODEV); for (vfsp = vfsconf; vfsp; vfsp = vfsp->vfc_next) if (!strcmp(vfsp->vfc_name, fstypename)) break; diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index b79f0f5..4842c9f 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94 - * $Id: vfs_syscalls.c,v 1.100 1998/05/07 04:58:23 msmith Exp $ + * $Id: vfs_syscalls.c,v 1.101 1998/05/11 03:55:28 dyson Exp $ */ /* For 4.3 integer FS ID compatibility */ @@ -1004,7 +1004,7 @@ mknod(p, uap) register struct vnode *vp; struct vattr vattr; int error; - int whiteout; + int whiteout = 0; struct nameidata nd; error = suser(p->p_ucred, &p->p_acflag); diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 709d863..b2d0954 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_lookup.c 8.4 (Berkeley) 2/16/94 - * $Id: vfs_lookup.c,v 1.26 1998/02/15 04:17:07 dyson Exp $ + * $Id: vfs_lookup.c,v 1.27 1998/04/08 18:31:57 wosch Exp $ */ #include "opt_ktrace.h" @@ -107,10 +107,10 @@ namei(ndp) cnp->cn_pnbuf = zalloc(namei_zone); if (ndp->ni_segflg == UIO_SYSSPACE) error = copystr(ndp->ni_dirp, cnp->cn_pnbuf, - MAXPATHLEN, (u_int *)&ndp->ni_pathlen); + MAXPATHLEN, (size_t *)&ndp->ni_pathlen); else error = copyinstr(ndp->ni_dirp, cnp->cn_pnbuf, - MAXPATHLEN, (u_int *)&ndp->ni_pathlen); + MAXPATHLEN, (size_t *)&ndp->ni_pathlen); /* * Don't allow empty pathnames. diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 7edf44a..f4d947d 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 - * $Id: vfs_subr.c,v 1.152 1998/04/19 23:32:03 julian Exp $ + * $Id: vfs_subr.c,v 1.153 1998/05/17 19:38:55 tegge Exp $ */ /* @@ -241,6 +241,8 @@ vfs_rootmountalloc(fstypename, devname, mpp) struct vfsconf *vfsp; struct mount *mp; + if (fstypename == NULL) + return (ENODEV); for (vfsp = vfsconf; vfsp; vfsp = vfsp->vfc_next) if (!strcmp(vfsp->vfc_name, fstypename)) break; diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index b79f0f5..4842c9f 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94 - * $Id: vfs_syscalls.c,v 1.100 1998/05/07 04:58:23 msmith Exp $ + * $Id: vfs_syscalls.c,v 1.101 1998/05/11 03:55:28 dyson Exp $ */ /* For 4.3 integer FS ID compatibility */ @@ -1004,7 +1004,7 @@ mknod(p, uap) register struct vnode *vp; struct vattr vattr; int error; - int whiteout; + int whiteout = 0; struct nameidata nd; error = suser(p->p_ucred, &p->p_acflag); diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index efee10e..9d4d991 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_vnops.c 8.2 (Berkeley) 1/21/94 - * $Id: vfs_vnops.c,v 1.56 1998/04/10 00:09:04 alex Exp $ + * $Id: vfs_vnops.c,v 1.57 1998/05/07 04:58:25 msmith Exp $ */ #include <sys/param.h> @@ -52,7 +52,7 @@ #include <sys/ttycom.h> static int vn_closefile __P((struct file *fp, struct proc *p)); -static int vn_ioctl __P((struct file *fp, int com, caddr_t data, +static int vn_ioctl __P((struct file *fp, u_long com, caddr_t data, struct proc *p)); static int vn_read __P((struct file *fp, struct uio *uio, struct ucred *cred)); @@ -442,7 +442,7 @@ vn_stat(vp, sb, p) static int vn_ioctl(fp, com, data, p) struct file *fp; - int com; + u_long com; caddr_t data; struct proc *p; { diff --git a/sys/miscfs/procfs/procfs_mem.c b/sys/miscfs/procfs/procfs_mem.c index 29c883c..27cb4f5 100644 --- a/sys/miscfs/procfs/procfs_mem.c +++ b/sys/miscfs/procfs/procfs_mem.c @@ -37,7 +37,7 @@ * * @(#)procfs_mem.c 8.5 (Berkeley) 6/15/94 * - * $Id: procfs_mem.c,v 1.31 1998/04/17 22:36:55 des Exp $ + * $Id: procfs_mem.c,v 1.32 1998/05/19 00:00:14 tegge Exp $ */ /* @@ -159,7 +159,7 @@ procfs_rwmem(curp, p, uio) fill_eproc (p, &p->p_addr->u_kproc.kp_eproc); /* locate the in-core address */ - tkva = (u_int)p->p_addr + uva - VM_MAXUSER_ADDRESS; + tkva = (u_long)p->p_addr + uva - VM_MAXUSER_ADDRESS; /* transfer it */ error = uiomove((caddr_t)tkva, len, uio); diff --git a/sys/miscfs/procfs/procfs_vfsops.c b/sys/miscfs/procfs/procfs_vfsops.c index f75de09..0827be1 100644 --- a/sys/miscfs/procfs/procfs_vfsops.c +++ b/sys/miscfs/procfs/procfs_vfsops.c @@ -36,7 +36,7 @@ * * @(#)procfs_vfsops.c 8.7 (Berkeley) 5/10/95 * - * $Id: procfs_vfsops.c,v 1.20 1998/03/01 22:46:22 msmith Exp $ + * $Id: procfs_vfsops.c,v 1.21 1998/05/06 05:29:36 msmith Exp $ */ /* @@ -75,7 +75,7 @@ procfs_mount(mp, path, data, ndp, p) struct nameidata *ndp; struct proc *p; { - u_int size; + size_t size; if (UIO_MX & (UIO_MX-1)) { log(LOG_ERR, "procfs: invalid directory entry size\n"); diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c index a168bc8..ef39ab5 100644 --- a/sys/miscfs/specfs/spec_vnops.c +++ b/sys/miscfs/specfs/spec_vnops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)spec_vnops.c 8.14 (Berkeley) 5/21/95 - * $Id: spec_vnops.c,v 1.61 1998/04/19 23:32:26 julian Exp $ + * $Id: spec_vnops.c,v 1.62 1998/05/21 07:47:49 dyson Exp $ */ #include <sys/param.h> @@ -431,7 +431,7 @@ spec_ioctl(ap) ap->a_fflag, ap->a_p)); case VBLK: - if (ap->a_command == 0 && (int)ap->a_data == B_TAPE) + if (ap->a_command == 0 && (long)ap->a_data == B_TAPE) if ((bdevsw[major(dev)]->d_flags & D_TYPEMASK) == D_TAPE) return (0); diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 1b8ae26..136edf0 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -37,7 +37,7 @@ * * @(#)bpf.c 8.2 (Berkeley) 3/28/94 * - * $Id: bpf.c,v 1.37 1998/01/24 02:54:37 eivind Exp $ + * $Id: bpf.c,v 1.38 1998/02/20 13:46:57 bde Exp $ */ #include "bpfilter.h" @@ -623,7 +623,7 @@ reset_d(d) static int bpfioctl(dev, cmd, addr, flags, p) dev_t dev; - int cmd; + u_long cmd; caddr_t addr; int flags; struct proc *p; diff --git a/sys/net/if.c b/sys/net/if.c index 1bedc1d..5030b3f 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if.c 8.3 (Berkeley) 1/4/94 - * $Id: if.c,v 1.57 1997/12/16 17:40:34 eivind Exp $ + * $Id: if.c,v 1.58 1998/04/06 11:43:10 phk Exp $ */ #include "opt_compat.h" @@ -57,7 +57,7 @@ * System initialization */ -static int ifconf __P((int, caddr_t)); +static int ifconf __P((u_long, caddr_t)); static void ifinit __P((void *)); static void if_qflush __P((struct ifqueue *)); static void if_slowtimo __P((void *)); @@ -522,7 +522,7 @@ ifunit(name) int ifioctl(so, cmd, data, p) struct socket *so; - int cmd; + u_long cmd; caddr_t data; struct proc *p; { @@ -768,7 +768,7 @@ ifpromisc(ifp, pswitch) /*ARGSUSED*/ static int ifconf(cmd, data) - int cmd; + u_long cmd; caddr_t data; { register struct ifconf *ifc = (struct ifconf *)data; diff --git a/sys/net/if_disc.c b/sys/net/if_disc.c index 483ed77..796061e 100644 --- a/sys/net/if_disc.c +++ b/sys/net/if_disc.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * From: @(#)if_loop.c 8.1 (Berkeley) 6/10/93 - * $Id: if_disc.c,v 1.18 1997/08/02 14:32:36 bde Exp $ + * $Id: if_disc.c,v 1.19 1998/01/08 23:41:21 eivind Exp $ */ /* @@ -67,7 +67,7 @@ static struct ifnet dsif; static int dsoutput(struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *); static void dsrtrequest(int cmd, struct rtentry *rt, struct sockaddr *sa); -static int dsioctl(struct ifnet *, int, caddr_t); +static int dsioctl(struct ifnet *, u_long, caddr_t); /* ARGSUSED */ static void @@ -153,7 +153,7 @@ dsrtrequest(cmd, rt, sa) static int dsioctl(ifp, cmd, data) register struct ifnet *ifp; - int cmd; + u_long cmd; caddr_t data; { register struct ifaddr *ifa; diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index 8da57de..f594525 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if_loop.c 8.1 (Berkeley) 6/10/93 - * $Id: if_loop.c,v 1.30 1998/01/09 00:51:57 eivind Exp $ + * $Id: if_loop.c,v 1.31 1998/04/30 19:37:00 phk Exp $ */ /* @@ -84,7 +84,7 @@ #include "bpfilter.h" -static int loioctl __P((struct ifnet *, int, caddr_t)); +static int loioctl __P((struct ifnet *, u_long, caddr_t)); static void lortrequest __P((int, struct rtentry *, struct sockaddr *)); static void loopattach __P((void *)); @@ -248,7 +248,7 @@ lortrequest(cmd, rt, sa) static int loioctl(ifp, cmd, data) register struct ifnet *ifp; - int cmd; + u_long cmd; caddr_t data; { register struct ifaddr *ifa; diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c index bf43b64..8bbec24 100644 --- a/sys/net/if_ppp.c +++ b/sys/net/if_ppp.c @@ -69,7 +69,7 @@ * Paul Mackerras (paulus@cs.anu.edu.au). */ -/* $Id: if_ppp.c,v 1.56 1998/04/06 11:43:10 phk Exp $ */ +/* $Id: if_ppp.c,v 1.57 1998/05/19 14:04:09 dg Exp $ */ /* from if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp */ /* from NetBSD: if_ppp.c,v 1.15.2.2 1994/07/28 05:17:58 cgd Exp */ @@ -129,7 +129,9 @@ #include <net/if_pppvar.h> /* minimise diffs */ +#ifndef splsoftnet #define splsoftnet splnet +#endif #ifdef PPP_COMPRESS #define PACKETPTR struct mbuf * @@ -144,7 +146,7 @@ extern void pppasyncattach __P((void *)); static void pppattach __P((void *)); PSEUDO_SET(pppattach, if_ppp); -static int pppsioctl __P((struct ifnet *ifp, int cmd, caddr_t data)); +static int pppsioctl __P((struct ifnet *ifp, u_long cmd, caddr_t data)); static void pppintr __P((void)); static void ppp_requeue __P((struct ppp_softc *)); @@ -347,7 +349,7 @@ pppdealloc(sc) int pppioctl(sc, cmd, data, flag, p) struct ppp_softc *sc; - int cmd; + u_long cmd; caddr_t data; int flag; struct proc *p; @@ -563,7 +565,7 @@ pppioctl(sc, cmd, data, flag, p) static int pppsioctl(ifp, cmd, data) register struct ifnet *ifp; - int cmd; + u_long cmd; caddr_t data; { struct proc *p = curproc; /* XXX */ diff --git a/sys/net/if_pppvar.h b/sys/net/if_pppvar.h index 31d6ff5..c764daf 100644 --- a/sys/net/if_pppvar.h +++ b/sys/net/if_pppvar.h @@ -39,7 +39,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: if_pppvar.h,v 1.11 1997/10/17 21:50:32 roberto Exp $ + * $Id: if_pppvar.h,v 1.12 1997/10/18 00:46:10 peter Exp $ */ /* @@ -102,7 +102,7 @@ extern struct ppp_softc ppp_softc[NPPP]; struct ppp_softc *pppalloc __P((pid_t pid)); void pppdealloc __P((struct ppp_softc *sc)); -int pppioctl __P((struct ppp_softc *sc, int cmd, caddr_t data, +int pppioctl __P((struct ppp_softc *sc, u_long cmd, caddr_t data, int flag, struct proc *p)); int pppoutput __P((struct ifnet *ifp, struct mbuf *m0, struct sockaddr *dst, struct rtentry *rtp)); diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c index 1b0cc01..fc83a485 100644 --- a/sys/net/if_sl.c +++ b/sys/net/if_sl.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if_sl.c 8.6 (Berkeley) 2/1/94 - * $Id: if_sl.c,v 1.67 1998/02/13 12:46:14 phk Exp $ + * $Id: if_sl.c,v 1.68 1998/03/30 09:52:00 phk Exp $ */ /* @@ -187,8 +187,8 @@ static timeout_t sl_keepalive; static timeout_t sl_outfill; static int slclose __P((struct tty *,int)); static int slinput __P((int, struct tty *)); -static int slioctl __P((struct ifnet *, int, caddr_t)); -static int sltioctl __P((struct tty *, int, caddr_t, int, struct proc *)); +static int slioctl __P((struct ifnet *, u_long, caddr_t)); +static int sltioctl __P((struct tty *, u_long, caddr_t, int, struct proc *)); static int slopen __P((dev_t, struct tty *)); static int sloutput __P((struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *)); @@ -361,7 +361,7 @@ slclose(tp,flag) static int sltioctl(tp, cmd, data, flag, p) struct tty *tp; - int cmd; + u_long cmd; caddr_t data; int flag; struct proc *p; @@ -747,7 +747,7 @@ sl_btom(sc, len) } sc->sc_ep = mtod(m, u_char *) + SLBUFSIZE; m->m_data = (caddr_t)sc->sc_buf; - m->m_ext.ext_buf = (caddr_t)((int)sc->sc_buf &~ MCLOFSET); + m->m_ext.ext_buf = (caddr_t)((long)sc->sc_buf &~ MCLOFSET); } else bcopy((caddr_t)sc->sc_buf, mtod(m, caddr_t), len); @@ -941,7 +941,7 @@ newpack: static int slioctl(ifp, cmd, data) register struct ifnet *ifp; - int cmd; + u_long cmd; caddr_t data; { register struct ifaddr *ifa = (struct ifaddr *)data; diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index 4b7b29c..e00ce0c 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -78,7 +78,7 @@ static struct tun_softc tunctl[NTUN]; static int tunoutput __P((struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *rt)); -static int tunifioctl __P((struct ifnet *, int, caddr_t)); +static int tunifioctl __P((struct ifnet *, u_long, caddr_t)); static int tuninit __P((int)); static d_open_t tunopen; @@ -260,7 +260,7 @@ tuninit(unit) int tunifioctl(ifp, cmd, data) struct ifnet *ifp; - int cmd; + u_long cmd; caddr_t data; { register struct ifreq *ifr = (struct ifreq *)data; @@ -388,7 +388,7 @@ tunoutput(ifp, m0, dst, rt) static int tunioctl(dev, cmd, data, flag, p) dev_t dev; - int cmd; + u_long cmd; caddr_t data; int flag; struct proc *p; diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 69036d1..f01dac3 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * From: @(#)if.h 8.1 (Berkeley) 6/10/93 - * $Id: if_var.h,v 1.6 1997/08/28 01:17:09 julian Exp $ + * $Id: if_var.h,v 1.7 1998/04/15 17:46:44 bde Exp $ */ #ifndef _NET_IF_VAR_H_ @@ -121,7 +121,7 @@ struct ifnet { int (*if_done) /* output complete routine */ __P((struct ifnet *)); /* (XXX not used; fake prototype) */ int (*if_ioctl) /* ioctl routine */ - __P((struct ifnet *, int, caddr_t)); + __P((struct ifnet *, u_long, caddr_t)); void (*if_watchdog) /* timer routine */ __P((struct ifnet *)); int (*if_poll_recv) /* polled receive routine */ @@ -305,7 +305,7 @@ void if_up __P((struct ifnet *)); void ifubareset __P((int)); #endif /*void ifinit __P((void));*/ /* declared in systm.h for main() */ -int ifioctl __P((struct socket *, int, caddr_t, struct proc *)); +int ifioctl __P((struct socket *, u_long, caddr_t, struct proc *)); int ifpromisc __P((struct ifnet *, int)); struct ifnet *ifunit __P((char *)); diff --git a/sys/net/ppp_tty.c b/sys/net/ppp_tty.c index 6042d20..6cfbf18 100644 --- a/sys/net/ppp_tty.c +++ b/sys/net/ppp_tty.c @@ -70,7 +70,7 @@ * Paul Mackerras (paulus@cs.anu.edu.au). */ -/* $Id: ppp_tty.c,v 1.34 1998/04/15 17:46:46 bde Exp $ */ +/* $Id: ppp_tty.c,v 1.35 1998/05/01 16:40:21 bde Exp $ */ #include "ppp.h" #if NPPP > 0 @@ -112,7 +112,7 @@ static int pppopen __P((dev_t dev, struct tty *tp)); static int pppclose __P((struct tty *tp, int flag)); static int pppread __P((struct tty *tp, struct uio *uio, int flag)); static int pppwrite __P((struct tty *tp, struct uio *uio, int flag)); -static int ppptioctl __P((struct tty *tp, int cmd, caddr_t data, int flag, +static int ppptioctl __P((struct tty *tp, u_long cmd, caddr_t data, int flag, struct proc *)); static int pppinput __P((int c, struct tty *tp)); static int pppstart __P((struct tty *tp)); @@ -465,7 +465,7 @@ pppwrite(tp, uio, flag) static int ppptioctl(tp, cmd, data, flag, p) struct tty *tp; - int cmd; + u_long cmd; caddr_t data; int flag; struct proc *p; diff --git a/sys/netatalk/at_control.c b/sys/netatalk/at_control.c index 2198891..a5afb78 100644 --- a/sys/netatalk/at_control.c +++ b/sys/netatalk/at_control.c @@ -41,7 +41,7 @@ static int aa_claim_addr(struct ifaddr *ifa, struct sockaddr *gw); (a)->sat_addr.s_node == (b)->sat_addr.s_node ) int -at_control(struct socket *so, int cmd, caddr_t data, +at_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp, struct proc *p ) { struct ifreq *ifr = (struct ifreq *)data; diff --git a/sys/netatalk/at_extern.h b/sys/netatalk/at_extern.h index 293a074..8191d4f 100644 --- a/sys/netatalk/at_extern.h +++ b/sys/netatalk/at_extern.h @@ -21,7 +21,7 @@ struct socket; extern void aarp_clean __P((void)); extern int at_control __P(( struct socket *so, - int cmd, + u_long cmd, caddr_t data, struct ifnet *ifp, struct proc *p )); diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index ddd721ab..c744e7f 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if_ether.c 8.1 (Berkeley) 6/10/93 - * $Id: if_ether.c,v 1.44 1998/03/30 09:52:40 phk Exp $ + * $Id: if_ether.c,v 1.45 1998/05/23 08:03:40 phk Exp $ */ /* @@ -104,7 +104,7 @@ SYSCTL_INT(_net_link_ether_inet, OID_AUTO, proxyall, CTLFLAG_RW, &arp_proxyall, 0, ""); static void arp_rtrequest __P((int, struct rtentry *, struct sockaddr *)); -static void arprequest __P((struct arpcom *, u_long *, u_long *, u_char *)); +static void arprequest __P((struct arpcom *, u_int32_t *, u_int32_t *, u_char *)); static void arpintr __P((void)); static void arptfree __P((struct llinfo_arp *)); static void arptimer __P((void *)); @@ -275,7 +275,7 @@ arp_rtrequest(req, rt, sa) static void arprequest(ac, sip, tip, enaddr) register struct arpcom *ac; - register u_long *sip, *tip; + register u_int32_t *sip, *tip; register u_char *enaddr; { register struct mbuf *m; diff --git a/sys/netinet/in.c b/sys/netinet/in.c index da4a1e6..4512106 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)in.c 8.4 (Berkeley) 1/9/95 - * $Id: in.c,v 1.36 1997/10/11 18:31:31 phk Exp $ + * $Id: in.c,v 1.37 1997/10/12 20:25:23 phk Exp $ */ #include <sys/param.h> @@ -140,7 +140,7 @@ static int in_interfaces; /* number of external internet interfaces */ int in_control(so, cmd, data, ifp, p) struct socket *so; - int cmd; + u_long cmd; caddr_t data; register struct ifnet *ifp; struct proc *p; diff --git a/sys/netinet/in_systm.h b/sys/netinet/in_systm.h index d72e9b4..c536890 100644 --- a/sys/netinet/in_systm.h +++ b/sys/netinet/in_systm.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)in_systm.h 8.1 (Berkeley) 6/10/93 - * $Id$ + * $Id: in_systm.h,v 1.5 1997/02/22 09:41:30 peter Exp $ */ #ifndef _NETINET_IN_SYSTM_H_ @@ -51,10 +51,21 @@ * represent the types with the bytes in ``high-ender'' order. */ typedef u_short n_short; /* short as received from the net */ + +#ifdef __alpha__ + +typedef u_int n_long; /* long as received from the net */ + +typedef u_int n_time; /* ms since 00:00 GMT, byte rev */ + +#else + typedef u_long n_long; /* long as received from the net */ typedef u_long n_time; /* ms since 00:00 GMT, byte rev */ +#endif + #ifdef KERNEL n_time iptime __P((void)); #endif diff --git a/sys/netinet/in_var.h b/sys/netinet/in_var.h index 9254904..5db83d0 100644 --- a/sys/netinet/in_var.h +++ b/sys/netinet/in_var.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)in_var.h 8.2 (Berkeley) 1/9/95 - * $Id: in_var.h,v 1.27 1997/09/07 05:26:43 bde Exp $ + * $Id: in_var.h,v 1.28 1998/05/19 14:04:24 dg Exp $ */ #ifndef _NETINET_IN_VAR_H_ @@ -214,7 +214,7 @@ do { \ struct route; struct in_multi *in_addmulti __P((struct in_addr *, struct ifnet *)); void in_delmulti __P((struct in_multi *)); -int in_control __P((struct socket *, int, caddr_t, struct ifnet *, +int in_control __P((struct socket *, u_long, caddr_t, struct ifnet *, struct proc *)); void in_rtqdrain __P((void)); void ip_input __P((struct mbuf *)); diff --git a/sys/netinet/ip_fil.h b/sys/netinet/ip_fil.h index ecc5c3b..44a4cf2 100644 --- a/sys/netinet/ip_fil.h +++ b/sys/netinet/ip_fil.h @@ -6,7 +6,7 @@ * to the original author and the contributors. * * @(#)ip_fil.h 1.35 6/5/96 - * $Id: ip_fil.h,v 1.1.1.5 1998/03/21 10:11:12 peter Exp $ + * $Id: ip_fil.h,v 1.2 1998/03/21 13:37:44 peter Exp $ */ #ifndef __IP_FIL_H__ @@ -382,7 +382,7 @@ extern int ipf_log __P((void)); extern void ipfr_fastroute __P((ip_t *, fr_info_t *, frdest_t *)); extern struct ifnet *get_unit __P((char *)); # define FR_SCANLIST(p, ip, fi, m) fr_scanlist(p, ip, fi, m) -# if defined(__NetBSD__) || defined(__OpenBSD__) || (_BSDI_VERSION >= 199701) +# if defined(__NetBSD__) || defined(__OpenBSD__) || (_BSDI_VERSION >= 199701) || (__FreeBSD_version >= 300003) extern int iplioctl __P((dev_t, u_long, caddr_t, int)); # else extern int iplioctl __P((dev_t, int, caddr_t, int)); diff --git a/sys/netinet/mlf_ipl.c b/sys/netinet/mlf_ipl.c index 7a2cc70..d3abe3e 100644 --- a/sys/netinet/mlf_ipl.c +++ b/sys/netinet/mlf_ipl.c @@ -18,7 +18,9 @@ # include <osreldate.h> # define ACTUALLY_LKM_NOT_KERNEL # else -# define __FreeBSD_version 300000 /* this will do as a hack */ +# ifndef __FreeBSD_version +# define __FreeBSD_version 300000 /* this will do as a hack */ +# endif # endif #endif #include <sys/systm.h> diff --git a/sys/netipx/ipx.c b/sys/netipx/ipx.c index 9d95fc6..ab2f42a 100644 --- a/sys/netipx/ipx.c +++ b/sys/netipx/ipx.c @@ -33,7 +33,7 @@ * * @(#)ipx.c * - * $Id: ipx.c,v 1.10 1997/05/10 09:58:48 jhay Exp $ + * $Id: ipx.c,v 1.11 1997/06/26 19:35:42 jhay Exp $ */ #include <sys/param.h> @@ -62,7 +62,7 @@ static int ipx_ifinit(struct ifnet *ifp, struct ipx_ifaddr *ia, int ipx_control(so, cmd, data, ifp, p) struct socket *so; - int cmd; + u_long cmd; caddr_t data; register struct ifnet *ifp; struct proc *p; diff --git a/sys/netipx/ipx_ip.c b/sys/netipx/ipx_ip.c index c5d9bf7..57e8b77 100644 --- a/sys/netipx/ipx_ip.c +++ b/sys/netipx/ipx_ip.c @@ -33,7 +33,7 @@ * * @(#)ipx_ip.c * - * $Id: ipx_ip.c,v 1.19 1998/01/08 23:41:56 eivind Exp $ + * $Id: ipx_ip.c,v 1.20 1998/02/09 06:10:20 eivind Exp $ */ /* @@ -79,7 +79,7 @@ static struct ifnet_en *ipxip_list; static struct ifnet_en *ipxipattach(void); static int ipxip_free(struct ifnet *ifp); -static int ipxipioctl(struct ifnet *ifp, int cmd, caddr_t data); +static int ipxipioctl(struct ifnet *ifp, u_long cmd, caddr_t data); static int ipxipoutput(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, struct rtentry *rt); static void ipxip_rtchange(struct in_addr *dst); @@ -128,7 +128,7 @@ ipxipattach() static int ipxipioctl(ifp, cmd, data) register struct ifnet *ifp; - int cmd; + u_long cmd; caddr_t data; { int error = 0; diff --git a/sys/netipx/ipx_var.h b/sys/netipx/ipx_var.h index 1e92b76..bd05bc9 100644 --- a/sys/netipx/ipx_var.h +++ b/sys/netipx/ipx_var.h @@ -33,7 +33,7 @@ * * @(#)ipx_var.h * - * $Id: ipx_var.h,v 1.8 1997/08/16 19:15:46 wollman Exp $ + * $Id: ipx_var.h,v 1.9 1998/02/01 20:08:34 bde Exp $ */ #ifndef _NETIPX_IPX_VAR_H_ @@ -82,7 +82,7 @@ struct socket; void ipx_abort __P((struct ipxpcb *ipxp)); u_short ipx_cksum __P((struct mbuf *m, int len)); -int ipx_control __P((struct socket *so, int cmd, caddr_t data, +int ipx_control __P((struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp, struct proc *p)); void ipx_ctlinput __P((int cmd, struct sockaddr *arg_as_sa, void *dummy)); int ipx_ctloutput __P((int req, struct socket *so, int level, int name, diff --git a/sys/netnatm/natm.c b/sys/netnatm/natm.c index d27b102..8bc971d 100644 --- a/sys/netnatm/natm.c +++ b/sys/netnatm/natm.c @@ -77,7 +77,7 @@ static int natm_usr_send __P((struct socket *, int, struct mbuf *, struct sockaddr *, struct mbuf *, struct proc *)); static int natm_usr_peeraddr __P((struct socket *, struct sockaddr **)); -static int natm_usr_control __P((struct socket *, int, caddr_t, +static int natm_usr_control __P((struct socket *, u_long, caddr_t, struct ifnet *, struct proc *)); static int natm_usr_abort __P((struct socket *)); static int natm_usr_bind __P((struct socket *, struct sockaddr *, @@ -349,7 +349,7 @@ natm_usr_peeraddr(struct socket *so, struct sockaddr **nam) } static int -natm_usr_control(struct socket *so, int cmd, caddr_t arg, +natm_usr_control(struct socket *so, u_long cmd, caddr_t arg, struct ifnet *ifp, struct proc *p) { struct natmpcb *npcb; diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c index 2b1e586..d701213 100644 --- a/sys/nfs/nfs_serv.c +++ b/sys/nfs/nfs_serv.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_serv.c 8.8 (Berkeley) 7/31/95 - * $Id: nfs_serv.c,v 1.67 1998/05/31 19:43:34 peter Exp $ + * $Id: nfs_serv.c,v 1.68 1998/05/31 20:08:52 peter Exp $ */ /* @@ -3311,8 +3311,8 @@ nfsrv_pathconf(nfsd, slp, procp, mrq) register struct nfsv3_pathconf *pc; register int32_t t1; caddr_t bpos; - int error = 0, rdonly, cache, getret = 1, linkmax, namemax; - int chownres, notrunc; + int error = 0, rdonly, cache, getret = 1; + register_t linkmax, namemax, chownres, notrunc; char *cp2; struct mbuf *mb, *mb2, *mreq; struct vnode *vp; diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c index 55a003c..faf6ed9 100644 --- a/sys/nfs/nfs_socket.c +++ b/sys/nfs/nfs_socket.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_socket.c 8.5 (Berkeley) 3/30/95 - * $Id: nfs_socket.c,v 1.39 1998/05/31 19:49:30 peter Exp $ + * $Id: nfs_socket.c,v 1.40 1998/05/31 20:08:54 peter Exp $ */ /* @@ -1594,10 +1594,10 @@ nfs_realign(m, hsiz) * This never happens for UDP, rarely happens for TCP * but frequently happens for iso transport. */ - if ((m->m_len & 0x3) || (mtod(m, int) & 0x3)) { + if ((m->m_len & 0x3) || (mtod(m, long) & 0x3)) { olen = m->m_len; fcp = mtod(m, caddr_t); - if ((int)fcp & 0x3) { + if ((long)fcp & 0x3) { m->m_flags &= ~M_PKTHDR; if (m->m_flags & M_EXT) m->m_data = m->m_ext.ext_buf + diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c index 9aec408..c8cf13a 100644 --- a/sys/nfs/nfs_vfsops.c +++ b/sys/nfs/nfs_vfsops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95 - * $Id: nfs_vfsops.c,v 1.70 1998/06/01 10:01:31 peter Exp $ + * $Id: nfs_vfsops.c,v 1.71 1998/06/01 11:07:16 peter Exp $ */ #include <sys/param.h> @@ -748,7 +748,7 @@ nfs_mount(mp, path, data, ndp, p) struct sockaddr *nam; struct vnode *vp; char pth[MNAMELEN], hst[MNAMELEN]; - u_int len; + size_t len; u_char nfh[NFSX_V3FHMAX]; if (path == NULL) { diff --git a/sys/nfsclient/nfs_socket.c b/sys/nfsclient/nfs_socket.c index 55a003c..faf6ed9 100644 --- a/sys/nfsclient/nfs_socket.c +++ b/sys/nfsclient/nfs_socket.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_socket.c 8.5 (Berkeley) 3/30/95 - * $Id: nfs_socket.c,v 1.39 1998/05/31 19:49:30 peter Exp $ + * $Id: nfs_socket.c,v 1.40 1998/05/31 20:08:54 peter Exp $ */ /* @@ -1594,10 +1594,10 @@ nfs_realign(m, hsiz) * This never happens for UDP, rarely happens for TCP * but frequently happens for iso transport. */ - if ((m->m_len & 0x3) || (mtod(m, int) & 0x3)) { + if ((m->m_len & 0x3) || (mtod(m, long) & 0x3)) { olen = m->m_len; fcp = mtod(m, caddr_t); - if ((int)fcp & 0x3) { + if ((long)fcp & 0x3) { m->m_flags &= ~M_PKTHDR; if (m->m_flags & M_EXT) m->m_data = m->m_ext.ext_buf + diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index 9aec408..c8cf13a 100644 --- a/sys/nfsclient/nfs_vfsops.c +++ b/sys/nfsclient/nfs_vfsops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95 - * $Id: nfs_vfsops.c,v 1.70 1998/06/01 10:01:31 peter Exp $ + * $Id: nfs_vfsops.c,v 1.71 1998/06/01 11:07:16 peter Exp $ */ #include <sys/param.h> @@ -748,7 +748,7 @@ nfs_mount(mp, path, data, ndp, p) struct sockaddr *nam; struct vnode *vp; char pth[MNAMELEN], hst[MNAMELEN]; - u_int len; + size_t len; u_char nfh[NFSX_V3FHMAX]; if (path == NULL) { diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c index 2b1e586..d701213 100644 --- a/sys/nfsserver/nfs_serv.c +++ b/sys/nfsserver/nfs_serv.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_serv.c 8.8 (Berkeley) 7/31/95 - * $Id: nfs_serv.c,v 1.67 1998/05/31 19:43:34 peter Exp $ + * $Id: nfs_serv.c,v 1.68 1998/05/31 20:08:52 peter Exp $ */ /* @@ -3311,8 +3311,8 @@ nfsrv_pathconf(nfsd, slp, procp, mrq) register struct nfsv3_pathconf *pc; register int32_t t1; caddr_t bpos; - int error = 0, rdonly, cache, getret = 1, linkmax, namemax; - int chownres, notrunc; + int error = 0, rdonly, cache, getret = 1; + register_t linkmax, namemax, chownres, notrunc; char *cp2; struct mbuf *mb, *mb2, *mreq; struct vnode *vp; diff --git a/sys/nfsserver/nfs_srvsock.c b/sys/nfsserver/nfs_srvsock.c index 55a003c..faf6ed9 100644 --- a/sys/nfsserver/nfs_srvsock.c +++ b/sys/nfsserver/nfs_srvsock.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_socket.c 8.5 (Berkeley) 3/30/95 - * $Id: nfs_socket.c,v 1.39 1998/05/31 19:49:30 peter Exp $ + * $Id: nfs_socket.c,v 1.40 1998/05/31 20:08:54 peter Exp $ */ /* @@ -1594,10 +1594,10 @@ nfs_realign(m, hsiz) * This never happens for UDP, rarely happens for TCP * but frequently happens for iso transport. */ - if ((m->m_len & 0x3) || (mtod(m, int) & 0x3)) { + if ((m->m_len & 0x3) || (mtod(m, long) & 0x3)) { olen = m->m_len; fcp = mtod(m, caddr_t); - if ((int)fcp & 0x3) { + if ((long)fcp & 0x3) { m->m_flags &= ~M_PKTHDR; if (m->m_flags & M_EXT) m->m_data = m->m_ext.ext_buf + diff --git a/sys/pc98/pc98/wfd.c b/sys/pc98/pc98/wfd.c index ed84f5f..f63ebaa 100644 --- a/sys/pc98/pc98/wfd.c +++ b/sys/pc98/pc98/wfd.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: wfd.c,v 1.8 1998/02/13 22:41:00 pst Exp $ + * $Id: wfd.c,v 1.9 1998/03/20 23:14:52 msmith Exp $ */ /* @@ -617,7 +617,7 @@ static int wfd_request_wait (struct wfd *t, u_char cmd, u_char a1, u_char a2, * Perform special action on behalf of the user. * Knows about the internals of this device */ -int wfdioctl (dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p) +int wfdioctl (dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) { int lun = UNIT(dev); struct wfd *t = wfdtab[lun]; diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c index 09b76f5..58c8247 100644 --- a/sys/pccard/pccard.c +++ b/sys/pccard/pccard.c @@ -28,7 +28,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pccard.c,v 1.59 1998/04/20 15:21:02 nate Exp $ + * $Id: pccard.c,v 1.60 1998/05/05 13:21:08 kato Exp $ */ #include "opt_devfs.h" @@ -864,7 +864,7 @@ crdwrite(dev_t dev, struct uio *uio, int ioflag) * descriptors, and assignment of drivers. */ static int -crdioctl(dev_t dev, int cmd, caddr_t data, int fflag, struct proc *p) +crdioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p) { struct slot *slt = pccard_slots[minor(dev)]; struct mem_desc *mp; diff --git a/sys/pci/brooktree848.c b/sys/pci/brooktree848.c index 4cb4de2..3687fe7 100644 --- a/sys/pci/brooktree848.c +++ b/sys/pci/brooktree848.c @@ -309,7 +309,7 @@ SYSCTL_INT(_hw_bt848, OID_AUTO, card, CTLFLAG_RW, &bt848_card, -1, ""); SYSCTL_INT(_hw_bt848, OID_AUTO, tuner, CTLFLAG_RW, &bt848_tuner, -1, ""); SYSCTL_INT(_hw_bt848, OID_AUTO, reverse_mute, CTLFLAG_RW, &bt848_reverse_mute, -1, ""); -typedef int ioctl_cmd_t; +typedef u_long ioctl_cmd_t; #endif /* __FreeBSD__ */ #ifdef __bsdi__ diff --git a/sys/pci/if_devar.h b/sys/pci/if_devar.h index b6fdba7..eb2b4c7 100644 --- a/sys/pci/if_devar.h +++ b/sys/pci/if_devar.h @@ -1,5 +1,5 @@ /* $NetBSD: if_devar.h,v 1.26 1998/02/11 01:28:29 thorpej Exp $ */ -/* $Id: if_devar.h,v 1.4 1997/11/08 14:46:58 peter Exp $ */ +/* $Id: if_devar.h,v 1.5 1998/03/08 16:54:00 peter Exp $ */ /*- * Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com) @@ -913,7 +913,7 @@ static void tulip_softintr(void); #if defined(__FreeBSD__) typedef void ifnet_ret_t; -typedef int ioctl_cmd_t; +typedef u_long ioctl_cmd_t; #if defined(TULIP_HDR_DATA) static tulip_softc_t *tulips[TULIP_MAX_DEVICES]; #endif diff --git a/sys/pci/if_fxpvar.h b/sys/pci/if_fxpvar.h index 53945e0..a9d845b 100644 --- a/sys/pci/if_fxpvar.h +++ b/sys/pci/if_fxpvar.h @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_fxpvar.h,v 1.3 1997/09/29 11:27:43 davidg Exp $ + * $Id: if_fxpvar.h,v 1.4 1997/11/29 08:11:01 davidg Exp $ */ /* @@ -107,6 +107,6 @@ struct fxp_softc { #define FXP_FORMAT "fxp%d" #define FXP_ARGS(sc) (sc)->arpcom.ac_if.if_unit #define FXP_INTR_TYPE void -#define FXP_IOCTLCMD_TYPE int +#define FXP_IOCTLCMD_TYPE u_long #define FXP_BPFTAP_ARG(ifp) ifp #endif /* __NetBSD__ */ diff --git a/sys/pci/if_tl.c b/sys/pci/if_tl.c index 191dbad..ff49040 100644 --- a/sys/pci/if_tl.c +++ b/sys/pci/if_tl.c @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_tl.c,v 1.7 1998/05/29 16:58:46 wpaul Exp $ + * $Id: if_tl.c,v 1.8 1998/05/31 16:59:39 wpaul Exp $ */ /* @@ -240,7 +240,7 @@ #ifndef lint static char rcsid[] = - "$Id: if_tl.c,v 1.7 1998/05/29 16:58:46 wpaul Exp $"; + "$Id: if_tl.c,v 1.8 1998/05/31 16:59:39 wpaul Exp $"; #endif /* @@ -309,7 +309,7 @@ static int tl_encap __P((struct tl_softc *, struct tl_chain *, static void tl_intr __P((void *)); static void tl_start __P((struct ifnet *)); -static int tl_ioctl __P((struct ifnet *, int, caddr_t)); +static int tl_ioctl __P((struct ifnet *, u_long, caddr_t)); static void tl_init __P((void *)); static void tl_stop __P((struct tl_softc *)); static void tl_watchdog __P((struct ifnet *)); @@ -2412,7 +2412,7 @@ static void tl_ifmedia_sts(ifp, ifmr) static int tl_ioctl(ifp, command, data) struct ifnet *ifp; - int command; + u_long command; caddr_t data; { struct tl_softc *sc = ifp->if_softc; diff --git a/sys/pci/if_tx.c b/sys/pci/if_tx.c index 5e3da26..691f2fc 100644 --- a/sys/pci/if_tx.c +++ b/sys/pci/if_tx.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_tx.c,v 1.9 1998/04/13 14:15:40 semenu Exp $ + * $Id: if_tx.c,v 1.10 1998/04/15 17:47:05 bde Exp $ * */ @@ -106,7 +106,7 @@ DATA_SET ( pcidevice_set, txdevice ); static int epic_ifioctl __P(( register struct ifnet * ifp, - int command, caddr_t data)) + u_long command, caddr_t data)) { epic_softc_t *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *) data; diff --git a/sys/pci/meteor.c b/sys/pci/meteor.c index f836d14..8603018 100644 --- a/sys/pci/meteor.c +++ b/sys/pci/meteor.c @@ -1283,7 +1283,7 @@ meteor_write(dev_t dev, struct uio *uio, int ioflag) } int -meteor_ioctl(dev_t dev, int cmd, caddr_t arg, int flag, struct proc *pr) +meteor_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct proc *pr) { int error; int unit; diff --git a/sys/pci/ncr.c b/sys/pci/ncr.c index 5688af6..92dedfa 100644 --- a/sys/pci/ncr.c +++ b/sys/pci/ncr.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: ncr.c,v 1.116 1998/03/30 09:55:09 phk Exp $ +** $Id: ncr.c,v 1.117 1998/04/17 22:37:04 des Exp $ ** ** Device driver for the NCR 53C810 PCI-SCSI-Controller. ** @@ -1342,7 +1342,7 @@ static void ncr_attach (pcici_t tag, int unit); static char ident[] = - "\n$Id: ncr.c,v 1.116 1998/03/30 09:55:09 phk Exp $\n"; + "\n$Id: ncr.c,v 1.117 1998/04/17 22:37:04 des Exp $\n"; static const u_long ncr_version = NCR_VERSION * 11 + (u_long) sizeof (struct ncb) * 7 @@ -2508,7 +2508,7 @@ static struct script script0 = { ** **--------------------------------------------------------- */ -(u_long)&ident +(u_long)0 }/*--------------------------------------------------------*/ }; diff --git a/sys/pci/pci.c b/sys/pci/pci.c index 530408b..a88ee89 100644 --- a/sys/pci/pci.c +++ b/sys/pci/pci.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pci.c,v 1.81 1998/01/24 02:54:47 eivind Exp $ + * $Id: pci.c,v 1.82 1998/04/01 21:07:36 tegge Exp $ * */ @@ -31,6 +31,7 @@ #if NPCI > 0 #include "opt_devfs.h" +#include "opt_simos.h" #include <sys/param.h> #include <sys/systm.h> @@ -434,6 +435,11 @@ pci_probebus(int bus) pcicfgregs probe; int bushigh = bus; +#ifdef SIMOS +#undef PCI_SLOTMAX +#define PCI_SLOTMAX 0 +#endif + bzero(&probe, sizeof probe); probe.parent = pci_bridgeto(bus); probe.bus = bus; @@ -509,7 +515,7 @@ pci_close(dev_t dev, int flag, int devtype, struct proc *p) } static int -pci_ioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) +pci_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) { struct pci_io *io; int error; diff --git a/sys/pci/smc83c170.h b/sys/pci/smc83c170.h index 41fb4dd..03b3b3f 100644 --- a/sys/pci/smc83c170.h +++ b/sys/pci/smc83c170.h @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: smc83c170.h,v 1.6 1998/04/13 14:15:40 semenu Exp $ + * $Id: smc83c170.h,v 1.7 1998/04/15 17:47:08 bde Exp $ * */ @@ -349,7 +349,7 @@ typedef struct { static char* epic_pci_probe __P((pcici_t, pcidi_t)); /* Folowing functions calls splimp() */ -static int epic_ifioctl __P((register struct ifnet *, int, caddr_t)); +static int epic_ifioctl __P((register struct ifnet *, u_long, caddr_t)); static void epic_ifstart __P((struct ifnet *)); static void epic_ifwatchdog __P((struct ifnet *)); static void epic_pci_attach __P((pcici_t, int)); diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c index cd08d10..ec9937e 100644 --- a/sys/scsi/cd.c +++ b/sys/scsi/cd.c @@ -14,7 +14,7 @@ * * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 * - * $Id: cd.c,v 1.91 1998/04/17 22:37:06 des Exp $ + * $Id: cd.c,v 1.92 1998/04/27 11:36:04 des Exp $ */ #include "opt_bounce.h" @@ -119,7 +119,7 @@ static dev_t cdsetunit(dev_t dev, int unit) { return CDSETUNIT(dev, unit); } static errval cd_open(dev_t dev, int flags, int fmt, struct proc *p, struct scsi_link *sc_link); -static errval cd_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, +static errval cd_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p, struct scsi_link *sc_link); static errval cd_close(dev_t dev, int flag, int fmt, struct proc *p, struct scsi_link *sc_link); @@ -581,7 +581,7 @@ cdstart(unit, flags) * Knows about the internals of this device */ static errval -cd_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p, +cd_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p, struct scsi_link *sc_link) { errval error = 0; diff --git a/sys/scsi/ch.c b/sys/scsi/ch.c index ecab879..985011f 100644 --- a/sys/scsi/ch.c +++ b/sys/scsi/ch.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ch.c,v 1.44 1998/04/16 12:28:30 peter Exp $ + * $Id: ch.c,v 1.45 1998/05/06 09:11:20 phk Exp $ */ #include "opt_devfs.h" @@ -132,7 +132,7 @@ static dev_t chsetunit __P((dev_t, int)); /* So, like, why not "int"? */ static errval ch_devopen __P((dev_t, int, int, struct proc *, struct scsi_link *)); -static errval ch_devioctl __P((dev_t, int, caddr_t, int, struct proc *, +static errval ch_devioctl __P((dev_t, u_long, caddr_t, int, struct proc *, struct scsi_link *)); static errval ch_devclose __P((dev_t, int, int, struct proc *, struct scsi_link *)); @@ -293,7 +293,7 @@ ch_devclose(dev, flags, fmt, p, link) static errval ch_devioctl(dev, cmd, data, flags, p, link) dev_t dev; - int cmd; + u_long cmd; caddr_t data; int flags; struct proc *p; diff --git a/sys/scsi/od.c b/sys/scsi/od.c index f91d29b..1811121 100644 --- a/sys/scsi/od.c +++ b/sys/scsi/od.c @@ -28,7 +28,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $Id: od.c,v 1.37 1998/04/17 22:37:07 des Exp $ + * $Id: od.c,v 1.38 1998/04/27 11:36:04 des Exp $ */ /* @@ -128,7 +128,7 @@ static int odunit(dev_t dev) { return ODUNIT(dev); } static errval od_open __P((dev_t dev, int mode, int fmt, struct proc *p, struct scsi_link *sc_link)); -static errval od_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, +static errval od_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p, struct scsi_link *sc_link); static errval od_close __P((dev_t dev, int fflag, int fmt, struct proc *p, struct scsi_link *sc_link)); @@ -666,7 +666,7 @@ bad: * Knows about the internals of this device */ static errval -od_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p, +od_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p, struct scsi_link *sc_link) { /* struct od_cmd_buf *args; */ diff --git a/sys/scsi/scsi_ioctl.c b/sys/scsi/scsi_ioctl.c index 086f426..4d5b94c 100644 --- a/sys/scsi/scsi_ioctl.c +++ b/sys/scsi/scsi_ioctl.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. *End copyright * - * $Id: scsi_ioctl.c,v 1.29 1998/02/01 18:09:46 wollman Exp $ + * $Id: scsi_ioctl.c,v 1.30 1998/03/28 10:33:21 bde Exp $ * * */ @@ -249,7 +249,7 @@ scsistrategy(struct buf *bp) * If user-level type command, we must still be running * in the context of the calling process */ -errval scsi_do_ioctl(dev_t dev, int cmd, caddr_t addr, int flags, +errval scsi_do_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p, struct scsi_link *sc_link) { errval ret = 0; diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h index 1092b4d..6961077 100644 --- a/sys/scsi/scsiconf.h +++ b/sys/scsi/scsiconf.h @@ -14,7 +14,7 @@ * * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 * - * $Id: scsiconf.h,v 1.59 1998/04/17 22:37:09 des Exp $ + * $Id: scsiconf.h,v 1.60 1998/05/24 04:52:31 julian Exp $ */ #ifndef SCSI_SCSICONF_H #define SCSI_SCSICONF_H 1 @@ -146,7 +146,7 @@ struct scsi_device /* 64*/ dev_t (*setunit)(dev_t dev, int unit); /* 68*/ int (*dev_open)(dev_t dev, int flags, int fmt, struct proc *p, struct scsi_link *sc_link); -/* 72*/ int (*dev_ioctl)(dev_t dev, int cmd, caddr_t arg, int mode, +/* 72*/ int (*dev_ioctl)(dev_t dev, u_long cmd, caddr_t arg, int mode, struct proc *p, struct scsi_link *sc_link); /* 76*/ int (*dev_close)(dev_t dev, int flag, int fmt, struct proc *p, struct scsi_link *sc_link); @@ -178,7 +178,7 @@ void NAME##init(void) { \ static int NAME##open(dev_t dev, int flags, int fmt, struct proc *p) { \ return scsi_open(dev, flags, fmt, p, &NAME##_switch); \ } \ -static int NAME##ioctl(dev_t dev, int cmd, caddr_t addr, \ +static int NAME##ioctl(dev_t dev, u_long cmd, caddr_t addr, \ int flag, struct proc *p) { \ return scsi_ioctl(dev, cmd, addr, flag, p, &NAME##_switch); \ } \ @@ -453,7 +453,7 @@ errval scsi_scsi_cmd __P(( struct scsi_link *, struct scsi_generic *, u_int32_t, u_int32_t, u_int32_t, struct buf *, u_int32_t)); -int scsi_do_ioctl __P((dev_t dev, int cmd, caddr_t addr, int mode, +int scsi_do_ioctl __P((dev_t dev, u_long cmd, caddr_t addr, int mode, struct proc *p, struct scsi_link *sc_link)); struct scsi_link *scsi_link_get __P((int bus, int targ, int lun)); diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index ce065ff..fcd8196 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -14,7 +14,7 @@ * * Ported to run under 386BSD by Julian Elischer (julian@dialix.oz.au) Sept 1992 * - * $Id: sd.c,v 1.128 1998/05/07 02:05:21 julian Exp $ + * $Id: sd.c,v 1.129 1998/05/07 12:13:47 julian Exp $ */ #include "opt_bounce.h" @@ -118,7 +118,7 @@ static int sdunit(dev_t dev) { return SDUNIT(dev); } static dev_t sdsetunit(dev_t dev, int unit) { return SDSETUNIT(dev, unit); } static errval sd_open __P((dev_t dev, int mode, int fmt, struct proc *p, struct scsi_link *sc_link)); -static errval sd_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, +static errval sd_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p, struct scsi_link *sc_link); static errval sd_close __P((dev_t dev, int flag, int fmt, struct proc *p, struct scsi_link *sc_link)); @@ -778,10 +778,10 @@ bad: */ #ifdef SLICE static int -sdsioctl( void *private, int cmd, caddr_t addr, int flag, struct proc *p) +sdsioctl( void *private, u_long cmd, caddr_t addr, int flag, struct proc *p) #else /* SLICE */ static errval -sd_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p, +sd_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p, struct scsi_link *sc_link) #endif /* !SLICE */ { @@ -1244,7 +1244,7 @@ sdsdump(void *private, int32_t start, int32_t num) * If we are dumping core, it may take a while. * So reassure the user and hold off any watchdogs. */ - if ((unsigned)addr % (1024 * 1024) == 0) { + if ((u_long)addr % (1024 * 1024) == 0) { #ifdef HW_WDOG if (wdog_tickler) (*wdog_tickler)(); @@ -1254,7 +1254,7 @@ sdsdump(void *private, int32_t start, int32_t num) /* update block count */ num -= blkcnt; blknum += blkcnt; - (int) addr += blkcnt * sd->params.secsiz; + (long) addr += blkcnt * sd->params.secsiz; /* operator aborting dump? */ if (cncheckc() != -1) diff --git a/sys/scsi/ssc.c b/sys/scsi/ssc.c index 9ad707e..1014daa 100644 --- a/sys/scsi/ssc.c +++ b/sys/scsi/ssc.c @@ -49,7 +49,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. *End copyright - * $Id: ssc.c,v 1.17 1997/12/23 19:44:45 brian Exp $ + * $Id: ssc.c,v 1.18 1998/01/24 02:54:52 eivind Exp $ */ #include "opt_devfs.h" @@ -100,7 +100,7 @@ sscclose(dev_t dev, int fflag, int type, struct proc *p) } static int -sscioctl(dev_t dev, int cmd, caddr_t data, int fflag, struct proc *p) +sscioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p) { if (cmd == SCIOCADDR) { diff --git a/sys/scsi/st.c b/sys/scsi/st.c index 9da75d2..aa31ee6 100644 --- a/sys/scsi/st.c +++ b/sys/scsi/st.c @@ -12,7 +12,7 @@ * on the understanding that TFS is not responsible for the correct * functioning of this software in any circumstances. * - * $Id: st.c,v 1.86 1998/04/16 10:35:50 peter Exp $ + * $Id: st.c,v 1.87 1998/04/17 22:37:16 des Exp $ */ /* @@ -144,7 +144,7 @@ static dev_t stsetunit(dev_t dev, int unit) { return STSETUNIT(dev, unit); } static errval st_open(dev_t dev, int flags, int fmt, struct proc *p, struct scsi_link *sc_link); -static errval st_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, +static errval st_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p, struct scsi_link *sc_link); static errval st_close(dev_t dev, int flag, int fmt, struct proc *p, struct scsi_link *sc_link); @@ -983,7 +983,7 @@ badnews: * knows about the internals of this device */ static errval -st_ioctl(dev_t dev, int cmd, caddr_t arg, int flag, +st_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct proc *p, struct scsi_link *sc_link) { errval errcode = 0; diff --git a/sys/scsi/su.c b/sys/scsi/su.c index 6f22606..29ab345 100644 --- a/sys/scsi/su.c +++ b/sys/scsi/su.c @@ -44,7 +44,7 @@ * SUCH DAMAGE. *End copyright * - * $Id: su.c,v 1.17 1997/09/02 20:06:40 bde Exp $ + * $Id: su.c,v 1.18 1997/09/14 03:19:40 peter Exp $ * * Tabstops 4 * XXX devfs entries for this device should be handled by generic scsiconfig @@ -243,7 +243,7 @@ sustrategy(struct buf *bp) } int -suioctl(dev_t dev, int cmd, caddr_t data, int fflag, struct proc *p) +suioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p) { struct cdevsw *cdev; dev_t base; diff --git a/sys/scsi/worm.c b/sys/scsi/worm.c index c8f7200..2142022 100644 --- a/sys/scsi/worm.c +++ b/sys/scsi/worm.c @@ -43,7 +43,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: worm.c,v 1.54 1998/04/15 17:47:24 bde Exp $ + * $Id: worm.c,v 1.55 1998/04/16 12:28:31 peter Exp $ */ #include "opt_bounce.h" @@ -134,7 +134,7 @@ static void wormstart(u_int32_t unit, u_int32_t flags); static errval worm_open(dev_t dev, int flags, int fmt, struct proc *p, struct scsi_link *sc_link); -static errval worm_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, +static errval worm_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p, struct scsi_link *sc_link); static errval worm_close(dev_t dev, int flag, int fmt, struct proc *p, struct scsi_link *sc_link); @@ -631,7 +631,7 @@ worm_close(dev_t dev, int flags, int fmt, struct proc *p, * Knows about the internals of this device */ errval -worm_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p, +worm_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p, struct scsi_link *sc_link) { errval error = 0; diff --git a/sys/sys/conf.h b/sys/sys/conf.h index 7a9be5e..db0b2bb 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)conf.h 8.5 (Berkeley) 1/9/95 - * $Id: conf.h,v 1.38 1998/01/24 02:01:29 dyson Exp $ + * $Id: conf.h,v 1.39 1998/02/13 12:46:28 phk Exp $ */ #ifndef _SYS_CONF_H_ @@ -55,7 +55,7 @@ struct vnode; typedef int d_open_t __P((dev_t dev, int oflags, int devtype, struct proc *p)); typedef int d_close_t __P((dev_t dev, int fflag, int devtype, struct proc *p)); typedef void d_strategy_t __P((struct buf *bp)); -typedef int d_ioctl_t __P((dev_t dev, int cmd, caddr_t data, +typedef int d_ioctl_t __P((dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p)); typedef int d_dump_t __P((dev_t dev)); typedef int d_psize_t __P((dev_t dev)); @@ -72,7 +72,7 @@ typedef int l_open_t __P((dev_t dev, struct tty *tp)); typedef int l_close_t __P((struct tty *tp, int flag)); typedef int l_read_t __P((struct tty *tp, struct uio *uio, int flag)); typedef int l_write_t __P((struct tty *tp, struct uio *uio, int flag)); -typedef int l_ioctl_t __P((struct tty *tp, int cmd, caddr_t data, +typedef int l_ioctl_t __P((struct tty *tp, u_long cmd, caddr_t data, int flag, struct proc *p)); typedef int l_rint_t __P((int c, struct tty *tp)); typedef int l_start_t __P((struct tty *tp)); @@ -228,6 +228,55 @@ d_write_t rawwrite; l_read_t l_noread; l_write_t l_nowrite; +/* + * XXX This is ugly. + */ +#ifdef _SYS_MODULE_H_ + +struct cdevsw_module_data { + modeventhand_t chainevh; /* next event handler in chain */ + void* chainarg; /* arg for next event handler */ + dev_t dev; /* device major to use */ + struct cdevsw* cdevsw; /* device functions */ +}; + +struct bdevsw_module_data { + modeventhand_t chainevh; /* next event handler in chain */ + void* chainarg; /* arg for next event handler */ + int bdev; /* device major to use */ + int cdev; /* device major to use */ + struct bdevsw* bdevsw; /* device functions */ +}; + +#define CDEV_MODULE(name, major, devsw, evh, arg) \ +static struct cdevsw_module_data name##_cdevsw_mod = { \ + evh, arg, makedev(major, 0), &devsw \ +}; \ + \ +static moduledata_t name##_mod = { \ + #name, \ + cdevsw_module_handler, \ + &name##_cdevsw_mod \ +}; \ +DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE+major) + +#define BDEV_MODULE(name, bdev, cdev, devsw, evh, arg) \ +static struct bdevsw_module_data name##_bdevsw_mod = { \ + evh, arg, makedev(bdev, 0), makedev(cdev, 0), &devsw \ +}; \ + \ +static moduledata_t name##_mod = { \ + #name, \ + bdevsw_module_handler, \ + &name##_bdevsw_mod \ +}; \ +DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE+cdev) + +int cdevsw_module_handler __P((module_t mod, modeventtype_t what, void* arg)); +int bdevsw_module_handler __P((module_t mod, modeventtype_t what, void* arg)); + +#endif /* _SYS_MODULE_H_ */ + int bdevsw_add __P((dev_t *descrip,struct bdevsw *new,struct bdevsw **old)); int cdevsw_add __P((dev_t *descrip,struct cdevsw *new,struct cdevsw **old)); void bdevsw_add_generic __P((int bdev, int cdev, struct bdevsw *bdevsw)); diff --git a/sys/sys/disklabel.h b/sys/sys/disklabel.h index 58ad909..d3796a2 100644 --- a/sys/sys/disklabel.h +++ b/sys/sys/disklabel.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)disklabel.h 8.2 (Berkeley) 7/10/94 - * $Id: disklabel.h,v 1.30 1998/02/17 10:50:20 jkh Exp $ + * $Id: disklabel.h,v 1.31 1998/02/22 10:11:23 dg Exp $ */ #ifndef _SYS_DISKLABEL_H_ @@ -61,6 +61,11 @@ #define LABELOFFSET 0 /* offset of label in sector */ #endif +#ifdef __alpha__ +#define LABELSECTOR 1 +#define LABELOFFSET 0 +#endif + #ifndef LABELSECTOR #define LABELSECTOR 0 /* sector containing label */ #endif diff --git a/sys/sys/diskmbr.h b/sys/sys/diskmbr.h index 58ad909..d3796a2 100644 --- a/sys/sys/diskmbr.h +++ b/sys/sys/diskmbr.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)disklabel.h 8.2 (Berkeley) 7/10/94 - * $Id: disklabel.h,v 1.30 1998/02/17 10:50:20 jkh Exp $ + * $Id: disklabel.h,v 1.31 1998/02/22 10:11:23 dg Exp $ */ #ifndef _SYS_DISKLABEL_H_ @@ -61,6 +61,11 @@ #define LABELOFFSET 0 /* offset of label in sector */ #endif +#ifdef __alpha__ +#define LABELSECTOR 1 +#define LABELOFFSET 0 +#endif + #ifndef LABELSECTOR #define LABELSECTOR 0 /* sector containing label */ #endif diff --git a/sys/sys/diskpc98.h b/sys/sys/diskpc98.h index 58ad909..d3796a2 100644 --- a/sys/sys/diskpc98.h +++ b/sys/sys/diskpc98.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)disklabel.h 8.2 (Berkeley) 7/10/94 - * $Id: disklabel.h,v 1.30 1998/02/17 10:50:20 jkh Exp $ + * $Id: disklabel.h,v 1.31 1998/02/22 10:11:23 dg Exp $ */ #ifndef _SYS_DISKLABEL_H_ @@ -61,6 +61,11 @@ #define LABELOFFSET 0 /* offset of label in sector */ #endif +#ifdef __alpha__ +#define LABELSECTOR 1 +#define LABELOFFSET 0 +#endif + #ifndef LABELSECTOR #define LABELSECTOR 0 /* sector containing label */ #endif diff --git a/sys/sys/file.h b/sys/sys/file.h index 612dbf5..687c22b 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)file.h 8.3 (Berkeley) 1/9/95 - * $Id: file.h,v 1.14 1997/09/14 02:25:40 peter Exp $ + * $Id: file.h,v 1.15 1997/11/23 10:43:36 bde Exp $ */ #ifndef _SYS_FILE_H_ @@ -68,7 +68,7 @@ struct file { struct ucred *cred)); int (*fo_write) __P((struct file *fp, struct uio *uio, struct ucred *cred)); - int (*fo_ioctl) __P((struct file *fp, int com, + int (*fo_ioctl) __P((struct file *fp, u_long com, caddr_t data, struct proc *p)); int (*fo_poll) __P((struct file *fp, int events, struct ucred *cred, struct proc *p)); diff --git a/sys/sys/imgact_elf.h b/sys/sys/imgact_elf.h index b9e69f9..45ea759 100644 --- a/sys/sys/imgact_elf.h +++ b/sys/sys/imgact_elf.h @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: imgact_elf.h,v 1.5 1997/05/21 23:07:31 jdp Exp $ + * $Id: imgact_elf.h,v 1.6 1997/09/07 05:27:11 bde Exp $ */ #ifndef _SYS_IMGACT_ELF_H_ @@ -37,6 +37,8 @@ #define AUXARGS_ENTRY(pos, id, val) {suword(pos++, id); suword(pos++, val);} +#if ELF_TARG_CLASS == ELFCLASS32 + /* * Structure used to pass infomation from the loader to the * stack fixup routine. @@ -65,6 +67,39 @@ typedef struct { int elf_insert_brand_entry __P((Elf32_Brandinfo *entry)); int elf_remove_brand_entry __P((Elf32_Brandinfo *entry)); +#else + +/* + * Structure used to pass infomation from the loader to the + * stack fixup routine. + */ +typedef struct { + Elf64_Sword execfd; + Elf64_Word phdr; + Elf64_Word phent; + Elf64_Word phnum; + Elf64_Word pagesz; + Elf64_Word base; + Elf64_Word flags; + Elf64_Word entry; + Elf64_Word trace; +} Elf64_Auxargs; + +typedef struct { + char *brand; + char *emul_path; + char *interp_path; + struct sysentvec *sysvec; +} Elf64_Brandinfo; + +#define MAX_BRANDS 8 + +int elf_insert_brand_entry __P((Elf64_Brandinfo *entry)); +int elf_remove_brand_entry __P((Elf64_Brandinfo *entry)); + +#endif + + #endif /* KERNEL */ #endif /* !_SYS_IMGACT_ELF_H_ */ diff --git a/sys/sys/ioccom.h b/sys/sys/ioccom.h index 18c4b74..26cd972 100644 --- a/sys/sys/ioccom.h +++ b/sys/sys/ioccom.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ioccom.h 8.2 (Berkeley) 3/28/94 - * $Id$ + * $Id: ioccom.h,v 1.6 1997/02/22 09:45:21 peter Exp $ */ #ifndef _SYS_IOCCOM_H_ @@ -55,7 +55,7 @@ #define IOC_DIRMASK 0xe0000000 /* mask for IN/OUT/VOID */ #define _IOC(inout,group,num,len) \ - (inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num)) + ((unsigned long)(inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num))) #define _IO(g,n) _IOC(IOC_VOID, (g), (n), 0) #define _IOR(g,n,t) _IOC(IOC_OUT, (g), (n), sizeof(t)) #define _IOW(g,n,t) _IOC(IOC_IN, (g), (n), sizeof(t)) diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h index 2fb8a8c..e4eccbd 100644 --- a/sys/sys/kernel.h +++ b/sys/sys/kernel.h @@ -39,7 +39,7 @@ * SUCH DAMAGE. * * @(#)kernel.h 8.3 (Berkeley) 1/21/94 - * $Id: kernel.h,v 1.39 1998/04/15 17:47:30 bde Exp $ + * $Id: kernel.h,v 1.40 1998/05/09 12:14:18 bde Exp $ */ #ifndef _SYS_KERNEL_H_ @@ -83,10 +83,25 @@ extern long timedelta; */ #if defined(__ELF__) +/* + * Alpha GAS needs an align before the section change. It seems to assume + * that after the .previous, it is aligned, so the following .align 3 is + * ignored. Since the previous instructions often contain strings, this is + * a problem. + */ + +#ifdef __alpha__ +#define MAKE_SET(set, sym) \ + __asm(".align 3"); \ + __asm(".section .set." #set ",\"aw\""); \ + __asm(".quad " #sym); \ + __asm(".previous") +#else #define MAKE_SET(set, sym) \ __asm(".section .set." #set ",\"aw\""); \ __asm(".long " #sym); \ __asm(".previous") +#endif #define TEXT_SET(set, sym) MAKE_SET(set, sym) #define DATA_SET(set, sym) MAKE_SET(set, sym) #define BSS_SET(set, sym) MAKE_SET(set, sym) diff --git a/sys/sys/linedisc.h b/sys/sys/linedisc.h index 7a9be5e..db0b2bb 100644 --- a/sys/sys/linedisc.h +++ b/sys/sys/linedisc.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)conf.h 8.5 (Berkeley) 1/9/95 - * $Id: conf.h,v 1.38 1998/01/24 02:01:29 dyson Exp $ + * $Id: conf.h,v 1.39 1998/02/13 12:46:28 phk Exp $ */ #ifndef _SYS_CONF_H_ @@ -55,7 +55,7 @@ struct vnode; typedef int d_open_t __P((dev_t dev, int oflags, int devtype, struct proc *p)); typedef int d_close_t __P((dev_t dev, int fflag, int devtype, struct proc *p)); typedef void d_strategy_t __P((struct buf *bp)); -typedef int d_ioctl_t __P((dev_t dev, int cmd, caddr_t data, +typedef int d_ioctl_t __P((dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p)); typedef int d_dump_t __P((dev_t dev)); typedef int d_psize_t __P((dev_t dev)); @@ -72,7 +72,7 @@ typedef int l_open_t __P((dev_t dev, struct tty *tp)); typedef int l_close_t __P((struct tty *tp, int flag)); typedef int l_read_t __P((struct tty *tp, struct uio *uio, int flag)); typedef int l_write_t __P((struct tty *tp, struct uio *uio, int flag)); -typedef int l_ioctl_t __P((struct tty *tp, int cmd, caddr_t data, +typedef int l_ioctl_t __P((struct tty *tp, u_long cmd, caddr_t data, int flag, struct proc *p)); typedef int l_rint_t __P((int c, struct tty *tp)); typedef int l_start_t __P((struct tty *tp)); @@ -228,6 +228,55 @@ d_write_t rawwrite; l_read_t l_noread; l_write_t l_nowrite; +/* + * XXX This is ugly. + */ +#ifdef _SYS_MODULE_H_ + +struct cdevsw_module_data { + modeventhand_t chainevh; /* next event handler in chain */ + void* chainarg; /* arg for next event handler */ + dev_t dev; /* device major to use */ + struct cdevsw* cdevsw; /* device functions */ +}; + +struct bdevsw_module_data { + modeventhand_t chainevh; /* next event handler in chain */ + void* chainarg; /* arg for next event handler */ + int bdev; /* device major to use */ + int cdev; /* device major to use */ + struct bdevsw* bdevsw; /* device functions */ +}; + +#define CDEV_MODULE(name, major, devsw, evh, arg) \ +static struct cdevsw_module_data name##_cdevsw_mod = { \ + evh, arg, makedev(major, 0), &devsw \ +}; \ + \ +static moduledata_t name##_mod = { \ + #name, \ + cdevsw_module_handler, \ + &name##_cdevsw_mod \ +}; \ +DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE+major) + +#define BDEV_MODULE(name, bdev, cdev, devsw, evh, arg) \ +static struct bdevsw_module_data name##_bdevsw_mod = { \ + evh, arg, makedev(bdev, 0), makedev(cdev, 0), &devsw \ +}; \ + \ +static moduledata_t name##_mod = { \ + #name, \ + bdevsw_module_handler, \ + &name##_bdevsw_mod \ +}; \ +DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE+cdev) + +int cdevsw_module_handler __P((module_t mod, modeventtype_t what, void* arg)); +int bdevsw_module_handler __P((module_t mod, modeventtype_t what, void* arg)); + +#endif /* _SYS_MODULE_H_ */ + int bdevsw_add __P((dev_t *descrip,struct bdevsw *new,struct bdevsw **old)); int cdevsw_add __P((dev_t *descrip,struct cdevsw *new,struct cdevsw **old)); void bdevsw_add_generic __P((int bdev, int cdev, struct bdevsw *bdevsw)); diff --git a/sys/sys/namei.h b/sys/sys/namei.h index 27f8343..5c41f34 100644 --- a/sys/sys/namei.h +++ b/sys/sys/namei.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)namei.h 8.5 (Berkeley) 1/9/95 - * $Id: namei.h,v 1.19 1998/01/12 19:10:43 phk Exp $ + * $Id: namei.h,v 1.20 1998/03/28 10:33:22 bde Exp $ */ #ifndef _SYS_NAMEI_H_ @@ -66,7 +66,7 @@ struct nameidata { /* * Shared between namei and lookup/commit routines. */ - long ni_pathlen; /* remaining chars in path */ + size_t ni_pathlen; /* remaining chars in path */ char *ni_next; /* next location in pathname */ u_long ni_loopcnt; /* count of symlinks encountered */ /* diff --git a/sys/sys/param.h b/sys/sys/param.h index 48d6ddb..5387a8c 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)param.h 8.3 (Berkeley) 4/4/95 - * $Id: param.h,v 1.31 1998/05/21 19:21:46 eivind Exp $ + * $Id: param.h,v 1.32 1998/06/02 20:58:22 jdp Exp $ */ #ifndef _SYS_PARAM_H_ @@ -46,7 +46,7 @@ #define BSD4_3 1 #define BSD4_4 1 #undef __FreeBSD_version -#define __FreeBSD_version 300002 /* Master version, propagated to newvers */ +#define __FreeBSD_version 300003 /* Master version, propagated to newvers */ #ifndef NULL #define NULL 0 diff --git a/sys/sys/protosw.h b/sys/sys/protosw.h index 8ee2d36..64aa7e0 100644 --- a/sys/sys/protosw.h +++ b/sys/sys/protosw.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)protosw.h 8.1 (Berkeley) 6/2/93 - * $Id: protosw.h,v 1.22 1997/12/21 16:35:10 bde Exp $ + * $Id: protosw.h,v 1.23 1998/02/01 20:08:37 bde Exp $ */ #ifndef _SYS_PROTOSW_H_ @@ -188,7 +188,7 @@ struct pr_usrreqs { int (*pru_connect) __P((struct socket *so, struct sockaddr *nam, struct proc *p)); int (*pru_connect2) __P((struct socket *so1, struct socket *so2)); - int (*pru_control) __P((struct socket *so, int cmd, caddr_t data, + int (*pru_control) __P((struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp, struct proc *p)); int (*pru_detach) __P((struct socket *so)); int (*pru_disconnect) __P((struct socket *so)); @@ -232,7 +232,7 @@ int pru_accept_notsupp __P((struct socket *so, struct sockaddr **nam)); int pru_connect_notsupp __P((struct socket *so, struct sockaddr *nam, struct proc *p)); int pru_connect2_notsupp __P((struct socket *so1, struct socket *so2)); -int pru_control_notsupp __P((struct socket *so, int cmd, caddr_t data, +int pru_control_notsupp __P((struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp, struct proc *p)); int pru_listen_notsupp __P((struct socket *so, struct proc *p)); int pru_rcvd_notsupp __P((struct socket *so, int flags)); diff --git a/sys/sys/ptrace.h b/sys/sys/ptrace.h index 6bb3e55..288a0fa 100644 --- a/sys/sys/ptrace.h +++ b/sys/sys/ptrace.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ptrace.h 8.2 (Berkeley) 1/4/94 - * $Id$ + * $Id: ptrace.h,v 1.7 1997/02/22 09:45:43 peter Exp $ */ #ifndef _SYS_PTRACE_H_ @@ -56,9 +56,9 @@ #ifdef KERNEL void proc_reparent __P((struct proc *child, struct proc *newparent)); -int ptrace_set_pc __P((struct proc *p, unsigned int addr)); +int ptrace_set_pc __P((struct proc *p, unsigned long addr)); int ptrace_single_step __P((struct proc *p)); -int ptrace_write_u __P((struct proc *p, vm_offset_t off, int data)); +int ptrace_write_u __P((struct proc *p, vm_offset_t off, long data)); #else /* !KERNEL */ #include <sys/cdefs.h> diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index 0ae1c1d..a55153b 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)socketvar.h 8.3 (Berkeley) 2/19/95 - * $Id: socketvar.h,v 1.26 1998/05/15 20:11:39 wollman Exp $ + * $Id: socketvar.h,v 1.27 1998/05/31 18:37:22 peter Exp $ */ #ifndef _SYS_SOCKETVAR_H_ @@ -263,7 +263,7 @@ struct uio; /* * File operations on sockets. */ -int soo_ioctl __P((struct file *fp, int cmd, caddr_t data, +int soo_ioctl __P((struct file *fp, u_long cmd, caddr_t data, struct proc *p)); int soo_poll __P((struct file *fp, int events, struct ucred *cred, struct proc *p)); diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h index 6c2e014..df624aa 100644 --- a/sys/sys/sysent.h +++ b/sys/sys/sysent.h @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: sysent.h,v 1.16 1998/02/03 21:51:57 bde Exp $ + * $Id: sysent.h,v 1.17 1998/04/28 18:15:08 eivind Exp $ */ #ifndef _SYS_SYSENT_H_ @@ -60,7 +60,7 @@ struct sysentvec { int *sv_errtbl; /* errno translation table */ int (*sv_transtrap) __P((int, int)); /* translate trap-to-signal mapping */ - int (*sv_fixup) __P((int **, struct image_params *)); + int (*sv_fixup) __P((long **, struct image_params *)); /* stack fixup function */ void (*sv_sendsig) __P((void (*)(int), int, int, u_long)); /* send signal */ diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index b8616d1..51218e7 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -12,869 +12,872 @@ struct proc; +#define PAD_(t) sizeof(register_t) <= sizeof(t) ? \ + 0 : sizeof(register_t) - sizeof(t) + struct nosys_args { - int dummy; + register_t dummy; }; struct rexit_args { - int rval; + int rval; char rval_[PAD_(int)]; }; struct fork_args { - int dummy; + register_t dummy; }; struct read_args { - int fd; - char * buf; - u_int nbyte; + int fd; char fd_[PAD_(int)]; + char * buf; char buf_[PAD_(char *)]; + u_int nbyte; char nbyte_[PAD_(u_int)]; }; struct write_args { - int fd; - char * buf; - u_int nbyte; + int fd; char fd_[PAD_(int)]; + char * buf; char buf_[PAD_(char *)]; + u_int nbyte; char nbyte_[PAD_(u_int)]; }; struct open_args { - char * path; - int flags; - int mode; + char * path; char path_[PAD_(char *)]; + int flags; char flags_[PAD_(int)]; + int mode; char mode_[PAD_(int)]; }; struct close_args { - int fd; + int fd; char fd_[PAD_(int)]; }; struct wait_args { - int pid; - int * status; - int options; - struct rusage * rusage; + int pid; char pid_[PAD_(int)]; + int * status; char status_[PAD_(int *)]; + int options; char options_[PAD_(int)]; + struct rusage * rusage; char rusage_[PAD_(struct rusage *)]; }; struct link_args { - char * path; - char * link; + char * path; char path_[PAD_(char *)]; + char * link; char link_[PAD_(char *)]; }; struct unlink_args { - char * path; + char * path; char path_[PAD_(char *)]; }; struct chdir_args { - char * path; + char * path; char path_[PAD_(char *)]; }; struct fchdir_args { - int fd; + int fd; char fd_[PAD_(int)]; }; struct mknod_args { - char * path; - int mode; - int dev; + char * path; char path_[PAD_(char *)]; + int mode; char mode_[PAD_(int)]; + int dev; char dev_[PAD_(int)]; }; struct chmod_args { - char * path; - int mode; + char * path; char path_[PAD_(char *)]; + int mode; char mode_[PAD_(int)]; }; struct chown_args { - char * path; - int uid; - int gid; + char * path; char path_[PAD_(char *)]; + int uid; char uid_[PAD_(int)]; + int gid; char gid_[PAD_(int)]; }; struct obreak_args { - char * nsize; + char * nsize; char nsize_[PAD_(char *)]; }; struct getfsstat_args { - struct statfs * buf; - long bufsize; - int flags; + struct statfs * buf; char buf_[PAD_(struct statfs *)]; + long bufsize; char bufsize_[PAD_(long)]; + int flags; char flags_[PAD_(int)]; }; struct getpid_args { - int dummy; + register_t dummy; }; struct mount_args { - char * type; - char * path; - int flags; - caddr_t data; + char * type; char type_[PAD_(char *)]; + char * path; char path_[PAD_(char *)]; + int flags; char flags_[PAD_(int)]; + caddr_t data; char data_[PAD_(caddr_t)]; }; struct unmount_args { - char * path; - int flags; + char * path; char path_[PAD_(char *)]; + int flags; char flags_[PAD_(int)]; }; struct setuid_args { - uid_t uid; + uid_t uid; char uid_[PAD_(uid_t)]; }; struct getuid_args { - int dummy; + register_t dummy; }; struct geteuid_args { - int dummy; + register_t dummy; }; struct ptrace_args { - int req; - pid_t pid; - caddr_t addr; - int data; + int req; char req_[PAD_(int)]; + pid_t pid; char pid_[PAD_(pid_t)]; + caddr_t addr; char addr_[PAD_(caddr_t)]; + int data; char data_[PAD_(int)]; }; struct recvmsg_args { - int s; - struct msghdr * msg; - int flags; + int s; char s_[PAD_(int)]; + struct msghdr * msg; char msg_[PAD_(struct msghdr *)]; + int flags; char flags_[PAD_(int)]; }; struct sendmsg_args { - int s; - caddr_t msg; - int flags; + int s; char s_[PAD_(int)]; + caddr_t msg; char msg_[PAD_(caddr_t)]; + int flags; char flags_[PAD_(int)]; }; struct recvfrom_args { - int s; - caddr_t buf; - size_t len; - int flags; - caddr_t from; - int * fromlenaddr; + int s; char s_[PAD_(int)]; + caddr_t buf; char buf_[PAD_(caddr_t)]; + size_t len; char len_[PAD_(size_t)]; + int flags; char flags_[PAD_(int)]; + caddr_t from; char from_[PAD_(caddr_t)]; + int * fromlenaddr; char fromlenaddr_[PAD_(int *)]; }; struct accept_args { - int s; - caddr_t name; - int * anamelen; + int s; char s_[PAD_(int)]; + caddr_t name; char name_[PAD_(caddr_t)]; + int * anamelen; char anamelen_[PAD_(int *)]; }; struct getpeername_args { - int fdes; - caddr_t asa; - int * alen; + int fdes; char fdes_[PAD_(int)]; + caddr_t asa; char asa_[PAD_(caddr_t)]; + int * alen; char alen_[PAD_(int *)]; }; struct getsockname_args { - int fdes; - caddr_t asa; - int * alen; + int fdes; char fdes_[PAD_(int)]; + caddr_t asa; char asa_[PAD_(caddr_t)]; + int * alen; char alen_[PAD_(int *)]; }; struct access_args { - char * path; - int flags; + char * path; char path_[PAD_(char *)]; + int flags; char flags_[PAD_(int)]; }; struct chflags_args { - char * path; - int flags; + char * path; char path_[PAD_(char *)]; + int flags; char flags_[PAD_(int)]; }; struct fchflags_args { - int fd; - int flags; + int fd; char fd_[PAD_(int)]; + int flags; char flags_[PAD_(int)]; }; struct sync_args { - int dummy; + register_t dummy; }; struct kill_args { - int pid; - int signum; + int pid; char pid_[PAD_(int)]; + int signum; char signum_[PAD_(int)]; }; struct getppid_args { - int dummy; + register_t dummy; }; struct dup_args { - u_int fd; + u_int fd; char fd_[PAD_(u_int)]; }; struct pipe_args { - int dummy; + register_t dummy; }; struct getegid_args { - int dummy; + register_t dummy; }; struct profil_args { - caddr_t samples; - u_int size; - u_int offset; - u_int scale; + caddr_t samples; char samples_[PAD_(caddr_t)]; + u_int size; char size_[PAD_(u_int)]; + u_int offset; char offset_[PAD_(u_int)]; + u_int scale; char scale_[PAD_(u_int)]; }; struct ktrace_args { - char * fname; - int ops; - int facs; - int pid; + char * fname; char fname_[PAD_(char *)]; + int ops; char ops_[PAD_(int)]; + int facs; char facs_[PAD_(int)]; + int pid; char pid_[PAD_(int)]; }; struct sigaction_args { - int signum; - struct sigaction * nsa; - struct sigaction * osa; + int signum; char signum_[PAD_(int)]; + struct sigaction * nsa; char nsa_[PAD_(struct sigaction *)]; + struct sigaction * osa; char osa_[PAD_(struct sigaction *)]; }; struct getgid_args { - int dummy; + register_t dummy; }; struct sigprocmask_args { - int how; - sigset_t mask; + int how; char how_[PAD_(int)]; + sigset_t mask; char mask_[PAD_(sigset_t)]; }; struct getlogin_args { - char * namebuf; - u_int namelen; + char * namebuf; char namebuf_[PAD_(char *)]; + u_int namelen; char namelen_[PAD_(u_int)]; }; struct setlogin_args { - char * namebuf; + char * namebuf; char namebuf_[PAD_(char *)]; }; struct acct_args { - char * path; + char * path; char path_[PAD_(char *)]; }; struct sigpending_args { - int dummy; + register_t dummy; }; struct sigaltstack_args { - struct sigaltstack * nss; - struct sigaltstack * oss; + struct sigaltstack * nss; char nss_[PAD_(struct sigaltstack *)]; + struct sigaltstack * oss; char oss_[PAD_(struct sigaltstack *)]; }; struct ioctl_args { - int fd; - u_long com; - caddr_t data; + int fd; char fd_[PAD_(int)]; + u_long com; char com_[PAD_(u_long)]; + caddr_t data; char data_[PAD_(caddr_t)]; }; struct reboot_args { - int opt; + int opt; char opt_[PAD_(int)]; }; struct revoke_args { - char * path; + char * path; char path_[PAD_(char *)]; }; struct symlink_args { - char * path; - char * link; + char * path; char path_[PAD_(char *)]; + char * link; char link_[PAD_(char *)]; }; struct readlink_args { - char * path; - char * buf; - int count; + char * path; char path_[PAD_(char *)]; + char * buf; char buf_[PAD_(char *)]; + int count; char count_[PAD_(int)]; }; struct execve_args { - char * fname; - char ** argv; - char ** envv; + char * fname; char fname_[PAD_(char *)]; + char ** argv; char argv_[PAD_(char **)]; + char ** envv; char envv_[PAD_(char **)]; }; struct umask_args { - int newmask; + int newmask; char newmask_[PAD_(int)]; }; struct chroot_args { - char * path; + char * path; char path_[PAD_(char *)]; }; struct getpagesize_args { - int dummy; + register_t dummy; }; struct msync_args { - void * addr; - size_t len; - int flags; + void * addr; char addr_[PAD_(void *)]; + size_t len; char len_[PAD_(size_t)]; + int flags; char flags_[PAD_(int)]; }; struct vfork_args { - int dummy; + register_t dummy; }; struct sbrk_args { - int incr; + int incr; char incr_[PAD_(int)]; }; struct sstk_args { - int incr; + int incr; char incr_[PAD_(int)]; }; struct ovadvise_args { - int anom; + int anom; char anom_[PAD_(int)]; }; struct munmap_args { - void * addr; - size_t len; + void * addr; char addr_[PAD_(void *)]; + size_t len; char len_[PAD_(size_t)]; }; struct mprotect_args { - const void * addr; - size_t len; - int prot; + const void * addr; char addr_[PAD_(const void *)]; + size_t len; char len_[PAD_(size_t)]; + int prot; char prot_[PAD_(int)]; }; struct madvise_args { - void * addr; - size_t len; - int behav; + void * addr; char addr_[PAD_(void *)]; + size_t len; char len_[PAD_(size_t)]; + int behav; char behav_[PAD_(int)]; }; struct mincore_args { - const void * addr; - size_t len; - char * vec; + const void * addr; char addr_[PAD_(const void *)]; + size_t len; char len_[PAD_(size_t)]; + char * vec; char vec_[PAD_(char *)]; }; struct getgroups_args { - u_int gidsetsize; - gid_t * gidset; + u_int gidsetsize; char gidsetsize_[PAD_(u_int)]; + gid_t * gidset; char gidset_[PAD_(gid_t *)]; }; struct setgroups_args { - u_int gidsetsize; - gid_t * gidset; + u_int gidsetsize; char gidsetsize_[PAD_(u_int)]; + gid_t * gidset; char gidset_[PAD_(gid_t *)]; }; struct getpgrp_args { - int dummy; + register_t dummy; }; struct setpgid_args { - int pid; - int pgid; + int pid; char pid_[PAD_(int)]; + int pgid; char pgid_[PAD_(int)]; }; struct setitimer_args { - u_int which; - struct itimerval * itv; - struct itimerval * oitv; + u_int which; char which_[PAD_(u_int)]; + struct itimerval * itv; char itv_[PAD_(struct itimerval *)]; + struct itimerval * oitv; char oitv_[PAD_(struct itimerval *)]; }; struct owait_args { - int dummy; + register_t dummy; }; struct swapon_args { - char * name; + char * name; char name_[PAD_(char *)]; }; struct getitimer_args { - u_int which; - struct itimerval * itv; + u_int which; char which_[PAD_(u_int)]; + struct itimerval * itv; char itv_[PAD_(struct itimerval *)]; }; struct getdtablesize_args { - int dummy; + register_t dummy; }; struct dup2_args { - u_int from; - u_int to; + u_int from; char from_[PAD_(u_int)]; + u_int to; char to_[PAD_(u_int)]; }; struct fcntl_args { - int fd; - int cmd; - int arg; + int fd; char fd_[PAD_(int)]; + int cmd; char cmd_[PAD_(int)]; + long arg; char arg_[PAD_(long)]; }; struct select_args { - int nd; - fd_set * in; - fd_set * ou; - fd_set * ex; - struct timeval * tv; + int nd; char nd_[PAD_(int)]; + fd_set * in; char in_[PAD_(fd_set *)]; + fd_set * ou; char ou_[PAD_(fd_set *)]; + fd_set * ex; char ex_[PAD_(fd_set *)]; + struct timeval * tv; char tv_[PAD_(struct timeval *)]; }; struct fsync_args { - int fd; + int fd; char fd_[PAD_(int)]; }; struct setpriority_args { - int which; - int who; - int prio; + int which; char which_[PAD_(int)]; + int who; char who_[PAD_(int)]; + int prio; char prio_[PAD_(int)]; }; struct socket_args { - int domain; - int type; - int protocol; + int domain; char domain_[PAD_(int)]; + int type; char type_[PAD_(int)]; + int protocol; char protocol_[PAD_(int)]; }; struct connect_args { - int s; - caddr_t name; - int namelen; + int s; char s_[PAD_(int)]; + caddr_t name; char name_[PAD_(caddr_t)]; + int namelen; char namelen_[PAD_(int)]; }; struct getpriority_args { - int which; - int who; + int which; char which_[PAD_(int)]; + int who; char who_[PAD_(int)]; }; struct sigreturn_args { - struct sigcontext * sigcntxp; + struct sigcontext * sigcntxp; char sigcntxp_[PAD_(struct sigcontext *)]; }; struct bind_args { - int s; - caddr_t name; - int namelen; + int s; char s_[PAD_(int)]; + caddr_t name; char name_[PAD_(caddr_t)]; + int namelen; char namelen_[PAD_(int)]; }; struct setsockopt_args { - int s; - int level; - int name; - caddr_t val; - int valsize; + int s; char s_[PAD_(int)]; + int level; char level_[PAD_(int)]; + int name; char name_[PAD_(int)]; + caddr_t val; char val_[PAD_(caddr_t)]; + int valsize; char valsize_[PAD_(int)]; }; struct listen_args { - int s; - int backlog; + int s; char s_[PAD_(int)]; + int backlog; char backlog_[PAD_(int)]; }; struct sigsuspend_args { - sigset_t mask; + sigset_t mask; char mask_[PAD_(sigset_t)]; }; struct gettimeofday_args { - struct timeval * tp; - struct timezone * tzp; + struct timeval * tp; char tp_[PAD_(struct timeval *)]; + struct timezone * tzp; char tzp_[PAD_(struct timezone *)]; }; struct getrusage_args { - int who; - struct rusage * rusage; + int who; char who_[PAD_(int)]; + struct rusage * rusage; char rusage_[PAD_(struct rusage *)]; }; struct getsockopt_args { - int s; - int level; - int name; - caddr_t val; - int * avalsize; + int s; char s_[PAD_(int)]; + int level; char level_[PAD_(int)]; + int name; char name_[PAD_(int)]; + caddr_t val; char val_[PAD_(caddr_t)]; + int * avalsize; char avalsize_[PAD_(int *)]; }; struct readv_args { - int fd; - struct iovec * iovp; - u_int iovcnt; + int fd; char fd_[PAD_(int)]; + struct iovec * iovp; char iovp_[PAD_(struct iovec *)]; + u_int iovcnt; char iovcnt_[PAD_(u_int)]; }; struct writev_args { - int fd; - struct iovec * iovp; - u_int iovcnt; + int fd; char fd_[PAD_(int)]; + struct iovec * iovp; char iovp_[PAD_(struct iovec *)]; + u_int iovcnt; char iovcnt_[PAD_(u_int)]; }; struct settimeofday_args { - struct timeval * tv; - struct timezone * tzp; + struct timeval * tv; char tv_[PAD_(struct timeval *)]; + struct timezone * tzp; char tzp_[PAD_(struct timezone *)]; }; struct fchown_args { - int fd; - int uid; - int gid; + int fd; char fd_[PAD_(int)]; + int uid; char uid_[PAD_(int)]; + int gid; char gid_[PAD_(int)]; }; struct fchmod_args { - int fd; - int mode; + int fd; char fd_[PAD_(int)]; + int mode; char mode_[PAD_(int)]; }; struct setreuid_args { - int ruid; - int euid; + int ruid; char ruid_[PAD_(int)]; + int euid; char euid_[PAD_(int)]; }; struct setregid_args { - int rgid; - int egid; + int rgid; char rgid_[PAD_(int)]; + int egid; char egid_[PAD_(int)]; }; struct rename_args { - char * from; - char * to; + char * from; char from_[PAD_(char *)]; + char * to; char to_[PAD_(char *)]; }; struct flock_args { - int fd; - int how; + int fd; char fd_[PAD_(int)]; + int how; char how_[PAD_(int)]; }; struct mkfifo_args { - char * path; - int mode; + char * path; char path_[PAD_(char *)]; + int mode; char mode_[PAD_(int)]; }; struct sendto_args { - int s; - caddr_t buf; - size_t len; - int flags; - caddr_t to; - int tolen; + int s; char s_[PAD_(int)]; + caddr_t buf; char buf_[PAD_(caddr_t)]; + size_t len; char len_[PAD_(size_t)]; + int flags; char flags_[PAD_(int)]; + caddr_t to; char to_[PAD_(caddr_t)]; + int tolen; char tolen_[PAD_(int)]; }; struct shutdown_args { - int s; - int how; + int s; char s_[PAD_(int)]; + int how; char how_[PAD_(int)]; }; struct socketpair_args { - int domain; - int type; - int protocol; - int * rsv; + int domain; char domain_[PAD_(int)]; + int type; char type_[PAD_(int)]; + int protocol; char protocol_[PAD_(int)]; + int * rsv; char rsv_[PAD_(int *)]; }; struct mkdir_args { - char * path; - int mode; + char * path; char path_[PAD_(char *)]; + int mode; char mode_[PAD_(int)]; }; struct rmdir_args { - char * path; + char * path; char path_[PAD_(char *)]; }; struct utimes_args { - char * path; - struct timeval * tptr; + char * path; char path_[PAD_(char *)]; + struct timeval * tptr; char tptr_[PAD_(struct timeval *)]; }; struct adjtime_args { - struct timeval * delta; - struct timeval * olddelta; + struct timeval * delta; char delta_[PAD_(struct timeval *)]; + struct timeval * olddelta; char olddelta_[PAD_(struct timeval *)]; }; struct ogethostid_args { - int dummy; + register_t dummy; }; struct setsid_args { - int dummy; + register_t dummy; }; struct quotactl_args { - char * path; - int cmd; - int uid; - caddr_t arg; + char * path; char path_[PAD_(char *)]; + int cmd; char cmd_[PAD_(int)]; + int uid; char uid_[PAD_(int)]; + caddr_t arg; char arg_[PAD_(caddr_t)]; }; struct oquota_args { - int dummy; + register_t dummy; }; struct nfssvc_args { - int flag; - caddr_t argp; + int flag; char flag_[PAD_(int)]; + caddr_t argp; char argp_[PAD_(caddr_t)]; }; struct statfs_args { - char * path; - struct statfs * buf; + char * path; char path_[PAD_(char *)]; + struct statfs * buf; char buf_[PAD_(struct statfs *)]; }; struct fstatfs_args { - int fd; - struct statfs * buf; + int fd; char fd_[PAD_(int)]; + struct statfs * buf; char buf_[PAD_(struct statfs *)]; }; struct getfh_args { - char * fname; - struct fhandle * fhp; + char * fname; char fname_[PAD_(char *)]; + struct fhandle * fhp; char fhp_[PAD_(struct fhandle *)]; }; struct getdomainname_args { - char * domainname; - int len; + char * domainname; char domainname_[PAD_(char *)]; + int len; char len_[PAD_(int)]; }; struct setdomainname_args { - char * domainname; - int len; + char * domainname; char domainname_[PAD_(char *)]; + int len; char len_[PAD_(int)]; }; struct uname_args { - struct utsname * name; + struct utsname * name; char name_[PAD_(struct utsname *)]; }; struct sysarch_args { - int op; - char * parms; + int op; char op_[PAD_(int)]; + char * parms; char parms_[PAD_(char *)]; }; struct rtprio_args { - int function; - pid_t pid; - struct rtprio * rtp; + int function; char function_[PAD_(int)]; + pid_t pid; char pid_[PAD_(pid_t)]; + struct rtprio * rtp; char rtp_[PAD_(struct rtprio *)]; }; struct semsys_args { - int which; - int a2; - int a3; - int a4; - int a5; + int which; char which_[PAD_(int)]; + int a2; char a2_[PAD_(int)]; + int a3; char a3_[PAD_(int)]; + int a4; char a4_[PAD_(int)]; + int a5; char a5_[PAD_(int)]; }; struct msgsys_args { - int which; - int a2; - int a3; - int a4; - int a5; - int a6; + int which; char which_[PAD_(int)]; + int a2; char a2_[PAD_(int)]; + int a3; char a3_[PAD_(int)]; + int a4; char a4_[PAD_(int)]; + int a5; char a5_[PAD_(int)]; + int a6; char a6_[PAD_(int)]; }; struct shmsys_args { - int which; - int a2; - int a3; - int a4; + int which; char which_[PAD_(int)]; + int a2; char a2_[PAD_(int)]; + int a3; char a3_[PAD_(int)]; + int a4; char a4_[PAD_(int)]; }; struct ntp_adjtime_args { - struct timex * tp; + struct timex * tp; char tp_[PAD_(struct timex *)]; }; struct setgid_args { - gid_t gid; + gid_t gid; char gid_[PAD_(gid_t)]; }; struct setegid_args { - gid_t egid; + gid_t egid; char egid_[PAD_(gid_t)]; }; struct seteuid_args { - uid_t euid; + uid_t euid; char euid_[PAD_(uid_t)]; }; struct stat_args { - char * path; - struct stat * ub; + char * path; char path_[PAD_(char *)]; + struct stat * ub; char ub_[PAD_(struct stat *)]; }; struct fstat_args { - int fd; - struct stat * sb; + int fd; char fd_[PAD_(int)]; + struct stat * sb; char sb_[PAD_(struct stat *)]; }; struct lstat_args { - char * path; - struct stat * ub; + char * path; char path_[PAD_(char *)]; + struct stat * ub; char ub_[PAD_(struct stat *)]; }; struct pathconf_args { - char * path; - int name; + char * path; char path_[PAD_(char *)]; + int name; char name_[PAD_(int)]; }; struct fpathconf_args { - int fd; - int name; + int fd; char fd_[PAD_(int)]; + int name; char name_[PAD_(int)]; }; struct __getrlimit_args { - u_int which; - struct orlimit * rlp; + u_int which; char which_[PAD_(u_int)]; + struct orlimit * rlp; char rlp_[PAD_(struct orlimit *)]; }; struct __setrlimit_args { - u_int which; - struct orlimit * rlp; + u_int which; char which_[PAD_(u_int)]; + struct orlimit * rlp; char rlp_[PAD_(struct orlimit *)]; }; struct getdirentries_args { - int fd; - char * buf; - u_int count; - long * basep; + int fd; char fd_[PAD_(int)]; + char * buf; char buf_[PAD_(char *)]; + u_int count; char count_[PAD_(u_int)]; + long * basep; char basep_[PAD_(long *)]; }; struct mmap_args { - caddr_t addr; - size_t len; - int prot; - int flags; - int fd; - long pad; - off_t pos; + caddr_t addr; char addr_[PAD_(caddr_t)]; + size_t len; char len_[PAD_(size_t)]; + int prot; char prot_[PAD_(int)]; + int flags; char flags_[PAD_(int)]; + int fd; char fd_[PAD_(int)]; + long pad; char pad_[PAD_(long)]; + off_t pos; char pos_[PAD_(off_t)]; }; struct lseek_args { - int fd; - int pad; - off_t offset; - int whence; + int fd; char fd_[PAD_(int)]; + int pad; char pad_[PAD_(int)]; + off_t offset; char offset_[PAD_(off_t)]; + int whence; char whence_[PAD_(int)]; }; struct truncate_args { - char * path; - int pad; - off_t length; + char * path; char path_[PAD_(char *)]; + int pad; char pad_[PAD_(int)]; + off_t length; char length_[PAD_(off_t)]; }; struct ftruncate_args { - int fd; - int pad; - off_t length; + int fd; char fd_[PAD_(int)]; + int pad; char pad_[PAD_(int)]; + off_t length; char length_[PAD_(off_t)]; }; struct sysctl_args { - int * name; - u_int namelen; - void * old; - size_t * oldlenp; - void * new; - size_t newlen; + int * name; char name_[PAD_(int *)]; + u_int namelen; char namelen_[PAD_(u_int)]; + void * old; char old_[PAD_(void *)]; + size_t * oldlenp; char oldlenp_[PAD_(size_t *)]; + void * new; char new_[PAD_(void *)]; + size_t newlen; char newlen_[PAD_(size_t)]; }; struct mlock_args { - const void * addr; - size_t len; + const void * addr; char addr_[PAD_(const void *)]; + size_t len; char len_[PAD_(size_t)]; }; struct munlock_args { - const void * addr; - size_t len; + const void * addr; char addr_[PAD_(const void *)]; + size_t len; char len_[PAD_(size_t)]; }; struct undelete_args { - char * path; + char * path; char path_[PAD_(char *)]; }; struct futimes_args { - int fd; - struct timeval * tptr; + int fd; char fd_[PAD_(int)]; + struct timeval * tptr; char tptr_[PAD_(struct timeval *)]; }; struct getpgid_args { - pid_t pid; + pid_t pid; char pid_[PAD_(pid_t)]; }; struct poll_args { - struct pollfd * fds; - u_int nfds; - int timeout; + struct pollfd * fds; char fds_[PAD_(struct pollfd *)]; + u_int nfds; char nfds_[PAD_(u_int)]; + int timeout; char timeout_[PAD_(int)]; }; struct __semctl_args { - int semid; - int semnum; - int cmd; - union semun * arg; + int semid; char semid_[PAD_(int)]; + int semnum; char semnum_[PAD_(int)]; + int cmd; char cmd_[PAD_(int)]; + union semun * arg; char arg_[PAD_(union semun *)]; }; struct semget_args { - key_t key; - int nsems; - int semflg; + key_t key; char key_[PAD_(key_t)]; + int nsems; char nsems_[PAD_(int)]; + int semflg; char semflg_[PAD_(int)]; }; struct semop_args { - int semid; - struct sembuf * sops; - u_int nsops; + int semid; char semid_[PAD_(int)]; + struct sembuf * sops; char sops_[PAD_(struct sembuf *)]; + u_int nsops; char nsops_[PAD_(u_int)]; }; struct semconfig_args { - int flag; + int flag; char flag_[PAD_(int)]; }; struct msgctl_args { - int msqid; - int cmd; - struct msqid_ds * buf; + int msqid; char msqid_[PAD_(int)]; + int cmd; char cmd_[PAD_(int)]; + struct msqid_ds * buf; char buf_[PAD_(struct msqid_ds *)]; }; struct msgget_args { - key_t key; - int msgflg; + key_t key; char key_[PAD_(key_t)]; + int msgflg; char msgflg_[PAD_(int)]; }; struct msgsnd_args { - int msqid; - void * msgp; - size_t msgsz; - int msgflg; + int msqid; char msqid_[PAD_(int)]; + void * msgp; char msgp_[PAD_(void *)]; + size_t msgsz; char msgsz_[PAD_(size_t)]; + int msgflg; char msgflg_[PAD_(int)]; }; struct msgrcv_args { - int msqid; - void * msgp; - size_t msgsz; - long msgtyp; - int msgflg; + int msqid; char msqid_[PAD_(int)]; + void * msgp; char msgp_[PAD_(void *)]; + size_t msgsz; char msgsz_[PAD_(size_t)]; + long msgtyp; char msgtyp_[PAD_(long)]; + int msgflg; char msgflg_[PAD_(int)]; }; struct shmat_args { - int shmid; - void * shmaddr; - int shmflg; + int shmid; char shmid_[PAD_(int)]; + void * shmaddr; char shmaddr_[PAD_(void *)]; + int shmflg; char shmflg_[PAD_(int)]; }; struct shmctl_args { - int shmid; - int cmd; - struct shmid_ds * buf; + int shmid; char shmid_[PAD_(int)]; + int cmd; char cmd_[PAD_(int)]; + struct shmid_ds * buf; char buf_[PAD_(struct shmid_ds *)]; }; struct shmdt_args { - void * shmaddr; + void * shmaddr; char shmaddr_[PAD_(void *)]; }; struct shmget_args { - key_t key; - int size; - int shmflg; + key_t key; char key_[PAD_(key_t)]; + int size; char size_[PAD_(int)]; + int shmflg; char shmflg_[PAD_(int)]; }; struct clock_gettime_args { - clockid_t clock_id; - struct timespec * tp; + clockid_t clock_id; char clock_id_[PAD_(clockid_t)]; + struct timespec * tp; char tp_[PAD_(struct timespec *)]; }; struct clock_settime_args { - clockid_t clock_id; - const struct timespec * tp; + clockid_t clock_id; char clock_id_[PAD_(clockid_t)]; + const struct timespec * tp; char tp_[PAD_(const struct timespec *)]; }; struct clock_getres_args { - clockid_t clock_id; - struct timespec * tp; + clockid_t clock_id; char clock_id_[PAD_(clockid_t)]; + struct timespec * tp; char tp_[PAD_(struct timespec *)]; }; struct nanosleep_args { - const struct timespec * rqtp; - struct timespec * rmtp; + const struct timespec * rqtp; char rqtp_[PAD_(const struct timespec *)]; + struct timespec * rmtp; char rmtp_[PAD_(struct timespec *)]; }; struct minherit_args { - void * addr; - size_t len; - int inherit; + void * addr; char addr_[PAD_(void *)]; + size_t len; char len_[PAD_(size_t)]; + int inherit; char inherit_[PAD_(int)]; }; struct rfork_args { - int flags; + int flags; char flags_[PAD_(int)]; }; struct openbsd_poll_args { - struct pollfd * fds; - u_int nfds; - int timeout; + struct pollfd * fds; char fds_[PAD_(struct pollfd *)]; + u_int nfds; char nfds_[PAD_(u_int)]; + int timeout; char timeout_[PAD_(int)]; }; struct issetugid_args { - int dummy; + register_t dummy; }; struct lchown_args { - char * path; - int uid; - int gid; + char * path; char path_[PAD_(char *)]; + int uid; char uid_[PAD_(int)]; + int gid; char gid_[PAD_(int)]; }; struct getdents_args { - int fd; - char * buf; - size_t count; + int fd; char fd_[PAD_(int)]; + char * buf; char buf_[PAD_(char *)]; + size_t count; char count_[PAD_(size_t)]; }; struct lchmod_args { - char * path; - mode_t mode; + char * path; char path_[PAD_(char *)]; + mode_t mode; char mode_[PAD_(mode_t)]; }; struct lutimes_args { - char * path; - struct timeval * tptr; + char * path; char path_[PAD_(char *)]; + struct timeval * tptr; char tptr_[PAD_(struct timeval *)]; }; struct nstat_args { - char * path; - struct nstat * ub; + char * path; char path_[PAD_(char *)]; + struct nstat * ub; char ub_[PAD_(struct nstat *)]; }; struct nfstat_args { - int fd; - struct nstat * sb; + int fd; char fd_[PAD_(int)]; + struct nstat * sb; char sb_[PAD_(struct nstat *)]; }; struct nlstat_args { - char * path; - struct nstat * ub; + char * path; char path_[PAD_(char *)]; + struct nstat * ub; char ub_[PAD_(struct nstat *)]; }; struct modnext_args { - int modid; + int modid; char modid_[PAD_(int)]; }; struct modstat_args { - int modid; - struct module_stat * stat; + int modid; char modid_[PAD_(int)]; + struct module_stat * stat; char stat_[PAD_(struct module_stat *)]; }; struct modfnext_args { - int modid; + int modid; char modid_[PAD_(int)]; }; struct modfind_args { - char * name; + char * name; char name_[PAD_(char *)]; }; struct kldload_args { - const char * file; + const char * file; char file_[PAD_(const char *)]; }; struct kldunload_args { - int fileid; + int fileid; char fileid_[PAD_(int)]; }; struct kldfind_args { - const char * file; + const char * file; char file_[PAD_(const char *)]; }; struct kldnext_args { - int fileid; + int fileid; char fileid_[PAD_(int)]; }; struct kldstat_args { - int fileid; - struct kld_file_stat * stat; + int fileid; char fileid_[PAD_(int)]; + struct kld_file_stat * stat; char stat_[PAD_(struct kld_file_stat *)]; }; struct kldfirstmod_args { - int fileid; + int fileid; char fileid_[PAD_(int)]; }; struct getsid_args { - pid_t pid; + pid_t pid; char pid_[PAD_(pid_t)]; }; struct aio_return_args { - struct aiocb * aiocbp; + struct aiocb * aiocbp; char aiocbp_[PAD_(struct aiocb *)]; }; struct aio_suspend_args { - struct aiocb *const * aiocbp; - int nent; - const struct timespec * timeout; + struct aiocb *const * aiocbp; char aiocbp_[PAD_(struct aiocb *const *)]; + int nent; char nent_[PAD_(int)]; + const struct timespec * timeout; char timeout_[PAD_(const struct timespec *)]; }; struct aio_cancel_args { - int fd; - struct aiocb * aiocbp; + int fd; char fd_[PAD_(int)]; + struct aiocb * aiocbp; char aiocbp_[PAD_(struct aiocb *)]; }; struct aio_error_args { - struct aiocb * aiocbp; + struct aiocb * aiocbp; char aiocbp_[PAD_(struct aiocb *)]; }; struct aio_read_args { - struct aiocb * aiocbp; + struct aiocb * aiocbp; char aiocbp_[PAD_(struct aiocb *)]; }; struct aio_write_args { - struct aiocb * aiocbp; + struct aiocb * aiocbp; char aiocbp_[PAD_(struct aiocb *)]; }; struct lio_listio_args { - int mode; - struct aiocb *const * acb_list; - int nent; - struct sigevent * sig; + int mode; char mode_[PAD_(int)]; + struct aiocb *const * acb_list; char acb_list_[PAD_(struct aiocb *const *)]; + int nent; char nent_[PAD_(int)]; + struct sigevent * sig; char sig_[PAD_(struct sigevent *)]; }; struct yield_args { - int dummy; + register_t dummy; }; struct thr_sleep_args { - const struct timespec * timeout; + const struct timespec * timeout; char timeout_[PAD_(const struct timespec *)]; }; struct thr_wakeup_args { - pid_t pid; + pid_t pid; char pid_[PAD_(pid_t)]; }; struct mlockall_args { - int how; + int how; char how_[PAD_(int)]; }; struct munlockall_args { - int dummy; + register_t dummy; }; struct __getcwd_args { - u_char * buf; - u_int buflen; + u_char * buf; char buf_[PAD_(u_char *)]; + u_int buflen; char buflen_[PAD_(u_int)]; }; struct sched_setparam_args { - pid_t pid; - const struct sched_param * param; + pid_t pid; char pid_[PAD_(pid_t)]; + const struct sched_param * param; char param_[PAD_(const struct sched_param *)]; }; struct sched_getparam_args { - pid_t pid; - struct sched_param * param; + pid_t pid; char pid_[PAD_(pid_t)]; + struct sched_param * param; char param_[PAD_(struct sched_param *)]; }; struct sched_setscheduler_args { - pid_t pid; - int policy; - const struct sched_param * param; + pid_t pid; char pid_[PAD_(pid_t)]; + int policy; char policy_[PAD_(int)]; + const struct sched_param * param; char param_[PAD_(const struct sched_param *)]; }; struct sched_getscheduler_args { - pid_t pid; + pid_t pid; char pid_[PAD_(pid_t)]; }; struct sched_yield_args { - int dummy; + register_t dummy; }; struct sched_get_priority_max_args { - int policy; + int policy; char policy_[PAD_(int)]; }; struct sched_get_priority_min_args { - int policy; + int policy; char policy_[PAD_(int)]; }; struct sched_rr_get_interval_args { - pid_t pid; - struct timespec * interval; + pid_t pid; char pid_[PAD_(pid_t)]; + struct timespec * interval; char interval_[PAD_(struct timespec *)]; }; struct utrace_args { - caddr_t addr; - size_t len; + caddr_t addr; char addr_[PAD_(caddr_t)]; + size_t len; char len_[PAD_(size_t)]; }; int nosys __P((struct proc *, struct nosys_args *)); void exit __P((struct proc *, struct rexit_args *)) __dead2; @@ -1085,118 +1088,118 @@ int utrace __P((struct proc *, struct utrace_args *)); #ifdef COMPAT_43 struct ocreat_args { - char * path; - int mode; + char * path; char path_[PAD_(char *)]; + int mode; char mode_[PAD_(int)]; }; struct olseek_args { - int fd; - long offset; - int whence; + int fd; char fd_[PAD_(int)]; + long offset; char offset_[PAD_(long)]; + int whence; char whence_[PAD_(int)]; }; struct ostat_args { - char * path; - struct ostat * ub; + char * path; char path_[PAD_(char *)]; + struct ostat * ub; char ub_[PAD_(struct ostat *)]; }; struct olstat_args { - char * path; - struct ostat * ub; + char * path; char path_[PAD_(char *)]; + struct ostat * ub; char ub_[PAD_(struct ostat *)]; }; struct ofstat_args { - int fd; - struct ostat * sb; + int fd; char fd_[PAD_(int)]; + struct ostat * sb; char sb_[PAD_(struct ostat *)]; }; struct getkerninfo_args { - int op; - char * where; - int * size; - int arg; + int op; char op_[PAD_(int)]; + char * where; char where_[PAD_(char *)]; + int * size; char size_[PAD_(int *)]; + int arg; char arg_[PAD_(int)]; }; struct ommap_args { - void * addr; - int len; - int prot; - int flags; - int fd; - long pos; + void * addr; char addr_[PAD_(void *)]; + int len; char len_[PAD_(int)]; + int prot; char prot_[PAD_(int)]; + int flags; char flags_[PAD_(int)]; + int fd; char fd_[PAD_(int)]; + long pos; char pos_[PAD_(long)]; }; struct gethostname_args { - char * hostname; - u_int len; + char * hostname; char hostname_[PAD_(char *)]; + u_int len; char len_[PAD_(u_int)]; }; struct sethostname_args { - char * hostname; - u_int len; + char * hostname; char hostname_[PAD_(char *)]; + u_int len; char len_[PAD_(u_int)]; }; struct osend_args { - int s; - caddr_t buf; - int len; - int flags; + int s; char s_[PAD_(int)]; + caddr_t buf; char buf_[PAD_(caddr_t)]; + int len; char len_[PAD_(int)]; + int flags; char flags_[PAD_(int)]; }; struct orecv_args { - int s; - caddr_t buf; - int len; - int flags; + int s; char s_[PAD_(int)]; + caddr_t buf; char buf_[PAD_(caddr_t)]; + int len; char len_[PAD_(int)]; + int flags; char flags_[PAD_(int)]; }; struct osigvec_args { - int signum; - struct sigvec * nsv; - struct sigvec * osv; + int signum; char signum_[PAD_(int)]; + struct sigvec * nsv; char nsv_[PAD_(struct sigvec *)]; + struct sigvec * osv; char osv_[PAD_(struct sigvec *)]; }; struct osigblock_args { - int mask; + int mask; char mask_[PAD_(int)]; }; struct osigsetmask_args { - int mask; + int mask; char mask_[PAD_(int)]; }; struct osigstack_args { - struct sigstack * nss; - struct sigstack * oss; + struct sigstack * nss; char nss_[PAD_(struct sigstack *)]; + struct sigstack * oss; char oss_[PAD_(struct sigstack *)]; }; struct orecvmsg_args { - int s; - struct omsghdr * msg; - int flags; + int s; char s_[PAD_(int)]; + struct omsghdr * msg; char msg_[PAD_(struct omsghdr *)]; + int flags; char flags_[PAD_(int)]; }; struct osendmsg_args { - int s; - caddr_t msg; - int flags; + int s; char s_[PAD_(int)]; + caddr_t msg; char msg_[PAD_(caddr_t)]; + int flags; char flags_[PAD_(int)]; }; struct otruncate_args { - char * path; - long length; + char * path; char path_[PAD_(char *)]; + long length; char length_[PAD_(long)]; }; struct oftruncate_args { - int fd; - long length; + int fd; char fd_[PAD_(int)]; + long length; char length_[PAD_(long)]; }; struct ogetpeername_args { - int fdes; - caddr_t asa; - int * alen; + int fdes; char fdes_[PAD_(int)]; + caddr_t asa; char asa_[PAD_(caddr_t)]; + int * alen; char alen_[PAD_(int *)]; }; struct osethostid_args { - long hostid; + long hostid; char hostid_[PAD_(long)]; }; struct ogetrlimit_args { - u_int which; - struct ogetrlimit * rlp; + u_int which; char which_[PAD_(u_int)]; + struct ogetrlimit * rlp; char rlp_[PAD_(struct ogetrlimit *)]; }; struct osetrlimit_args { - u_int which; - struct ogetrlimit * rlp; + u_int which; char which_[PAD_(u_int)]; + struct ogetrlimit * rlp; char rlp_[PAD_(struct ogetrlimit *)]; }; struct okillpg_args { - int pgid; - int signum; + int pgid; char pgid_[PAD_(int)]; + int signum; char signum_[PAD_(int)]; }; struct ogetdirentries_args { - int fd; - char * buf; - u_int count; - long * basep; + int fd; char fd_[PAD_(int)]; + char * buf; char buf_[PAD_(char *)]; + u_int count; char count_[PAD_(u_int)]; + long * basep; char basep_[PAD_(long *)]; }; int ocreat __P((struct proc *, struct ocreat_args *)); int olseek __P((struct proc *, struct olseek_args *)); @@ -1233,4 +1236,6 @@ int ogetdirentries __P((struct proc *, struct ogetdirentries_args *)); #endif /* COMPAT_43 */ +#undef PAD_ + #endif /* !_SYS_SYSPROTO_H_ */ diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 60c4c25..cc39cad 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)systm.h 8.7 (Berkeley) 3/29/95 - * $Id: systm.h,v 1.69 1998/01/21 18:28:49 gibbs Exp $ + * $Id: systm.h,v 1.70 1998/02/24 02:01:11 bde Exp $ */ #ifndef _SYS_SYSTM_H_ @@ -112,7 +112,11 @@ void ttyprintf __P((struct tty *, const char *, ...)); void bcopy __P((const void *from, void *to, size_t len)); void ovbcopy __P((const void *from, void *to, size_t len)); +#ifdef __i386__ extern void (*bzero) __P((void *buf, size_t len)); +#else +void bzero __P((void *buf, size_t len)); +#endif void *memcpy __P((void *to, const void *from, size_t len)); @@ -126,10 +130,10 @@ int copyout __P((const void *kaddr, void *udaddr, size_t len)); int fubyte __P((const void *base)); int subyte __P((void *base, int byte)); int suibyte __P((void *base, int byte)); -int fuword __P((const void *base)); -int suword __P((void *base, int word)); -int fusword __P((void *base)); -int susword __P((void *base, int word)); +long fuword __P((const void *base)); +int suword __P((void *base, long word)); +long fusword __P((void *base)); +int susword __P((void *base, long word)); int hzto __P((struct timeval *tv)); void realitexpire __P((void *)); @@ -176,6 +180,8 @@ void callout_handle_init __P((struct callout_handle *)); struct callout_handle timeout __P((timeout_t *, void *, int)); void untimeout __P((timeout_t *, void *, struct callout_handle)); +#ifdef __i386__ + /* Interrupt management */ void setdelayed(void); void setsoftast(void); @@ -213,6 +219,12 @@ intrmask_t splvm(void); void splx(intrmask_t ipl); void splz(void); +#endif + +#ifdef __alpha__ +#include <machine/ipl.h> +#endif + /* * XXX It's not clear how "machine independent" these will be yet, but * they are used all over the place especially in pci drivers. We would diff --git a/sys/sys/tty.h b/sys/sys/tty.h index b7a59e8..d3dd4df 100644 --- a/sys/sys/tty.h +++ b/sys/sys/tty.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)tty.h 8.6 (Berkeley) 1/21/94 - * $Id: tty.h,v 1.40 1997/10/12 20:26:06 phk Exp $ + * $Id: tty.h,v 1.41 1998/03/07 15:36:25 bde Exp $ */ #ifndef _SYS_TTY_H_ @@ -236,12 +236,12 @@ int putc __P((int c, struct clist *q)); int q_to_b __P((struct clist *q, char *cp, int cc)); int unputc __P((struct clist *q)); -int ttcompat __P((struct tty *tp, int com, caddr_t data, int flag)); -int ttsetcompat __P((struct tty *tp, int *com, caddr_t data, struct termios *term)); +int ttcompat __P((struct tty *tp, u_long com, caddr_t data, int flag)); +int ttsetcompat __P((struct tty *tp, u_long *com, caddr_t data, struct termios *term)); void termioschars __P((struct termios *t)); int tputchar __P((int c, struct tty *tp)); -int ttioctl __P((struct tty *tp, int com, void *data, int flag)); +int ttioctl __P((struct tty *tp, u_long com, void *data, int flag)); int ttread __P((struct tty *tp, struct uio *uio, int flag)); void ttrstrt __P((void *tp)); int ttypoll __P((struct tty *tp, int events, struct proc *p)); diff --git a/sys/sys/types.h b/sys/sys/types.h index 12f128a..085825b 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)types.h 8.6 (Berkeley) 2/19/95 - * $Id: types.h,v 1.23 1998/01/08 00:27:34 alex Exp $ + * $Id: types.h,v 1.24 1998/02/24 02:11:39 bde Exp $ */ #ifndef _SYS_TYPES_H_ @@ -73,7 +73,11 @@ typedef u_int16_t nlink_t; /* link count */ typedef _BSD_OFF_T_ off_t; /* file offset */ typedef _BSD_PID_T_ pid_t; /* process id */ typedef quad_t rlim_t; /* resource limit */ +#ifdef __alpha__ /* XXX should be in <machine/types.h> */ +typedef int64_t segsz_t; /* segment size */ +#else typedef int32_t segsz_t; /* segment size */ +#endif typedef int32_t swblk_t; /* swap offset */ typedef u_int32_t uid_t; /* user id */ diff --git a/sys/vm/vm_extern.h b/sys/vm/vm_extern.h index a7d2dfe..34deba7 100644 --- a/sys/vm/vm_extern.h +++ b/sys/vm/vm_extern.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)vm_extern.h 8.2 (Berkeley) 1/12/94 - * $Id: vm_extern.h,v 1.36 1997/12/31 02:35:29 alex Exp $ + * $Id: vm_extern.h,v 1.37 1998/01/22 17:30:32 dyson Exp $ */ #ifndef _VM_EXTERN_H_ @@ -61,7 +61,7 @@ int swapon __P((struct proc *, void *, int *)); #endif void faultin __P((struct proc *p)); -int grow __P((struct proc *, u_int)); +int grow __P((struct proc *, size_t)); int kernacc __P((caddr_t, int, int)); vm_offset_t kmem_alloc __P((vm_map_t, vm_size_t)); vm_offset_t kmem_alloc_pageable __P((vm_map_t, vm_size_t)); @@ -96,7 +96,7 @@ void vnode_pager_umount __P((struct mount *)); void vnode_pager_uncache __P((struct vnode *, struct proc *)); void vslock __P((caddr_t, u_int)); void vsunlock __P((caddr_t, u_int, int)); -void vm_object_print __P((/* db_expr_t */ int, boolean_t, /* db_expr_t */ int, +void vm_object_print __P((/* db_expr_t */ long, boolean_t, /* db_expr_t */ long, char *)); void vm_fault_quick __P((caddr_t v, int prot)); diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 24c028a..44fc57f 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_map.c,v 1.126 1998/05/16 23:03:20 dyson Exp $ + * $Id: vm_map.c,v 1.127 1998/05/21 07:47:55 dyson Exp $ */ /* @@ -2844,9 +2844,9 @@ DB_SHOW_COMMAND(map, vm_map_print) vm_map_entry_t entry; - db_iprintf("%s map 0x%x: pmap=0x%x, nentries=%d, version=%d\n", + db_iprintf("%s map 0x%lx: pmap=0x%lx, nentries=%d, version=%d\n", (map->is_main_map ? "Task" : "Share"), - (int) map, (int) (map->pmap), map->nentries, + (long) map, (long) (map->pmap), map->nentries, map->timestamp); nlines++; @@ -2865,8 +2865,8 @@ DB_SHOW_COMMAND(map, vm_map_print) } #endif - db_iprintf("map entry 0x%x: start=0x%x, end=0x%x\n", - (int) entry, (int) entry->start, (int) entry->end); + db_iprintf("map entry 0x%x: start=0x%lx, end=0x%lx\n", + (long) entry, (long) entry->start, (long) entry->end); nlines++; if (map->is_main_map) { static char *inheritance_name[4] = @@ -2880,23 +2880,23 @@ DB_SHOW_COMMAND(map, vm_map_print) db_printf(", wired"); } if (entry->eflags & (MAP_ENTRY_IS_A_MAP|MAP_ENTRY_IS_SUB_MAP)) { - db_printf(", share=0x%x, offset=0x%x\n", - (int) entry->object.share_map, - (int) entry->offset); + db_printf(", share=0x%lx, offset=0x%lx\n", + (long) entry->object.share_map, + (long) entry->offset); nlines++; if ((entry->prev == &map->header) || ((entry->prev->eflags & MAP_ENTRY_IS_A_MAP) == 0) || (entry->prev->object.share_map != entry->object.share_map)) { db_indent += 2; - vm_map_print((int)entry->object.share_map, + vm_map_print((long)entry->object.share_map, full, 0, (char *)0); db_indent -= 2; } } else { - db_printf(", object=0x%x, offset=0x%x", - (int) entry->object.vm_object, - (int) entry->offset); + db_printf(", object=0x%lx, offset=0x%lx", + (long) entry->object.vm_object, + (long) entry->offset); if (entry->eflags & MAP_ENTRY_COW) db_printf(", copy (%s)", (entry->eflags & MAP_ENTRY_NEEDS_COPY) ? "needed" : "done"); @@ -2908,7 +2908,7 @@ DB_SHOW_COMMAND(map, vm_map_print) (entry->prev->object.vm_object != entry->object.vm_object)) { db_indent += 2; - vm_object_print((int)entry->object.vm_object, + vm_object_print((long)entry->object.vm_object, full, 0, (char *)0); nlines += 4; db_indent -= 2; @@ -2934,7 +2934,7 @@ DB_SHOW_COMMAND(procvm, procvm) printf("p = 0x%x, vmspace = 0x%x, map = 0x%x, pmap = 0x%x\n", p, p->p_vmspace, &p->p_vmspace->vm_map, &p->p_vmspace->vm_pmap); - vm_map_print ((int) &p->p_vmspace->vm_map, 1, 0, NULL); + vm_map_print ((long) &p->p_vmspace->vm_map, 1, 0, NULL); } #endif /* DDB */ diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index 979755e..6bf7e1c 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -38,7 +38,7 @@ * from: Utah $Hdr: vm_mmap.c 1.6 91/10/21$ * * @(#)vm_mmap.c 8.4 (Berkeley) 1/12/94 - * $Id: vm_mmap.c,v 1.76 1998/05/18 18:26:27 guido Exp $ + * $Id: vm_mmap.c,v 1.77 1998/05/19 07:13:21 peter Exp $ */ /* @@ -60,6 +60,7 @@ #include <sys/conf.h> #include <sys/stat.h> #include <sys/vmmeter.h> +#include <sys/resourcevar.h> #include <miscfs/specfs/specdev.h> @@ -970,7 +971,7 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, vm_size_t size, vm_prot_t prot, vp = (struct vnode *) handle; if (vp->v_type == VCHR) { type = OBJT_DEVICE; - handle = (void *)vp->v_rdev; + handle = (void *)(long)vp->v_rdev; } else { struct vattr vat; int error; diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index df91aa0..550dc44 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_object.c,v 1.120 1998/04/29 04:28:09 dyson Exp $ + * $Id: vm_object.c,v 1.121 1998/05/21 07:47:58 dyson Exp $ */ /* @@ -1596,16 +1596,16 @@ DB_SHOW_COMMAND(object, vm_object_print_static) if (object == NULL) return; - db_iprintf("Object 0x%x: type=%d, size=0x%x, res=%d, ref=%d, flags=0x%x\n", - (int) object, (int) object->type, (int) object->size, + db_iprintf("Object 0x%lx: type=%d, size=0x%lx, res=%d, ref=%d, flags=0x%x\n", + (long) object, (int) object->type, (long) object->size, object->resident_page_count, object->ref_count, object->flags); - db_iprintf(" sref=%d, offset=0x%x, backing_object(%d)=(0x%x)+0x%x\n", + db_iprintf(" sref=%d, offset=0x%x, backing_object(%d)=(0x%lx)+0x%x\n", object->shadow_count, (int) object->paging_offset, - (((int)object->backing_object)?object->backing_object->ref_count:0), - (int) object->backing_object, + (((long)object->backing_object)?object->backing_object->ref_count:0), + (long) object->backing_object, (int) object->backing_object_offset); if (!full) @@ -1638,9 +1638,9 @@ DB_SHOW_COMMAND(object, vm_object_print_static) /* XXX need this non-static entry for calling from vm_map_print. */ void vm_object_print(addr, have_addr, count, modif) - db_expr_t addr; + /* db_expr_t */ long addr; boolean_t have_addr; - db_expr_t count; + /* db_expr_t */ long count; char *modif; { vm_object_print_static(addr, have_addr, count, modif); diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index d07ce44..72661f6 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)vm_page.c 7.4 (Berkeley) 5/7/91 - * $Id: vm_page.c,v 1.99 1998/05/02 03:02:13 peter Exp $ + * $Id: vm_page.c,v 1.100 1998/06/02 05:50:08 dyson Exp $ */ /* @@ -359,7 +359,7 @@ vm_page_hash(object, pindex) vm_object_t object; vm_pindex_t pindex; { - return ((((unsigned) object) >> 5) + (pindex >> 1)) & vm_page_hash_mask; + return ((((unsigned long) object) >> 5) + (pindex >> 1)) & vm_page_hash_mask; } /* diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index 51cbf76..b2c5ffd 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_page.h,v 1.38 1998/03/07 21:37:15 dyson Exp $ + * $Id: vm_page.h,v 1.39 1998/05/24 04:25:27 dyson Exp $ */ /* @@ -116,8 +116,13 @@ struct vm_page { u_char busy; /* page busy count */ /* NOTE that these must support one bit per DEV_BSIZE in a page!!! */ /* so, on normal X86 kernels, they must be at least 8 bits wide */ +#if PAGE_SIZE == 4096 u_char valid; /* map of valid DEV_BSIZE chunks */ u_char dirty; /* map of dirty DEV_BSIZE chunks */ +#elif PAGE_SIZE == 8192 + u_short valid; /* map of valid DEV_BSIZE chunks */ + u_short dirty; /* map of dirty DEV_BSIZE chunks */ +#endif }; /* |