Commit Graph

3158 Commits

Author SHA1 Message Date
manu
31f25e173c Fix a reversed errno issue for Linux binaries on mips. While we are there,
fix broken includes for alpha and m68k.
2004-06-19 22:59:40 +00:00
manu
b2563527a8 Build COMPAT_LINUX again on mips after the siginfo change. 2004-06-19 18:45:30 +00:00
manu
0d510f3e7e include <sys/resourcevar.h>. It is not required for building -current,
but it is for -netbsd-2-0. Next step is to pull up the change...
2004-06-18 17:06:15 +00:00
cube
4277a3964f Regen. 2004-06-17 18:30:54 +00:00
cube
4b2667d3ec o Add support for the statvfs family of syscalls (statvfs1, fstatvfs1,
fhstatvfs1 and getvfsstat)
o Move the statfs family out of netbsd32_fs.c and netbsd32_netbsd.c to
  netbsd_compat_20.c, compiled with COMPAT_20

Reviewed by christos@.
2004-06-17 18:29:40 +00:00
manu
6b1a152604 COMPAT_LINUX/powerpc used the native stack setup routine, but now the
native version does non executable mappings on the stack. This is a
showstopper for Linux binaries.

To fix that we supply a copy f the native stack setup function for Linux
binaries, with the executable bit set.
2004-06-16 00:03:25 +00:00
yamt
6c4915e34d linux_sys_ioctl: map EPASSTHROUGH to EINVAL as sys_ioctl does.
otherwise, linux_syscall() returns garbage, at least on i386.
(it returns native_to_linux_errno[EPASSTHROUGH] where EPASSTHROUGH == -4.)

i choose EINVAL rather than ENOTTY, because linux's pipe returns it
and i think that it's a common case.
2004-06-03 01:53:28 +00:00
pk
c245462cb8 hpux_ioctl(): acquire a reference to the file. 2004-06-01 11:05:40 +00:00
pk
f0f0f16529 svr4_sys_ioctl(): acquire a reference to the file. 2004-06-01 10:38:39 +00:00
pk
c6c77837c9 sunos_ioctl(): acquire a reference to the file.
This also fixes a locking botch reported in PR#25738.
2004-06-01 10:27:39 +00:00
hannken
8c21bc6224 Add ffs internal snapshots. Written by Marshall Kirk McKusick for FreeBSD.
- Not enabled by default. Needs kernel option FFS_SNAPSHOT.
- Change parameters of ffs_blkfree.
- Let the copy-on-write functions return an error so spec_strategy
    may fail if the copy-on-write fails.
- Change genfs_*lock*() to use vp->v_vnlock instead of &vp->v_lock.
- Add flag B_METAONLY to VOP_BALLOC to return indirect block buffer.
- Add a function ffs_checkfreefile needed for snapshot creation.
- Add special handling of snapshot files:
    Snapshots may not be opened for writing and the attributes are read-only.
    Use the mtime as the time this snapshot was taken.
    Deny mtime updates for snapshot files.
- Add function transferlockers to transfer any waiting processes from
  one lock to another.
- Add vfsop VFS_SNAPSHOT to take a snapshot and make it accessible through
  a vnode.
- Add snapshot support to ls, fsck_ffs and dump.

Welcome to 2.0F.

Approved by: Jason R. Thorpe <thorpej@netbsd.org>
2004-05-25 14:54:55 +00:00
atatat
190adb15c3 Sysctl descriptions under emul subtree. 2004-05-25 04:29:08 +00:00
jonathan
230fb9b8ab Eliminate several uses of `curproc' from the socket-layer code and from NFS.
Add a new explicit `struct proc *p' argument to socreate(), sosend().
Use that argument instead of curproc. Follow-on changes to pass that
argument to socreate(), sosend(), and (*so->so_send)() calls.
These changes reviewed and independently recoded  by Matt Thomas.

Changes to soreceive() and (*dom->dom_exernalize() from Matt Thomas:
pass soreceive()'s struct uio* uio->uio_procp to unp_externalize().
Eliminate curproc from unp_externalize.   Also, now soreceive() uses
its uio->uio_procp value, pass that same value downward to
((pr->pru_usrreq)() calls for consistency, instead of (struct proc * )0.

Similar changes in sys/nfs to eliminate (most) uses of curproc,
either via the req-> r_procp field of a struct nfsreq *req argument,
or by passing down new explicit struct proc * arguments.

Reviewed by: Matt Thomas, posted to tech-kern.
NB: The (*pr->pru_usrreq)() change should be tested on more (all!) protocols.
2004-05-22 22:52:13 +00:00
christos
85699649e2 grr, forgot to take out the & 2004-05-22 20:53:26 +00:00
christos
9a0b176050 allocate memory for statvfs instead of using the stack. 2004-05-22 20:46:53 +00:00
atatat
10a7ba9ef6 Tweak sysctl setup functions (the macros, actually) for use in lkms,
and tweak lkminit_*.c (where applicable) to call them, and to call
sysctl_teardown() when being unloaded.

This consists of (1) making setup functions not be static when being
compiled as lkms (change to sys/sysctl.h), (2) making prototypes
visible for the various setup functions in header files (changes to
various header files), and (3) making simple "load" and "unload"
functions in the actual lkminit stuff.

linux_sysctl.c also needs its root exposed (ie, made not static) for
this (when built as an lkm).
2004-05-20 06:34:24 +00:00
drochner
644e697b54 regen 2004-05-11 10:55:29 +00:00
drochner
c736283f11 FreeBSD emulation should not depend on NetBSD binary compatibility
options. Include compat_20_sys_*statfs* unconditionally.
2004-05-11 10:54:51 +00:00
jonathan
d2dde9d018 Regen src/sys/compat/freebsd_sys{call.h,callargs.h,calls.c,ent.c} from
syscalls.master rev 1.45, with COMPAT_2.0 fix.
2004-05-10 20:47:14 +00:00
christos
cec7684b79 Add opt_compat_netbsd.h because we need it for COMPAT_20; pointed out
by Jonathan Stone.
2004-05-10 20:27:42 +00:00
kent
e3f4d77dda regenerate for fsync_range, uuidgen, getvfsstat, statvfs1, fstatvfs1, and fhstatvfs1 2004-05-08 14:33:12 +00:00
kent
af38d21dbd add fsync_range, uuidgen, getvfsstat, statvfs1, fstatvfs1, and fhstatvfs1. 2004-05-08 14:31:59 +00:00
pk
4a04452106 Use crdup(), instead of crget()+memcpy(). 2004-05-02 12:32:22 +00:00
fair
5b3531cc87 Line 175 VFS_STAVTFS -> STATVFS (tyop) 2004-04-27 21:37:49 +00:00
atatat
e5004170aa Be consistent about using sysc_init_field() 2004-04-27 03:49:03 +00:00
christos
f987d253b9 PR/25335: Erik E. Fair: statvfs lossage in sys/lkm/compat/osf1 2004-04-26 20:33:50 +00:00
matt
b1fee09f27 Constify sreq2breq 2004-04-25 06:25:52 +00:00
matt
22120ad628 Constify the speedtab arrays 2004-04-25 06:23:40 +00:00
matt
c768d54573 Constify an array. 2004-04-25 06:04:54 +00:00
matt
48011c94e7 Constify a few read-only arrays/variables. 2004-04-25 06:02:20 +00:00
atatat
3f800573aa Be consistent about using sysc_init_field() 2004-04-25 05:54:38 +00:00
christos
dede52abd3 PR/25288: Erik E. Fair: convert this file to statvfs 2004-04-23 12:02:39 +00:00
hannken
fcd7f3df90 Fix statfs->statvfs fallout. 2004-04-22 14:32:09 +00:00
christos
924e775ac7 fix statvfs->statvfs1 fallout 2004-04-22 14:06:31 +00:00
christos
e6f05cd289 Add the missing 'v' to fhstatvfs1 2004-04-22 12:04:03 +00:00
hannken
754675a0e1 Make it compile again after statvfs import. 2004-04-22 10:18:03 +00:00
matt
633d902c65 Regen for statvfs changes. 2004-04-22 05:44:30 +00:00
christos
22df5bb240 try to make this compile. XXX: this will not work yet (hi simon) 2004-04-21 11:50:26 +00:00
simonb
b81e6f2ef6 ANSIfy, some KNF. 2004-04-21 07:05:07 +00:00
simonb
0495170a7a Fix some statfs->statvfs fallout. Compile tested only... 2004-04-21 05:20:27 +00:00
christos
34728fd71f more statvfs1 fallout. 2004-04-21 02:40:05 +00:00
christos
36d3802e0f fix more statvfs1 fallout 2004-04-21 02:37:20 +00:00
christos
5ccca4a99a s/statvfs/statvfs1/ 2004-04-21 02:27:34 +00:00
christos
6bd1d6d4db Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
2004-04-21 01:05:31 +00:00
dmcmahill
888e67edcc Fix the sysinfo(SI_HW_SERIAL, emulation so that we actually get the
hostid of the machine rather than always getting "0".  Tested with
hostid(1) from solaris-2.8 and with lmhostid (part of FlexLM) for solaris.
Approved by atatat@.
2004-04-19 02:55:40 +00:00
matt
a6b639c3a5 Switch to using PSL_USEROK_P()
Use new save_fpu_lwp sematics to save or discard the fpu state appropriately.
2004-04-17 08:47:15 +00:00
christos
a97d60211a fix undefined variable. 2004-03-29 21:43:28 +00:00
drochner
60cbbd8f70 use netbsd32_sigcode with COMPAT_16 only 2004-03-26 18:38:55 +00:00
drochner
d19f706361 all ports define __HAVE_SIGINFO now, so remove the CPP conditionals 2004-03-26 17:34:18 +00:00
drochner
4f4ec7e627 regen after __HAVE_SIGINFO removal 2004-03-26 15:29:28 +00:00