X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Flib%2Fvserver-internal.h;h=9bf730e17da7af56fcf2a9da681216cd81f58ffb;hb=fc967d324f666e9891677b7c70ae07c9ab24fe68;hp=2a87818d6202afc4756cb303d5130083ce5999ae;hpb=c8df71f4e1c4e30f4ede6419a0c57d9f1a338a7c;p=util-vserver.git diff --git a/util-vserver/lib/vserver-internal.h b/util-vserver/lib/vserver-internal.h index 2a87818..9bf730e 100644 --- a/util-vserver/lib/vserver-internal.h +++ b/util-vserver/lib/vserver-internal.h @@ -91,11 +91,20 @@ #endif #ifdef VC_ENABLE_API_OLDPROC -# define CALL_VC_OLDPROC(F,...) CALL_VC_GENERAL(0x00000000, X, F, __VA_ARGS__) +# define CALL_VC_OLDPROC(F,...) CALL_VC_GENERAL(0x00000000, oldproc, F, __VA_ARGS__) #else # define CALL_VC_OLDPROC(F,...) CALL_VC_NOOP #endif +#ifdef VC_ENABLE_API_OLDUTS +# define CALL_VC_OLDUTS(F,...) CALL_VC_GENERAL(0x00000000, olduts, F, __VA_ARGS__) +#else +# define CALL_VC_OLDUTS(F,...) CALL_VC_NOOP +#endif + + + // Some kernel <-> userspace wrappers; they should be noops in most cases + #if 1 # define CTX_KERNEL2USER(X) (((X)==(uint32_t)(-1)) ? VC_NOCTX : \ ((X)==(uint32_t)(-2)) ? VC_SAMECTX : \ @@ -121,6 +130,28 @@ # define EXT2FLAGS_USER2KERNEL(X) (X) #endif +#if 1 +# define VHI_USER2KERNEL(X) ((((X)==vcVHI_CONTEXT) ? VHIN_CONTEXT : \ + ((X)==vcVHI_SYSNAME) ? VHIN_SYSNAME : \ + ((X)==vcVHI_NODENAME) ? VHIN_NODENAME : \ + ((X)==vcVHI_RELEASE) ? VHIN_RELEASE : \ + ((X)==vcVHI_VERSION) ? VHIN_VERSION : \ + ((X)==vcVHI_MACHINE) ? VHIN_MACHINE : \ + ((X)==vcVHI_DOMAINNAME) ? VHIN_DOMAINNAME : \ + (X))) +# define VHI_KERNEL2USER(X) ((((X)==VHIN_CONTEXT) ? vcVHI_CONTEXT : \ + ((X)==VHIN_SYSNAME) ? vcVHI_SYSNAME : \ + ((X)==VHIN_NODENAME) ? vcVHI_NODENAME : \ + ((X)==VHIN_RELEASE) ? vcVHI_RELEASE : \ + ((X)==VHIN_VERSION) ? vcVHI_VERSION : \ + ((X)==VHIN_MACHINE) ? vcVHI_MACHINE : \ + ((X)==VHIN_DOMAINNAME) ? vcVHI_DOMAINNAME : \ + (X))) +#else +# define VHI_USER2KERNEL(X) (X) +# define VHI_KERNEL2USER(X) (X) +#endif + #define EXT2_IOC_GETCONTEXT _IOR('x', 1, long) #define EXT2_IOC_SETCONTEXT _IOW('x', 2, long)