X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Fkernel%2Finode.h;h=89212c22343c9261e9ac02f4b981d19619707fad;hb=5b39edfee423f5f3cbe8fa223dcfdc9e8d66e286;hp=0cf360cab30c765d1b87158efd0ada6b6cb34a6f;hpb=9406c0030f10f1498a2fa1c4e6fca7382eba3692;p=util-vserver.git diff --git a/util-vserver/kernel/inode.h b/util-vserver/kernel/inode.h index 0cf360c..89212c2 100644 --- a/util-vserver/kernel/inode.h +++ b/util-vserver/kernel/inode.h @@ -1,31 +1,6 @@ #ifndef _VX_INODE_H #define _VX_INODE_H -#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 @@ -35,33 +10,32 @@ struct vcmd_ctx_iattr_v1 { #define IATTR_FLAGS 0x00000007 #define IATTR_BARRIER 0x00010000 -#define IATTR_IUNLINK 0x00020000 -#define IATTR_IMMUTABLE 0x00040000 - - -#ifdef CONFIG_PROC_SECURE -#define IATTR_PROC_DEFAULT ( IATTR_ADMIN | IATTR_HIDE ) -#define IATTR_PROC_SYMLINK ( IATTR_ADMIN ) -#else -#define IATTR_PROC_DEFAULT ( IATTR_ADMIN ) -#define IATTR_PROC_SYMLINK ( IATTR_ADMIN ) -#endif +#define IATTR_IUNLINK 0x00020000 +#define IATTR_IMMUTABLE 0x00040000 #ifdef __KERNEL__ -#define vx_hide_check(c,m) (((m) & IATTR_HIDE) ? vx_check(c,m) : 1) +#ifndef CONFIG_VSERVER +#warning config options missing +#endif -extern int vc_get_iattr_v0(uint32_t, void __user *); -extern int vc_set_iattr_v0(uint32_t, void __user *); +#ifdef CONFIG_VSERVER_PROC_SECURE +#define IATTR_PROC_DEFAULT ( IATTR_ADMIN | IATTR_HIDE ) +#define IATTR_PROC_SYMLINK ( IATTR_ADMIN ) +#else +#define IATTR_PROC_DEFAULT ( IATTR_ADMIN ) +#define IATTR_PROC_SYMLINK ( IATTR_ADMIN ) +#endif -extern int vc_get_iattr(uint32_t, void __user *); -extern int vc_set_iattr(uint32_t, void __user *); +#define vx_hide_check(c,m) (((m) & IATTR_HIDE) ? vx_check(c,m) : 1) #endif /* __KERNEL__ */ /* inode ioctls */ -#define FIOC_GETXFLG _IOR('x', 5, long) -#define FIOC_SETXFLG _IOW('x', 6, long) +#define FIOC_GETXFLG _IOR('x', 5, long) +#define FIOC_SETXFLG _IOW('x', 6, long) -#endif /* _VX_LEGACY_H */ +#else /* _VX_INODE_H */ +#warning duplicate inclusion +#endif /* _VX_INODE_H */