Commit Graph

5159 Commits

Author SHA1 Message Date
rtr
0dedd9772f fix parameter types in pr_ioctl, called xx_control() functions and remove
abuse of pointer to struct mbuf type.

param2 changed to u_long type and uses parameter name 'cmd' (ioctl command)
param3 changed to void * type and uses parameter name 'data'
param4 changed to struct ifnet * and uses parameter name 'ifp'
param5 has been removed (formerly struct lwp *) and uses of 'l' have been
       replaced with curlwp from curproc(9).

callers have had (now unnecessary) casts to struct mbuf * removed, called
code has had (now unnecessary) casts to u_long, void * and struct ifnet *
respectively removed.

reviewed by rmind@
2014-07-01 05:49:18 +00:00
dholland
01e782f371 Revert the following changes:
src/sys/sys/quotactl.h 1.37
   src/sys/compat/netbsd32/netbsd32.h 1.101
   src/sys/compat/netbsd32/netbsd32_netbsd.c 1.188, 1.189
   src/sys/kern/vfs_quotactl.c 1.39
   src/sys/kern/vfs_syscalls.c 1.483
   src/sys/ufs/lfs/ulfs_quota.c 1.11
   src/sys/ufs/ufs/ufs_quota.c 1.116
   src/lib/libquota/quota_kernel.c 1.5

and do them correctly.

If you're going to change the name of something, you need to change
the name of *all* the things with the same name, not just a handful,
and you should change it to something similar so it still matches the
rest of the system rather than just picking an arbitrarily different
name.

Hi, Joerg.

To wit, rename the quotactl "delete" operation to "del", because
"delete" is a reserved word in C++ and for some reason Joerg wants to
run internal interfaces used only by C code through his C++ compiler.
Do not rename it to "remove" instead, because this doesn't match
libquota or the rest of the usage throughout the system; and rename
all the related identifiers, not just the ones that blew the mind of
Joerg's C++ compiler.

Because this is not a user-facing API (the only userland consumer
sys/quotactl.h is libquota) it is sort of ok to make arbitrary
source-incompatible changes; however, by the same token it's completely
unnecessary. If it *were* a user-facing API that someone might have a
semi-rational reason to want to run a C++ compiler on, it would be
incorrect to change it at this point.
2014-06-28 22:27:50 +00:00
maxv
973b0f16a2 Sync getfh() with the native implementation. It also fixes:
a) a return value
b) a vnode lock
c) a user-controlled memory allocation

ok christos@, on tech-kern
2014-06-28 11:39:15 +00:00
maxv
2ccd0cb073 Empy comment 2014-06-28 11:06:31 +00:00
njoly
05d405dade Add support for more open flags that have a native equivalent
(O_NONBLOCK, O_DIRECT and O_NOFOLLOW).
Translate native EFTYPE error (missing on Linux) to expected ELOOP;
when opening symlinks with flag O_NOFOLLOW.
2014-06-25 16:38:53 +00:00
njoly
bf8fee7bf6 Add a few missing open(2) flags (LINUX_O_*). Fix alpha wrong values. 2014-06-25 16:30:42 +00:00
maxv
dc0681e4c5 Allocate directly KQ_NEVENTS bytes. Otherwise a user can panic the system.
ok christos@
2014-06-24 14:33:57 +00:00
maxv
a125a5eac2 Remove unused headers. 2014-06-24 12:17:40 +00:00
maxv
b042e45033 Remove dead code. The kernel already checks for PT_INTERP sections, and puts
their content into "itp". There's no need for re-reading the whole binary and
trying to find this section again. Just use "itp".

DEBUG_FREEBSD_ELF is now unused, so remove its references in amd64/conf/ALL
and i386/conf/ALL.
2014-06-24 11:59:10 +00:00
christos
91d0cc5d6b simplify and clarify 2014-06-22 22:19:28 +00:00
maxv
1fc63be65d Sync swapctl() with netbsd32. Return EINVAL when misc<0, and 0 when misc=0
or uvmexp.nswapdev=0.
2014-06-22 19:09:39 +00:00
rtr
d54d7ab24a * split PRU_CONTROL functionality out of xxx_userreq() switches and place
into separate xxx_ioctl() functions.
* place KASSERT(req != PRU_CONTROL) inside xxx_userreq() as it is now
  inappropriate for req = PRU_CONTROL in xxx_userreq().
* replace calls to pr_generic() with req = PRU_CONTROL with pr_ioctl().
* remove & fixup references to PRU_CONTROL xxx_userreq() function comments.
* fix various comments references for xxx_userreq() that mentioned
  PRU_CONTROL as xxx_userreq() no longer handles the request.

a further change will follow to fix parameter and naming inconsistencies
retained from original code.

Reviewed by rmind@
2014-06-22 08:10:18 +00:00
christos
a15da4b281 Avoid NULL dereference and fix sched param conversion (at least make it
do something). Pointed out by Maxime Villard
2014-06-21 23:12:10 +00:00
maxv
9cdb398e86 If SCARG(uap, what) = 0, copyin() will copy (size_t)-1 bytes, and it's not
a good idea; but not proven harmful.

With the help of njoly@
2014-06-21 10:23:07 +00:00
joerg
440506dd8d Rename stack gap arguments. 2014-06-13 10:42:26 +00:00
joerg
05ceadd7ef Regnerate 2014-06-13 10:37:22 +00:00
joerg
98fc8b37be delete -> remove 2014-06-13 10:37:02 +00:00
joerg
881138893f Rename argument like the native syscall. 2014-06-13 10:36:18 +00:00
joerg
ef53e37514 Don't t use a C++ keyword as field name. 2014-06-12 21:39:45 +00:00
njoly
88a8e0469e Cleanup pipe(2) flags, now that native handle them. 2014-06-01 13:42:12 +00:00
njoly
d7efe85816 Regen for munmap(2) signature. 2014-05-31 08:52:54 +00:00
njoly
72a681e433 Fix munmap(2) signature. 2014-05-31 08:51:19 +00:00
njoly
c45e6d878d Regen for utimes(2). 2014-05-29 10:47:23 +00:00
njoly
f0bcde4b65 Add utimes(2) support. 2014-05-29 10:47:00 +00:00
njoly
507b03fc31 Regen for utimes(2) change. 2014-05-29 10:36:31 +00:00
njoly
769728743d For utimes(2), use compat_50_sys_utimes() instead of local version. 2014-05-29 10:35:26 +00:00
njoly
4e4bef8a08 Add missing specific LINUX_SOCK_NONBLOCK value for alpha. 2014-05-23 12:30:12 +00:00
njoly
bf70618478 Add a funtion that translate socket type value from Linux to NetBSD.
Use it for socket and socketpair syscalls.
2014-05-23 12:28:51 +00:00
dholland
39b82eecb9 Use accessor functions for the tty's table of control characters.
(at least from outside the core tty sources)

Move some xon/xoff code from net/ppp_tty.c to kern/tty.c.
2014-05-22 16:31:19 +00:00
njoly
1815fcdd2a Fix signed vs. unsigned comparison in getgroups16() syscall. Negative
gisetsize values now fail with EINVAL as expected.
2014-05-20 17:31:18 +00:00
njoly
30a02d27a2 Regen for getgroups/setgroups update. 2014-05-20 17:26:04 +00:00
njoly
1085071e9f Fix getgroups/setgroups signature. 2014-05-20 17:24:49 +00:00
rmind
39bd8dee77 Add struct pr_usrreqs with a pr_generic function and prepare for the
dismantling of pr_usrreq in the protocols; no functional change intended.
PRU_ATTACH/PRU_DETACH changes will follow soon.

Bump for struct protosw.  Welcome to 6.99.62!
2014-05-18 14:46:15 +00:00
njoly
9676d5d738 Simplify dup3 emulation to call dodup() directly instead of
sys_dup2()+fd_set_exclose(). While here, add some error conditions.
2014-05-18 09:30:00 +00:00
rmind
bc9504c95e Replace open-coded access (and boundary checking) of ifindex2ifnet with
if_byindex() function.
2014-05-17 21:26:20 +00:00
njoly
3b443c792e Fix fadvise64 syscalls. Unlike our, linux fadvise syscall do not
return error code; call do_posix_fadvise().
2014-05-17 09:30:07 +00:00
njoly
00939bcb8e Regen for fadvise64 offset types changes. 2014-05-17 09:25:06 +00:00
njoly
e9bb8eca6d Fix fadvise64 syscalls to use 64bit offset types. 2014-05-17 09:23:51 +00:00
martin
804dc5f91b Get rid of all sysc_init_field uses - initialize fields directly in C99
notation.
2014-05-16 12:22:32 +00:00
manu
a0b6b9a1c4 Fix cases where count <= 0 (thanks to Maxime Villard for raising this) 2014-05-15 18:25:35 +00:00
njoly
79943851d1 Regen for setcontext signature. 2014-05-15 09:55:11 +00:00
njoly
9e6b53cfb2 Fix setcontext signature, which has a single argument not three. 2014-05-15 09:54:06 +00:00
njoly
45d75a98a6 Fix c&p error for the length argument in fadvise64_64. 2014-05-06 18:17:22 +00:00
njoly
e942f57595 Regen for mknod device argument type change. 2014-05-06 17:34:39 +00:00
njoly
c908bf86c3 Reduce diffs between archs; make mknod device argument unsigned. 2014-05-06 17:33:35 +00:00
njoly
3388ddd03d linux_off_t -> off_t in pwrite() syscall args comment. 2014-05-06 13:21:50 +00:00
njoly
7d21c20716 Regen for pread/pwrite 64bit offset argument. 2014-05-04 10:10:39 +00:00
njoly
d63cac9fa8 Fix pread/pwrite syscalls which need a 64bit offset argument. 2014-05-04 10:08:53 +00:00
njoly
dc2a049782 Remove now unneeded bsd.kinc.mk. 2014-05-04 10:03:55 +00:00
njoly
963ddf84b8 Regen for netbsd32_off_t. 2014-04-30 17:24:20 +00:00