X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fsyscall-compat.hc;fp=lib%2Fsyscall-compat.hc;h=1590057eafe45bca8bd1283ea7e2c8bbe420ace8;hb=3f3cf95f755f3ef1c31ad8e38153deb4ee214c66;hp=8bbe9ebe1e449060511647349b976ffd9ffda94c;hpb=bfa4b37aaa195007a09bc166e8c8563d5a3c2ef1;p=util-vserver.git diff --git a/lib/syscall-compat.hc b/lib/syscall-compat.hc index 8bbe9eb..1590057 100644 --- a/lib/syscall-compat.hc +++ b/lib/syscall-compat.hc @@ -1,4 +1,4 @@ -// $Id: syscall-compat.hc,v 1.1.4.8 2004/02/19 22:56:53 ensc Exp $ --*- c++ -*-- +// $Id: syscall-compat.hc,v 1.11 2004/04/14 23:21:23 ensc Exp $ --*- c++ -*-- // Copyright (C) 2003 Enrico Scholz // @@ -22,20 +22,18 @@ #include "compat.h" #include "safechroot-internal.hc" - #include "vserver.h" -#include "vserver-internal.h" #include -static inline ALWAYSINLINE int +static inline ALWAYSINLINE xid_t vc_new_s_context_compat(xid_t ctx, unsigned int remove_cap, unsigned int flags) { struct vcmd_new_s_context_v1 msg; msg.remove_cap = remove_cap; msg.flags = flags; - return vserver(VC_CMD(COMPAT, 1, 1), CTX_USER2KERNEL(ctx), &msg); + return vserver(VCMD_new_s_context, CTX_USER2KERNEL(ctx), &msg); } static inline ALWAYSINLINE int @@ -45,23 +43,16 @@ vc_set_ipv4root_compat(uint32_t bcast, size_t nb, struct vc_ip_mask_pair const size_t i; if (nb>NB_IPV4ROOT) { - errno = -EINVAL; + errno = -EOVERFLOW; return -1; } msg.broadcast = bcast; for (i=0; i