X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fsyscall-compat.hc;h=5f693844528e7d08831b01a4bc736b5abe248613;hb=3b34449070c0846fdc49436d1edd5916512f1644;hp=306fffb8bcc1e62e40ecd7c21d92c350fca0c69b;hpb=06e1018272502e1d15d6d8f32b80fa96420785b8;p=util-vserver.git diff --git a/lib/syscall-compat.hc b/lib/syscall-compat.hc index 306fffb..5f69384 100644 --- a/lib/syscall-compat.hc +++ b/lib/syscall-compat.hc @@ -1,4 +1,4 @@ -// $Id: syscall-compat.hc,v 1.1.4.7 2003/12/30 13:45:57 ensc Exp $ --*- c++ -*-- +// $Id: syscall-compat.hc 1450 2004-04-14 23:21:23Z ensc $ --*- 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 @@ -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