X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Flib%2Fsyscall-compat.hc;h=d827e832a1bd39adaf9c9d88351f9f31ea2fc2d5;hb=3eb1b2279739d0f16391a3724a9897c686f030d3;hp=fb07d4df4cca6882f06d1badf0eaded019b08e62;hpb=4c0037aecd96cf23da727c12381723ab5cbfa5e4;p=util-vserver.git diff --git a/util-vserver/lib/syscall-compat.hc b/util-vserver/lib/syscall-compat.hc index fb07d4d..d827e83 100644 --- a/util-vserver/lib/syscall-compat.hc +++ b/util-vserver/lib/syscall-compat.hc @@ -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 @@ -44,24 +42,17 @@ vc_set_ipv4root_compat(uint32_t bcast, size_t nb, struct vc_ip_mask_pair const struct vcmd_set_ipv4root_v3 msg; size_t i; - if (nb>=NB_IPV4ROOT) { - errno = -EINVAL; + if (nb>NB_IPV4ROOT) { + errno = -EOVERFLOW; return -1; } msg.broadcast = bcast; for (i=0; i