kernel: Add three new commands to fctnl
authorJohn Marino <draco@marino.st>
Wed, 12 Jun 2013 19:42:21 +0000 (21:42 +0200)
committerJohn Marino <draco@marino.st>
Wed, 12 Jun 2013 23:20:45 +0000 (01:20 +0200)
commita2988f1b83fa9cb2f86aec6ae08e5df76f0bf8ec
tree13017c323b9dedf68eb8ace3edb090b52470be05
parent7b9441903b35a1139f96bf49f65be192345f49e3
kernel: Add three new commands to fctnl

This commit adds the following new commands to fcntl():
  F_DUP2FD         - non-portable functional equivalent of dup2(fd, arg)
  F_DUPFD_CLOEXEC  - A version of F_DUPFD that sets the close-on-exec
                     on the new file descriptor
  F_DUP2FD_CLOEXEC - A version of F_DUP2FD that sets the close-on-exec
                     on the new file descriptor.  It is non-portable

It also adds a missing break in a case statement for F_GETOWN in
sys_fnctl(), spotted by dillon.

reviewed-by: dillon
lib/libc/sys/fcntl.2
sys/kern/kern_descrip.c
sys/sys/fcntl.h
sys/sys/kern_syscall.h