From: Enrico Scholz Date: Wed, 14 Apr 2004 23:21:23 +0000 (+0000) Subject: applied new kernel API X-Git-Tag: VERSION_0_10~131 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76553349e2722d5b90712a52f14f07a8a61fcd26;p=util-vserver.git applied new kernel API renamed functions so that they correspond to the new kernel API git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1450 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/util-vserver/lib/syscall-compat.hc b/util-vserver/lib/syscall-compat.hc index 6cf111f..d827e83 100644 --- a/util-vserver/lib/syscall-compat.hc +++ b/util-vserver/lib/syscall-compat.hc @@ -50,8 +50,8 @@ vc_set_ipv4root_compat(uint32_t bcast, size_t nb, struct vc_ip_mask_pair const msg.broadcast = bcast; for (i=0; i #include -#define TEST_T2F_C(X,Y,Z) assert(vc_text2flag_compat(X,Y)==Z) +#define TEST_T2F_C(X,Y,Z) assert(vc_text2cflag_compat(X,Y)==Z) #define TEST_F2T_C(Y,X) { \ - char const *x=vc_hiflag2text_compat(X); \ + char const *x=vc_hicflag2text_compat(X); \ assert((x==0 && Y==0) || (x!=0 && Y!=0)); \ if (x!=0) assert(strcmp(x, Y)==0); \ } @@ -35,7 +35,7 @@ struct vc_err_listparser err; \ char buf[] = STR; \ uint32_t res; \ - res = vc_list2flag_compat(buf, LEN, &err); \ + res = vc_list2cflag_compat(buf, LEN, &err); \ assert(res==(EXP)); \ assert(err.len==ERR_LEN); \ if (ERR_POS==-1) assert(err.ptr==0); \ @@ -44,10 +44,10 @@ //---- -#define TEST_T2F(X,Y,Z) assert(vc_text2flag(X,Y)==Z) +#define TEST_T2F(X,Y,Z) assert(vc_text2cflag(X,Y)==Z) #define TEST_F2T(Y,X) { \ uint_least64_t x = (X); \ - char const *rc=vc_loflag2text(&x); \ + char const *rc=vc_locflag2text(&x); \ assert((rc==0 && Y==0) || (rc!=0 && Y!=0)); \ if (rc!=0) assert(strcmp(rc, Y)==0); \ } @@ -56,7 +56,7 @@ char buf[] = STR; \ volatile int res; \ struct vc_ctx_flags flags = {0,0}; \ - res = vc_list2flag(buf, LEN, &err, &flags); \ + res = vc_list2cflag(buf, LEN, &err, &flags); \ assert(res==(EXP_RES)); \ assert(flags.flagword==(EXP_FLAG)); \ assert(flags.mask ==(EXP_MASK)); \ diff --git a/util-vserver/lib/vserver.h b/util-vserver/lib/vserver.h index ae83cfa..eaa2026 100644 --- a/util-vserver/lib/vserver.h +++ b/util-vserver/lib/vserver.h @@ -253,14 +253,14 @@ extern "C" { * * \returns the xid of the created context, or VC_NOCTX on errors. errno * will be set appropriately. */ - xid_t vc_create_context(xid_t xid); + xid_t vc_ctx_create(xid_t xid); /** \brief Moves the current process into the specified context. * \ingroup syscalls * * \param xid The new context * \returns 0 on success, -1 on errors */ - int vc_migrate_context(xid_t xid); + int vc_ctx_migrate(xid_t xid); /* rlimit related functions */ @@ -394,8 +394,8 @@ extern "C" { size_t len; }; - int vc_get_flags(xid_t xid, struct vc_ctx_flags *) VC_ATTR_NONNULL((2)); - int vc_set_flags(xid_t xid, struct vc_ctx_flags const *) VC_ATTR_NONNULL((2)); + int vc_get_cflags(xid_t xid, struct vc_ctx_flags *) VC_ATTR_NONNULL((2)); + int vc_set_cflags(xid_t xid, struct vc_ctx_flags const *) VC_ATTR_NONNULL((2)); int vc_get_ccaps(xid_t xid, struct vc_ctx_caps *); int vc_set_ccaps(xid_t xid, struct vc_ctx_caps const *); @@ -412,16 +412,16 @@ extern "C" { struct vc_err_listparser *err, struct vc_ctx_caps *); - int vc_list2flag(char const *, size_t len, + int vc_list2cflag(char const *, size_t len, struct vc_err_listparser *err, struct vc_ctx_flags *flags); - uint_least64_t vc_text2flag(char const *, size_t len); - char const * vc_loflag2text(uint_least64_t *); + uint_least64_t vc_text2cflag(char const *, size_t len); + char const * vc_locflag2text(uint_least64_t *); - uint_least32_t vc_list2flag_compat(char const *, size_t len, + uint_least32_t vc_list2cflag_compat(char const *, size_t len, struct vc_err_listparser *err); - uint_least32_t vc_text2flag_compat(char const *, size_t len); - char const * vc_hiflag2text_compat(uint_least32_t); + uint_least32_t vc_text2cflag_compat(char const *, size_t len); + char const * vc_hicflag2text_compat(uint_least32_t); uint_least32_t vc_get_insecurecaps() VC_ATTR_CONST; int vc_text2cap(char const *);