diff -NurpP --minimal linux-2.6.11.7-vs1.9.5.x2/include/linux/vserver/inode.h linux-2.6.11.7-vs1.9.5.x3/include/linux/vserver/inode.h --- linux-2.6.11.7-vs1.9.5.x2/include/linux/vserver/inode.h 2005-04-11 19:21:06 +0200 +++ linux-2.6.11.7-vs1.9.5.x3/include/linux/vserver/inode.h 2005-04-13 06:10:22 +0200 @@ -1,35 +1,6 @@ #ifndef _VX_INODE_H #define _VX_INODE_H -#ifndef CONFIG_VSERVER -#warning config options missing -#endif - -#include "switch.h" - -/* inode vserver commands */ - -#define VCMD_get_iattr_v0 VC_CMD(INODE, 1, 0) -#define VCMD_set_iattr_v0 VC_CMD(INODE, 2, 0) - -#define VCMD_get_iattr VC_CMD(INODE, 1, 1) -#define VCMD_set_iattr VC_CMD(INODE, 2, 1) - -struct vcmd_ctx_iattr_v0 { - /* device handle in id */ - uint64_t ino; - uint32_t xid; - uint32_t flags; - uint32_t mask; -}; - -struct vcmd_ctx_iattr_v1 { - const char __user *name; - uint32_t xid; - uint32_t flags; - uint32_t mask; -}; - #define IATTR_XID 0x01000000 @@ -42,6 +13,11 @@ struct vcmd_ctx_iattr_v1 { #define IATTR_IUNLINK 0x00020000 #define IATTR_IMMUTABLE 0x00040000 +#ifdef __KERNEL__ + +#ifndef CONFIG_VSERVER +#warning config options missing +#endif #ifdef CONFIG_VSERVER_PROC_SECURE #define IATTR_PROC_DEFAULT ( IATTR_ADMIN | IATTR_HIDE ) @@ -51,16 +27,8 @@ struct vcmd_ctx_iattr_v1 { #define IATTR_PROC_SYMLINK ( IATTR_ADMIN ) #endif -#ifdef __KERNEL__ - #define vx_hide_check(c,m) (((m) & IATTR_HIDE) ? vx_check(c,m) : 1) -extern int vc_get_iattr_v0(uint32_t, void __user *); -extern int vc_set_iattr_v0(uint32_t, void __user *); - -extern int vc_get_iattr(uint32_t, void __user *); -extern int vc_set_iattr(uint32_t, void __user *); - #endif /* __KERNEL__ */ /* inode ioctls */ diff -NurpP --minimal linux-2.6.11.7-vs1.9.5.x2/include/linux/vserver/inode_cmd.h linux-2.6.11.7-vs1.9.5.x3/include/linux/vserver/inode_cmd.h --- linux-2.6.11.7-vs1.9.5.x2/include/linux/vserver/inode_cmd.h 1970-01-01 01:00:00 +0100 +++ linux-2.6.11.7-vs1.9.5.x3/include/linux/vserver/inode_cmd.h 2005-04-13 06:10:08 +0200 @@ -0,0 +1,39 @@ +#ifndef _VX_INODE_CMD_H +#define _VX_INODE_CMD_H + +/* inode vserver commands */ + +#define VCMD_get_iattr_v0 VC_CMD(INODE, 1, 0) +#define VCMD_set_iattr_v0 VC_CMD(INODE, 2, 0) + +#define VCMD_get_iattr VC_CMD(INODE, 1, 1) +#define VCMD_set_iattr VC_CMD(INODE, 2, 1) + +struct vcmd_ctx_iattr_v0 { + /* device handle in id */ + uint64_t ino; + uint32_t xid; + uint32_t flags; + uint32_t mask; +}; + +struct vcmd_ctx_iattr_v1 { + const char __user *name; + uint32_t xid; + uint32_t flags; + uint32_t mask; +}; + + +#ifdef __KERNEL__ + +#include + +extern int vc_get_iattr_v0(uint32_t, void __user *); +extern int vc_set_iattr_v0(uint32_t, void __user *); + +extern int vc_get_iattr(uint32_t, void __user *); +extern int vc_set_iattr(uint32_t, void __user *); + +#endif /* __KERNEL__ */ +#endif /* _VX_INODE_CMD_H */ diff -NurpP --minimal linux-2.6.11.7-vs1.9.5.x2/kernel/vserver/inode.c linux-2.6.11.7-vs1.9.5.x3/kernel/vserver/inode.c --- linux-2.6.11.7-vs1.9.5.x2/kernel/vserver/inode.c 2005-04-11 19:19:41 +0200 +++ linux-2.6.11.7-vs1.9.5.x3/kernel/vserver/inode.c 2005-04-13 06:08:57 +0200 @@ -18,6 +18,7 @@ #include #include #include +#include #include #include diff -NurpP --minimal linux-2.6.11.7-vs1.9.5.x2/kernel/vserver/switch.c linux-2.6.11.7-vs1.9.5.x3/kernel/vserver/switch.c --- linux-2.6.11.7-vs1.9.5.x2/kernel/vserver/switch.c 2005-04-11 19:19:41 +0200 +++ linux-2.6.11.7-vs1.9.5.x3/kernel/vserver/switch.c 2005-04-13 06:08:18 +0200 @@ -35,6 +35,7 @@ vc_get_version(uint32_t id) #include #include #include +#include #include #include