Fixes sys_dup_fds_to
authorBarret Rhoden <brho@cs.berkeley.edu>
Tue, 26 Aug 2014 21:58:01 +0000 (14:58 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 26 Aug 2014 21:58:01 +0000 (14:58 -0700)
commit3d93b08759ee00ab34d273c96ce2f12493f22153
tree79a037da3d2c13a5e8f769a8a45ba641c5a028ce
parent59e60f2375694d1d244c01a14fa52cb6b20a3047
Fixes sys_dup_fds_to

Had a gaping hole where we didn't make sure that p controls the target (even
though proc_controls() is mostly a noop now).

Also fixes up the error reporting (set_errno and -1, instead of returning
-error).
kern/src/syscall.c