Commit Graph

136 Commits

Author SHA1 Message Date
mrg 6a89288a37 use _KERNEL_OPT. 2001-05-30 11:37:21 +00:00
kleink 0e1ec27466 Regen. 2001-04-10 11:12:12 +00:00
kleink 7b62f6ff28 Slight indentation nit. 2001-04-10 11:11:17 +00:00
jdolecek b6d1d4db02 Change the first arg to fileops fo_stat routine to struct file *, adjust
callers and appropriate routines to cope. This makes fo_stat more
consistent with rest of fileops routines and also makes the fo_stat
match FreeBSD as an added bonus.
Discussed with Luke Mewburn on tech-kern@.
2001-04-09 10:22:00 +00:00
jdolecek 3fc6fc58e6 Call file descriptor stat function via (*fp->f_ops->fo_stat) instead
of a switch statement and explicit call.
Sprinkle some FILE_USE()/FILE_UNUSE() as appropriate.
2001-04-09 09:39:09 +00:00
ross 2d8e2c19d6 Fix soo_stat() calls for the new parameter, even if the direct call is
now obsolete, so that kernels will at least compile. I guess it was too
much trouble to change all 10 call sites, or perhaps, these days, only
things that build on i386 are important. Maybe it's the full moon tonight.
2001-04-08 08:01:36 +00:00
chs ac3bc537bd eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS			0
KERN_INVALID_ADDRESS		EFAULT
KERN_PROTECTION_FAILURE		EACCES
KERN_NO_SPACE			ENOMEM
KERN_INVALID_ARGUMENT		EINVAL
KERN_FAILURE			various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE		ENOMEM
KERN_NOT_RECEIVER		<unused>
KERN_NO_ACCESS			<unused>
KERN_PAGES_LOCKED		<unused>
2001-03-15 06:10:32 +00:00
mrg f1a8e2ab5f be more verbose about failed vmcmds. 2001-03-04 13:42:32 +00:00
eeh 8a4a682091 Support flexible process address space limits and bump kernel version number. 2001-02-14 18:21:42 +00:00
eeh a562e38910 Don't play fast and loose with pointers. 2001-02-11 00:00:29 +00:00
mrg da9e4bd3a1 split up netbsd32_netbsd.c into 9 new files, leaving only those syscalls that
have no special interpretations besides simple syscall args conversion.
2001-02-08 13:19:33 +00:00
mrg e927957b42 move the static inline conversion functions into a header file so other
files can see these.  note a bunch of functions that should be moved
into their own files.
2001-02-07 15:22:39 +00:00
mrg 7217f71af3 compat_12_netbsd32_{,fl}stat12() were not copyout()ing the converted result. 2001-02-07 13:15:54 +00:00
mrg c1b372c5ca fix the glaring errors in compat_13_netbsd32_sigaltstack13 2001-02-07 13:14:07 +00:00
mrg 7a908a5f44 compat_sunos needs netbsd32_compat_09.c 2001-02-07 13:13:01 +00:00
eeh 4380259bc7 Specify a process' address space limits for uvmspace_exec(). 2001-02-06 17:01:51 +00:00
mrg 8e76e697d7 fix the glaring errors in emulations for osendmsg, orecvmsg, osigvec and osigstack. 2001-02-05 06:32:55 +00:00
mrg 32fdb6e321 change_utimes32() was copyin()ing a struct timeval, not netbsd32_timeval.
general clean up.
2001-02-04 09:00:14 +00:00
mrg a531aa1597 emulate kern.boottime. now 32-bit w(1) works properly. 2001-02-04 07:08:51 +00:00
mrg 2aa001b546 make sysctl vm.loadavg work. 2001-02-04 06:35:07 +00:00
mrg ef777aa80b sync a comment from sys_execve().
make netbsd32_recvfrom() work.
2001-02-03 12:46:55 +00:00
mrg dabf2a8634 s/sizeof(struct exec)/sizeof(struct netbsd32_exec)/ when calculating file offsets. now sunos32 nmagic/omagic work. 2001-02-03 12:45:44 +00:00
mrg eefaef162b properly implement compat_43_netbsd32_stat43, compat_43_netbsd32_lstat43
and compat_43_netbsd32_fstat43.  now 32-bit ls(1) works.  so does static
sunos `/sbin/sh' on sparc64.
2001-02-02 13:06:48 +00:00
mrg 87cc07b7c9 implement netbsd32_lchflags & netbsd32_utrace 2001-02-02 13:05:18 +00:00
mrg 674f1689f6 regen 2001-02-02 13:03:39 +00:00
mrg b0f29c9c95 add lchflags, issetugid, utrace, reserves for [gs]etcontext, and sched/SA. 2001-02-02 13:01:44 +00:00
mrg e4c34bc9e5 de-static netbsd32_exec_aout_prep_[zno]magic().
de-static netbsd32_from_stat43().
move the guts of netbsd32_execve() into netbsd32_execve2().

all of are for the forthcoming sunos32 compat mode (for sparc64).
2001-02-02 07:08:17 +00:00
thorpej b54650a0bc Regen; getpid(2) is MP-safe. 2001-01-27 07:58:37 +00:00
thorpej e00fb66e89 getpid(2) is MP-safe. 2001-01-27 07:58:22 +00:00
thorpej 1b6a66420e Regen; add sy_flags. 2001-01-27 07:23:06 +00:00
jdolecek 13ca559d39 Use CHECK_ALT_SYMLINK() instead CHECK_ALT_EXISTS() where appropriate.
This addresses kern/11757.
2001-01-22 20:08:03 +00:00
jdolecek e9e91a0fb5 split off thread specific stuff from struct sigacts to struct sigctx, leaving
only signal handler array sharable between threads
move other random signal stuff from struct proc to struct sigctx

This addresses kern/10981 by Matthew Orgass.
2000-12-22 22:58:52 +00:00
mrg 272c549ab2 copy exec_aout.c:exec_aout_setup_stack to netbsd32_exec_aout_setup_stack,
but use USRSTACK32 not USRSTACK, so that we get 32-bit stack addresses.

now 32 bit a.out binaries work on sparc64.
2000-12-18 14:50:04 +00:00
mycroft 455360f941 Do the __HAVE_SYSCALL_INTERN and __HAVE_MINIMAL_EMUL dance. 2000-12-12 08:00:26 +00:00
jdolecek a6ca890142 always fill in e_syscall in respective emul_*; if the emulation doesn't
have it's own separated *_syscall() function, use syscall()
2000-12-09 12:38:23 +00:00
mycroft f348afacb9 Regen. 2000-12-09 05:37:01 +00:00
mycroft 9682cf0b09 Add the %% separators. 2000-12-09 05:27:28 +00:00
jdolecek 0576f87ad3 add infrastructure to load emulations and their executable support dynamically
via LKM
2000-12-08 19:42:11 +00:00
eeh 433c92930e Fix uninitialized pointer bug. 2000-12-05 15:25:57 +00:00
fvdl c3d820fa5d Use a copied fktrace syscall arg structure with out 'const int' for the
filedescriptor to copy arguments, avoiding a warning. XXX
2000-12-03 14:48:29 +00:00
fvdl 5ce71a2aed Include opt_* files to make sure prototypes are included. 2000-12-03 14:47:27 +00:00
fvdl 8537802e8d Add systm.h to pull in copyout* prototypes. 2000-12-03 13:15:38 +00:00
mrg f5a3788577 pull over lost fix from nebsd32_exec.c:
>revision 1.25
>date: 2000/12/01 08:59:02;  author: mrg;  state: Exp;  lines: +2 -2
>in netbsd32_elf32_probe(), 'pos' is really a pointer to an Elf_Addr, not a
>vaddr_t.  cast the pointer before dereferencing it to avoid the alignment
>fault that broke compat_netbsd32, cuz pos is defined like:
>        Elf_Addr phdr = 0, pos = 0;
>in exec_elf32.c.
2000-12-02 04:08:35 +00:00
jdolecek df127e0001 make netbsd32_copyargs() an inline 2000-12-01 22:05:18 +00:00
jdolecek e53f148af5 put a.out/elf32 specific things in netbsd32_exec_{aout|elf32}.c
emul_netbsd32 was moved to netbsd32_netbsd.c
g/c netbsd32_exec.c now
2000-12-01 21:51:08 +00:00
jdolecek 758d9354ff always define COMPAT_OLDSOCK (this tracks rev.1.55 of kern/uipc_syscalls.c)
move definition of emul_netbsd32 from netbsd32_exec.c here
fix couple of compile nits I encountered while compiling this with
sparc cross-compiler
2000-12-01 21:48:24 +00:00
jdolecek 70569d32c8 prototype netbsd32_stat12_to_netbsd32() 2000-12-01 19:18:46 +00:00
jdolecek 01040d97a2 add e_path (emulation path) to struct emul, which replaces emulation-specific
*_emul_path variables

change macros CHECK_ALT_{CREAT|EXIST} to use that, 'root' doesn't need
to be passed explicitly any more and *_CHECK_ALT_{CREAT|EXIST} are removed
change explicit emul_find() calls in probe functions to get the emulation
path from the checked exec switch entry's emulation

remove no longer needed header files

add e_flags and e_syscall to struct emul; these are unsed and empty for now
2000-12-01 12:28:30 +00:00
mrg 7af8b6448c in netbsd32_elf32_probe(), 'pos' is really a pointer to an Elf_Addr, not a
vaddr_t.  cast the pointer before dereferencing it to avoid the alignment
fault that broke compat_netbsd32, cuz pos is defined like:
	Elf_Addr phdr = 0, pos = 0;
in exec_elf32.c.
2000-12-01 08:59:02 +00:00
jdolecek 50d91bb255 fix typo - it should be compat_09_netbsd32_uname, not compat_09_netbsd32_ouname 2000-11-30 19:19:43 +00:00