diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-03-29 18:26:16 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-03-29 18:26:16 -0600 |
commit | a30e879a82b06df850698e6bd30068dc0893a845 (patch) | |
tree | 3ecce9bac17d3a4b89b11f1df281c0587d4443d4 /lib9p/include | |
parent | 6ab74d74ee6dc1663b66d0a9a0471f63ade5659a (diff) | |
parent | 9096e2d9cb6f438e49aa29aa2cfaef1717466a05 (diff) |
Merge branch 'lukeshu/9p-idl-improvements'
Diffstat (limited to 'lib9p/include')
-rw-r--r-- | lib9p/include/lib9p/9p.generated.h | 605 |
1 files changed, 304 insertions, 301 deletions
diff --git a/lib9p/include/lib9p/9p.generated.h b/lib9p/include/lib9p/9p.generated.h index 7a50537..203549f 100644 --- a/lib9p/include/lib9p/9p.generated.h +++ b/lib9p/include/lib9p/9p.generated.h @@ -159,11 +159,11 @@ enum lib9p_msg_type { /* uint8_t */ #if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u /* size = 2 ; max_iov = 1 ; max_copy = 2 */ typedef uint16_t lib9p_tag_t; -#define LIB9P_TAG_NOTAG ((lib9p_tag_t)UINT16_C(~0)) +#define LIB9P_TAG_NOTAG ((lib9p_tag_t)(UINT16_MAX)) /* size = 4 ; max_iov = 1 ; max_copy = 4 */ typedef uint32_t lib9p_fid_t; -#define LIB9P_FID_NOFID ((lib9p_fid_t)UINT32_C(~0)) +#define LIB9P_FID_NOFID ((lib9p_fid_t)(UINT32_MAX)) /* min_size = 2 ; exp_size = 29 ; max_size = 65,537 ; max_iov = 2 ; max_copy = 2 */ struct lib9p_s { @@ -175,364 +175,367 @@ struct lib9p_s { #if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u /* size = 4 ; max_iov = 1 ; max_copy = 4 */ typedef uint32_t lib9p_dm_t; - -#define LIB9P_DM_DIR ((lib9p_dm_t)(1<<31)) -#define LIB9P_DM_APPEND ((lib9p_dm_t)(1<<30)) -#define LIB9P_DM_EXCL ((lib9p_dm_t)(1<<29)) -#define _LIB9P_DM_RESERVED_PLAN9_MOUNT ((lib9p_dm_t)(1<<28)) -#define LIB9P_DM_AUTH ((lib9p_dm_t)(1<<27)) -#define LIB9P_DM_TMP ((lib9p_dm_t)(1<<26)) -/* unused ((lib9p_dm_t)(1<<25)) */ -/* unused ((lib9p_dm_t)(1<<24)) */ +/* bits */ +#define LIB9P_DM_DIR ((lib9p_dm_t)(UINT32_C(1)<<31)) +#define LIB9P_DM_APPEND ((lib9p_dm_t)(UINT32_C(1)<<30)) +#define LIB9P_DM_EXCL ((lib9p_dm_t)(UINT32_C(1)<<29)) +#define _LIB9P_DM_PLAN9_MOUNT ((lib9p_dm_t)(UINT32_C(1)<<28)) +#define LIB9P_DM_AUTH ((lib9p_dm_t)(UINT32_C(1)<<27)) +#define LIB9P_DM_TMP ((lib9p_dm_t)(UINT32_C(1)<<26)) +#define _LIB9P_DM_UNUSED_25 ((lib9p_dm_t)(UINT32_C(1)<<25)) +#define _LIB9P_DM_UNUSED_24 ((lib9p_dm_t)(UINT32_C(1)<<24)) #if CONFIG_9P_ENABLE_9P2000_u -# define LIB9P_DM_DEVICE ((lib9p_dm_t)(1<<23)) +# define LIB9P_DM_DEVICE ((lib9p_dm_t)(UINT32_C(1)<<23)) #endif /* CONFIG_9P_ENABLE_9P2000_u */ -/* unused ((lib9p_dm_t)(1<<22)) */ +#define _LIB9P_DM_UNUSED_22 ((lib9p_dm_t)(UINT32_C(1)<<22)) #if CONFIG_9P_ENABLE_9P2000_u -# define LIB9P_DM_NAMEDPIPE ((lib9p_dm_t)(1<<21)) -# define LIB9P_DM_SOCKET ((lib9p_dm_t)(1<<20)) -# define LIB9P_DM_SETUID ((lib9p_dm_t)(1<<19)) -# define LIB9P_DM_SETGID ((lib9p_dm_t)(1<<18)) +# define LIB9P_DM_PIPE ((lib9p_dm_t)(UINT32_C(1)<<21)) +# define LIB9P_DM_SOCKET ((lib9p_dm_t)(UINT32_C(1)<<20)) +# define LIB9P_DM_SETUID ((lib9p_dm_t)(UINT32_C(1)<<19)) +# define LIB9P_DM_SETGID ((lib9p_dm_t)(UINT32_C(1)<<18)) #endif /* CONFIG_9P_ENABLE_9P2000_u */ -/* unused ((lib9p_dm_t)(1<<17)) */ -/* unused ((lib9p_dm_t)(1<<16)) */ -/* unused ((lib9p_dm_t)(1<<15)) */ -/* unused ((lib9p_dm_t)(1<<14)) */ -/* unused ((lib9p_dm_t)(1<<13)) */ -/* unused ((lib9p_dm_t)(1<<12)) */ -/* unused ((lib9p_dm_t)(1<<11)) */ -/* unused ((lib9p_dm_t)(1<<10)) */ -/* unused ((lib9p_dm_t)(1<<9)) */ -#define LIB9P_DM_OWNER_R ((lib9p_dm_t)(1<<8)) -#define LIB9P_DM_OWNER_W ((lib9p_dm_t)(1<<7)) -#define LIB9P_DM_OWNER_X ((lib9p_dm_t)(1<<6)) -#define LIB9P_DM_GROUP_R ((lib9p_dm_t)(1<<5)) -#define LIB9P_DM_GROUP_W ((lib9p_dm_t)(1<<4)) -#define LIB9P_DM_GROUP_X ((lib9p_dm_t)(1<<3)) -#define LIB9P_DM_OTHER_R ((lib9p_dm_t)(1<<2)) -#define LIB9P_DM_OTHER_W ((lib9p_dm_t)(1<<1)) -#define LIB9P_DM_OTHER_X ((lib9p_dm_t)(1<<0)) - -#define LIB9P_DM_PERM_MASK ((lib9p_dm_t)(0777)) +#define _LIB9P_DM_UNUSED_17 ((lib9p_dm_t)(UINT32_C(1)<<17)) +#define _LIB9P_DM_UNUSED_16 ((lib9p_dm_t)(UINT32_C(1)<<16)) +#define _LIB9P_DM_UNUSED_15 ((lib9p_dm_t)(UINT32_C(1)<<15)) +#define _LIB9P_DM_UNUSED_14 ((lib9p_dm_t)(UINT32_C(1)<<14)) +#define _LIB9P_DM_UNUSED_13 ((lib9p_dm_t)(UINT32_C(1)<<13)) +#define _LIB9P_DM_UNUSED_12 ((lib9p_dm_t)(UINT32_C(1)<<12)) +#define _LIB9P_DM_UNUSED_11 ((lib9p_dm_t)(UINT32_C(1)<<11)) +#define _LIB9P_DM_UNUSED_10 ((lib9p_dm_t)(UINT32_C(1)<<10)) +#define _LIB9P_DM_UNUSED_9 ((lib9p_dm_t)(UINT32_C(1)<<9)) +#define LIB9P_DM_OWNER_R ((lib9p_dm_t)(UINT32_C(1)<<8)) +#define LIB9P_DM_OWNER_W ((lib9p_dm_t)(UINT32_C(1)<<7)) +#define LIB9P_DM_OWNER_X ((lib9p_dm_t)(UINT32_C(1)<<6)) +#define LIB9P_DM_GROUP_R ((lib9p_dm_t)(UINT32_C(1)<<5)) +#define LIB9P_DM_GROUP_W ((lib9p_dm_t)(UINT32_C(1)<<4)) +#define LIB9P_DM_GROUP_X ((lib9p_dm_t)(UINT32_C(1)<<3)) +#define LIB9P_DM_OTHER_R ((lib9p_dm_t)(UINT32_C(1)<<2)) +#define LIB9P_DM_OTHER_W ((lib9p_dm_t)(UINT32_C(1)<<1)) +#define LIB9P_DM_OTHER_X ((lib9p_dm_t)(UINT32_C(1)<<0)) +/* masks */ +#define LIB9P_DM_PERM_MASK ((lib9p_dm_t)(0b000000000000000000000111111111)) #endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u */ #if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u /* size = 1 ; max_iov = 1 ; max_copy = 1 */ typedef uint8_t lib9p_qt_t; - -#define LIB9P_QT_DIR ((lib9p_qt_t)(1<<7)) -#define LIB9P_QT_APPEND ((lib9p_qt_t)(1<<6)) -#define LIB9P_QT_EXCL ((lib9p_qt_t)(1<<5)) -#define _LIB9P_QT_RESERVED_PLAN9_MOUNT ((lib9p_qt_t)(1<<4)) -#define LIB9P_QT_AUTH ((lib9p_qt_t)(1<<3)) -#define LIB9P_QT_TMP ((lib9p_qt_t)(1<<2)) +/* bits */ +#define LIB9P_QT_DIR ((lib9p_qt_t)(UINT8_C(1)<<7)) +#define LIB9P_QT_APPEND ((lib9p_qt_t)(UINT8_C(1)<<6)) +#define LIB9P_QT_EXCL ((lib9p_qt_t)(UINT8_C(1)<<5)) +#define _LIB9P_QT_PLAN9_MOUNT ((lib9p_qt_t)(UINT8_C(1)<<4)) +#define LIB9P_QT_AUTH ((lib9p_qt_t)(UINT8_C(1)<<3)) +#define LIB9P_QT_TMP ((lib9p_qt_t)(UINT8_C(1)<<2)) #if CONFIG_9P_ENABLE_9P2000_u -# define LIB9P_QT_SYMLINK ((lib9p_qt_t)(1<<1)) +# define LIB9P_QT_SYMLINK ((lib9p_qt_t)(UINT8_C(1)<<1)) #endif /* CONFIG_9P_ENABLE_9P2000_u */ -/* unused ((lib9p_qt_t)(1<<0)) */ - -#define LIB9P_QT_FILE ((lib9p_qt_t)(0)) +#define _LIB9P_QT_UNUSED_0 ((lib9p_qt_t)(UINT8_C(1)<<0)) +/* aliases */ +#define LIB9P_QT_FILE ((lib9p_qt_t)(0)) #endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u */ #if CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_u /* size = 4 ; max_iov = 1 ; max_copy = 4 */ typedef uint32_t lib9p_nuid_t; -#define LIB9P_NUID_NONUID ((lib9p_nuid_t)UINT32_C(~0)) +#define LIB9P_NUID_NONUID ((lib9p_nuid_t)(UINT32_MAX)) #endif /* CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_u */ #if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u /* size = 1 ; max_iov = 1 ; max_copy = 1 */ typedef uint8_t lib9p_o_t; - -/* unused ((lib9p_o_t)(1<<7)) */ -#define LIB9P_O_RCLOSE ((lib9p_o_t)(1<<6)) -#define _LIB9P_O_RESERVED_CEXEC ((lib9p_o_t)(1<<5)) -#define LIB9P_O_TRUNC ((lib9p_o_t)(1<<4)) -/* unused ((lib9p_o_t)(1<<3)) */ -/* unused ((lib9p_o_t)(1<<2)) */ -#define _LIB9P_O_mode_1 ((lib9p_o_t)(1<<1)) -#define _LIB9P_O_mode_0 ((lib9p_o_t)(1<<0)) - -#define LIB9P_O_READ ((lib9p_o_t)(0)) -#define LIB9P_O_WRITE ((lib9p_o_t)(1)) -#define LIB9P_O_RDWR ((lib9p_o_t)(2)) -#define LIB9P_O_EXEC ((lib9p_o_t)(3)) -#define LIB9P_O_MODE_MASK ((lib9p_o_t)(0b00000011)) +/* bits */ +#define _LIB9P_O_UNUSED_7 ((lib9p_o_t)(UINT8_C(1)<<7)) +#define LIB9P_O_RCLOSE ((lib9p_o_t)(UINT8_C(1)<<6)) +#define _LIB9P_O_RESERVED_CEXEC ((lib9p_o_t)(UINT8_C(1)<<5)) +#define LIB9P_O_TRUNC ((lib9p_o_t)(UINT8_C(1)<<4)) +#define _LIB9P_O_UNUSED_3 ((lib9p_o_t)(UINT8_C(1)<<3)) +#define _LIB9P_O_UNUSED_2 ((lib9p_o_t)(UINT8_C(1)<<2)) +/* number LIB9P_O_MODE_* ((lib9p_o_t)(UINT8_C(1)<<1)) */ +/* number LIB9P_O_MODE_* ((lib9p_o_t)(UINT8_C(1)<<0)) */ +/* masks */ #define LIB9P_O_FLAG_MASK ((lib9p_o_t)(0b11111100)) +/* number: MODE */ +#define LIB9P_O_MODE_READ ((lib9p_o_t)(0)) +#define LIB9P_O_MODE_WRITE ((lib9p_o_t)(1)) +#define LIB9P_O_MODE_RDWR ((lib9p_o_t)(2)) +#define LIB9P_O_MODE_EXEC ((lib9p_o_t)(3)) +#define LIB9P_O_MODE_MASK ((lib9p_o_t)(0b000011)) #endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u */ #if CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_u /* size = 4 ; max_iov = 1 ; max_copy = 4 */ typedef uint32_t lib9p_errno_t; -#define LIB9P_ERRNO_NOERROR ((lib9p_errno_t)UINT32_C(0)) +#define LIB9P_ERRNO_NOERROR ((lib9p_errno_t)(0)) #endif /* CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_u */ #if CONFIG_9P_ENABLE_9P2000_L /* size = 4 ; max_iov = 1 ; max_copy = 4 */ typedef uint32_t lib9p_super_magic_t; -#define LIB9P_SUPER_MAGIC_V9FS_MAGIC ((lib9p_super_magic_t)UINT32_C(0x01021997)) +#define LIB9P_SUPER_MAGIC_V9FS_MAGIC ((lib9p_super_magic_t)(16914839)) /* size = 4 ; max_iov = 1 ; max_copy = 4 */ typedef uint32_t lib9p_lo_t; - -/* unused ((lib9p_lo_t)(1<<31)) */ -/* unused ((lib9p_lo_t)(1<<30)) */ -/* unused ((lib9p_lo_t)(1<<29)) */ -/* unused ((lib9p_lo_t)(1<<28)) */ -/* unused ((lib9p_lo_t)(1<<27)) */ -/* unused ((lib9p_lo_t)(1<<26)) */ -/* unused ((lib9p_lo_t)(1<<25)) */ -/* unused ((lib9p_lo_t)(1<<24)) */ -/* unused ((lib9p_lo_t)(1<<23)) */ -/* unused ((lib9p_lo_t)(1<<22)) */ -/* unused ((lib9p_lo_t)(1<<21)) */ -#define LIB9P_LO_SYNC ((lib9p_lo_t)(1<<20)) -#define LIB9P_LO_CLOEXEC ((lib9p_lo_t)(1<<19)) -#define LIB9P_LO_NOATIME ((lib9p_lo_t)(1<<18)) -#define LIB9P_LO_NOFOLLOW ((lib9p_lo_t)(1<<17)) -#define LIB9P_LO_DIRECTORY ((lib9p_lo_t)(1<<16)) -#define LIB9P_LO_LARGEFILE ((lib9p_lo_t)(1<<15)) -#define LIB9P_LO_DIRECT ((lib9p_lo_t)(1<<14)) -#define LIB9P_LO_BSD_FASYNC ((lib9p_lo_t)(1<<13)) -#define LIB9P_LO_DSYNC ((lib9p_lo_t)(1<<12)) -#define LIB9P_LO_NONBLOCK ((lib9p_lo_t)(1<<11)) -#define LIB9P_LO_APPEND ((lib9p_lo_t)(1<<10)) -#define LIB9P_LO_TRUNC ((lib9p_lo_t)(1<<9)) -#define LIB9P_LO_NOCTTY ((lib9p_lo_t)(1<<8)) -#define LIB9P_LO_EXCL ((lib9p_lo_t)(1<<7)) -#define LIB9P_LO_CREATE ((lib9p_lo_t)(1<<6)) -/* unused ((lib9p_lo_t)(1<<5)) */ -/* unused ((lib9p_lo_t)(1<<4)) */ -/* unused ((lib9p_lo_t)(1<<3)) */ -/* unused ((lib9p_lo_t)(1<<2)) */ -#define _LIB9P_LO_mode_1 ((lib9p_lo_t)(1<<1)) -#define _LIB9P_LO_mode_0 ((lib9p_lo_t)(1<<0)) - -#define LIB9P_LO_RDONLY ((lib9p_lo_t)(0)) -#define LIB9P_LO_WRONLY ((lib9p_lo_t)(1)) -#define LIB9P_LO_RDWR ((lib9p_lo_t)(2)) -#define LIB9P_LO_NOACCESS ((lib9p_lo_t)(3)) -#define LIB9P_LO_MODE_MASK ((lib9p_lo_t)(0b000000000000000000011)) -#define LIB9P_LO_FLAG_MASK ((lib9p_lo_t)(0b111111111111111000000)) +/* bits */ +#define _LIB9P_LO_UNUSED_31 ((lib9p_lo_t)(UINT32_C(1)<<31)) +#define _LIB9P_LO_UNUSED_30 ((lib9p_lo_t)(UINT32_C(1)<<30)) +#define _LIB9P_LO_UNUSED_29 ((lib9p_lo_t)(UINT32_C(1)<<29)) +#define _LIB9P_LO_UNUSED_28 ((lib9p_lo_t)(UINT32_C(1)<<28)) +#define _LIB9P_LO_UNUSED_27 ((lib9p_lo_t)(UINT32_C(1)<<27)) +#define _LIB9P_LO_UNUSED_26 ((lib9p_lo_t)(UINT32_C(1)<<26)) +#define _LIB9P_LO_UNUSED_25 ((lib9p_lo_t)(UINT32_C(1)<<25)) +#define _LIB9P_LO_UNUSED_24 ((lib9p_lo_t)(UINT32_C(1)<<24)) +#define _LIB9P_LO_UNUSED_23 ((lib9p_lo_t)(UINT32_C(1)<<23)) +#define _LIB9P_LO_UNUSED_22 ((lib9p_lo_t)(UINT32_C(1)<<22)) +#define _LIB9P_LO_UNUSED_21 ((lib9p_lo_t)(UINT32_C(1)<<21)) +#define LIB9P_LO_SYNC ((lib9p_lo_t)(UINT32_C(1)<<20)) +#define LIB9P_LO_CLOEXEC ((lib9p_lo_t)(UINT32_C(1)<<19)) +#define LIB9P_LO_NOATIME ((lib9p_lo_t)(UINT32_C(1)<<18)) +#define LIB9P_LO_NOFOLLOW ((lib9p_lo_t)(UINT32_C(1)<<17)) +#define LIB9P_LO_DIRECTORY ((lib9p_lo_t)(UINT32_C(1)<<16)) +#define LIB9P_LO_LARGEFILE ((lib9p_lo_t)(UINT32_C(1)<<15)) +#define LIB9P_LO_DIRECT ((lib9p_lo_t)(UINT32_C(1)<<14)) +#define LIB9P_LO_BSD_FASYNC ((lib9p_lo_t)(UINT32_C(1)<<13)) +#define LIB9P_LO_DSYNC ((lib9p_lo_t)(UINT32_C(1)<<12)) +#define LIB9P_LO_NONBLOCK ((lib9p_lo_t)(UINT32_C(1)<<11)) +#define LIB9P_LO_APPEND ((lib9p_lo_t)(UINT32_C(1)<<10)) +#define LIB9P_LO_TRUNC ((lib9p_lo_t)(UINT32_C(1)<<9)) +#define LIB9P_LO_NOCTTY ((lib9p_lo_t)(UINT32_C(1)<<8)) +#define LIB9P_LO_EXCL ((lib9p_lo_t)(UINT32_C(1)<<7)) +#define LIB9P_LO_CREATE ((lib9p_lo_t)(UINT32_C(1)<<6)) +#define _LIB9P_LO_UNUSED_5 ((lib9p_lo_t)(UINT32_C(1)<<5)) +#define _LIB9P_LO_UNUSED_4 ((lib9p_lo_t)(UINT32_C(1)<<4)) +#define _LIB9P_LO_UNUSED_3 ((lib9p_lo_t)(UINT32_C(1)<<3)) +#define _LIB9P_LO_UNUSED_2 ((lib9p_lo_t)(UINT32_C(1)<<2)) +/* number LIB9P_LO_MODE_* ((lib9p_lo_t)(UINT32_C(1)<<1)) */ +/* number LIB9P_LO_MODE_* ((lib9p_lo_t)(UINT32_C(1)<<0)) */ +/* masks */ +#define LIB9P_LO_FLAG_MASK ((lib9p_lo_t)(0b000000000111111111111111000000)) +/* number: MODE */ +#define LIB9P_LO_MODE_RDONLY ((lib9p_lo_t)(0)) +#define LIB9P_LO_MODE_WRONLY ((lib9p_lo_t)(1)) +#define LIB9P_LO_MODE_RDWR ((lib9p_lo_t)(2)) +#define LIB9P_LO_MODE_NOACCESS ((lib9p_lo_t)(3)) +#define LIB9P_LO_MODE_MASK ((lib9p_lo_t)(0b000000000000000000000000000011)) /* size = 1 ; max_iov = 1 ; max_copy = 1 */ typedef uint8_t lib9p_dt_t; -#define LIB9P_DT_UNKNOWN ((lib9p_dt_t)UINT8_C(0)) -#define LIB9P_DT_NAMED_PIPE ((lib9p_dt_t)UINT8_C(1)) -#define LIB9P_DT_CHAR_DEV ((lib9p_dt_t)UINT8_C(2)) -#define LIB9P_DT_DIRECTORY ((lib9p_dt_t)UINT8_C(4)) -#define LIB9P_DT_BLOCK_DEV ((lib9p_dt_t)UINT8_C(6)) -#define LIB9P_DT_REGULAR ((lib9p_dt_t)UINT8_C(8)) -#define LIB9P_DT_SYMLINK ((lib9p_dt_t)UINT8_C(10)) -#define LIB9P_DT_SOCKET ((lib9p_dt_t)UINT8_C(12)) -#define LIB9P_DT_WHITEOUT ((lib9p_dt_t)UINT8_C(14)) +#define LIB9P_DT_UNKNOWN ((lib9p_dt_t)(0)) +#define LIB9P_DT_PIPE ((lib9p_dt_t)(1)) +#define LIB9P_DT_CHAR_DEV ((lib9p_dt_t)(2)) +#define LIB9P_DT_DIRECTORY ((lib9p_dt_t)(4)) +#define LIB9P_DT_BLOCK_DEV ((lib9p_dt_t)(6)) +#define LIB9P_DT_REGULAR ((lib9p_dt_t)(8)) +#define LIB9P_DT_SYMLINK ((lib9p_dt_t)(10)) +#define LIB9P_DT_SOCKET ((lib9p_dt_t)(12)) +#define _LIB9P_DT_WHITEOUT ((lib9p_dt_t)(14)) /* size = 4 ; max_iov = 1 ; max_copy = 4 */ typedef uint32_t lib9p_mode_t; - -/* unused ((lib9p_mode_t)(1<<31)) */ -/* unused ((lib9p_mode_t)(1<<30)) */ -/* unused ((lib9p_mode_t)(1<<29)) */ -/* unused ((lib9p_mode_t)(1<<28)) */ -/* unused ((lib9p_mode_t)(1<<27)) */ -/* unused ((lib9p_mode_t)(1<<26)) */ -/* unused ((lib9p_mode_t)(1<<25)) */ -/* unused ((lib9p_mode_t)(1<<24)) */ -/* unused ((lib9p_mode_t)(1<<23)) */ -/* unused ((lib9p_mode_t)(1<<22)) */ -/* unused ((lib9p_mode_t)(1<<21)) */ -/* unused ((lib9p_mode_t)(1<<20)) */ -/* unused ((lib9p_mode_t)(1<<19)) */ -/* unused ((lib9p_mode_t)(1<<18)) */ -/* unused ((lib9p_mode_t)(1<<17)) */ -/* unused ((lib9p_mode_t)(1<<16)) */ -#define _LIB9P_MODE_fmt_3 ((lib9p_mode_t)(1<<15)) -#define _LIB9P_MODE_fmt_2 ((lib9p_mode_t)(1<<14)) -#define _LIB9P_MODE_fmt_1 ((lib9p_mode_t)(1<<13)) -#define _LIB9P_MODE_fmt_0 ((lib9p_mode_t)(1<<12)) -#define LIB9P_MODE_PERM_SETGROUP ((lib9p_mode_t)(1<<11)) -#define LIB9P_MODE_PERM_SETUSER ((lib9p_mode_t)(1<<10)) -#define LIB9P_MODE_PERM_STICKY ((lib9p_mode_t)(1<<9)) -#define LIB9P_MODE_PERM_OWNER_R ((lib9p_mode_t)(1<<8)) -#define LIB9P_MODE_PERM_OWNER_W ((lib9p_mode_t)(1<<7)) -#define LIB9P_MODE_PERM_OWNER_X ((lib9p_mode_t)(1<<6)) -#define LIB9P_MODE_PERM_GROUP_R ((lib9p_mode_t)(1<<5)) -#define LIB9P_MODE_PERM_GROUP_W ((lib9p_mode_t)(1<<4)) -#define LIB9P_MODE_PERM_GROUP_X ((lib9p_mode_t)(1<<3)) -#define LIB9P_MODE_PERM_OTHER_R ((lib9p_mode_t)(1<<2)) -#define LIB9P_MODE_PERM_OTHER_W ((lib9p_mode_t)(1<<1)) -#define LIB9P_MODE_PERM_OTHER_X ((lib9p_mode_t)(1<<0)) - -#define LIB9P_MODE_FMT_NAMED_PIPE ((lib9p_mode_t)(LIB9P_DT_NAMED_PIPE<<12)) -#define LIB9P_MODE_FMT_CHAR_DEV ((lib9p_mode_t)(LIB9P_DT_CHAR_DEV<<12)) -#define LIB9P_MODE_FMT_DIRECTORY ((lib9p_mode_t)(LIB9P_DT_DIRECTORY<<12)) -#define LIB9P_MODE_FMT_BLOCK_DEV ((lib9p_mode_t)(LIB9P_DT_BLOCK_DEV<<12)) -#define LIB9P_MODE_FMT_REGULAR ((lib9p_mode_t)(LIB9P_DT_REGULAR<<12)) -#define LIB9P_MODE_FMT_SYMLINK ((lib9p_mode_t)(LIB9P_DT_SYMLINK<<12)) -#define LIB9P_MODE_FMT_SOCKET ((lib9p_mode_t)(LIB9P_DT_SOCKET<<12)) -#define LIB9P_MODE_PERM_MASK ((lib9p_mode_t)(0000777)) -#define LIB9P_MODE_FMT_MASK ((lib9p_mode_t)(0170000)) +/* bits */ +#define _LIB9P_MODE_UNUSED_31 ((lib9p_mode_t)(UINT32_C(1)<<31)) +#define _LIB9P_MODE_UNUSED_30 ((lib9p_mode_t)(UINT32_C(1)<<30)) +#define _LIB9P_MODE_UNUSED_29 ((lib9p_mode_t)(UINT32_C(1)<<29)) +#define _LIB9P_MODE_UNUSED_28 ((lib9p_mode_t)(UINT32_C(1)<<28)) +#define _LIB9P_MODE_UNUSED_27 ((lib9p_mode_t)(UINT32_C(1)<<27)) +#define _LIB9P_MODE_UNUSED_26 ((lib9p_mode_t)(UINT32_C(1)<<26)) +#define _LIB9P_MODE_UNUSED_25 ((lib9p_mode_t)(UINT32_C(1)<<25)) +#define _LIB9P_MODE_UNUSED_24 ((lib9p_mode_t)(UINT32_C(1)<<24)) +#define _LIB9P_MODE_UNUSED_23 ((lib9p_mode_t)(UINT32_C(1)<<23)) +#define _LIB9P_MODE_UNUSED_22 ((lib9p_mode_t)(UINT32_C(1)<<22)) +#define _LIB9P_MODE_UNUSED_21 ((lib9p_mode_t)(UINT32_C(1)<<21)) +#define _LIB9P_MODE_UNUSED_20 ((lib9p_mode_t)(UINT32_C(1)<<20)) +#define _LIB9P_MODE_UNUSED_19 ((lib9p_mode_t)(UINT32_C(1)<<19)) +#define _LIB9P_MODE_UNUSED_18 ((lib9p_mode_t)(UINT32_C(1)<<18)) +#define _LIB9P_MODE_UNUSED_17 ((lib9p_mode_t)(UINT32_C(1)<<17)) +#define _LIB9P_MODE_UNUSED_16 ((lib9p_mode_t)(UINT32_C(1)<<16)) +/* number LIB9P_MODE_FMT_* ((lib9p_mode_t)(UINT32_C(1)<<15)) */ +/* number LIB9P_MODE_FMT_* ((lib9p_mode_t)(UINT32_C(1)<<14)) */ +/* number LIB9P_MODE_FMT_* ((lib9p_mode_t)(UINT32_C(1)<<13)) */ +/* number LIB9P_MODE_FMT_* ((lib9p_mode_t)(UINT32_C(1)<<12)) */ +#define LIB9P_MODE_PERM_SETGROUP ((lib9p_mode_t)(UINT32_C(1)<<11)) +#define LIB9P_MODE_PERM_SETUSER ((lib9p_mode_t)(UINT32_C(1)<<10)) +#define LIB9P_MODE_PERM_STICKY ((lib9p_mode_t)(UINT32_C(1)<<9)) +#define LIB9P_MODE_PERM_OWNER_R ((lib9p_mode_t)(UINT32_C(1)<<8)) +#define LIB9P_MODE_PERM_OWNER_W ((lib9p_mode_t)(UINT32_C(1)<<7)) +#define LIB9P_MODE_PERM_OWNER_X ((lib9p_mode_t)(UINT32_C(1)<<6)) +#define LIB9P_MODE_PERM_GROUP_R ((lib9p_mode_t)(UINT32_C(1)<<5)) +#define LIB9P_MODE_PERM_GROUP_W ((lib9p_mode_t)(UINT32_C(1)<<4)) +#define LIB9P_MODE_PERM_GROUP_X ((lib9p_mode_t)(UINT32_C(1)<<3)) +#define LIB9P_MODE_PERM_OTHER_R ((lib9p_mode_t)(UINT32_C(1)<<2)) +#define LIB9P_MODE_PERM_OTHER_W ((lib9p_mode_t)(UINT32_C(1)<<1)) +#define LIB9P_MODE_PERM_OTHER_X ((lib9p_mode_t)(UINT32_C(1)<<0)) +/* masks */ +#define LIB9P_MODE_PERM_MASK ((lib9p_mode_t)(0b000000000000000000111111111111)) +/* number: FMT */ +#define LIB9P_MODE_FMT_PIPE ((lib9p_mode_t)(LIB9P_DT_PIPE << 12)) +#define LIB9P_MODE_FMT_CHAR_DEV ((lib9p_mode_t)(LIB9P_DT_CHAR_DEV << 12)) +#define LIB9P_MODE_FMT_DIRECTORY ((lib9p_mode_t)(LIB9P_DT_DIRECTORY << 12)) +#define LIB9P_MODE_FMT_BLOCK_DEV ((lib9p_mode_t)(LIB9P_DT_BLOCK_DEV << 12)) +#define LIB9P_MODE_FMT_REGULAR ((lib9p_mode_t)(LIB9P_DT_REGULAR << 12)) +#define LIB9P_MODE_FMT_SYMLINK ((lib9p_mode_t)(LIB9P_DT_SYMLINK << 12)) +#define LIB9P_MODE_FMT_SOCKET ((lib9p_mode_t)(LIB9P_DT_SOCKET << 12)) +#define LIB9P_MODE_FMT_MASK ((lib9p_mode_t)(0b000000000000001111000000000000)) /* size = 4 ; max_iov = 1 ; max_copy = 4 */ typedef uint32_t lib9p_b4_t; -#define LIB9P_B4_FALSE ((lib9p_b4_t)UINT32_C(0)) -#define LIB9P_B4_TRUE ((lib9p_b4_t)UINT32_C(1)) +#define LIB9P_B4_FALSE ((lib9p_b4_t)(0)) +#define LIB9P_B4_TRUE ((lib9p_b4_t)(1)) /* size = 8 ; max_iov = 1 ; max_copy = 8 */ typedef uint64_t lib9p_getattr_t; - -/* unused ((lib9p_getattr_t)(1<<63)) */ -/* unused ((lib9p_getattr_t)(1<<62)) */ -/* unused ((lib9p_getattr_t)(1<<61)) */ -/* unused ((lib9p_getattr_t)(1<<60)) */ -/* unused ((lib9p_getattr_t)(1<<59)) */ -/* unused ((lib9p_getattr_t)(1<<58)) */ -/* unused ((lib9p_getattr_t)(1<<57)) */ -/* unused ((lib9p_getattr_t)(1<<56)) */ -/* unused ((lib9p_getattr_t)(1<<55)) */ -/* unused ((lib9p_getattr_t)(1<<54)) */ -/* unused ((lib9p_getattr_t)(1<<53)) */ -/* unused ((lib9p_getattr_t)(1<<52)) */ -/* unused ((lib9p_getattr_t)(1<<51)) */ -/* unused ((lib9p_getattr_t)(1<<50)) */ -/* unused ((lib9p_getattr_t)(1<<49)) */ -/* unused ((lib9p_getattr_t)(1<<48)) */ -/* unused ((lib9p_getattr_t)(1<<47)) */ -/* unused ((lib9p_getattr_t)(1<<46)) */ -/* unused ((lib9p_getattr_t)(1<<45)) */ -/* unused ((lib9p_getattr_t)(1<<44)) */ -/* unused ((lib9p_getattr_t)(1<<43)) */ -/* unused ((lib9p_getattr_t)(1<<42)) */ -/* unused ((lib9p_getattr_t)(1<<41)) */ -/* unused ((lib9p_getattr_t)(1<<40)) */ -/* unused ((lib9p_getattr_t)(1<<39)) */ -/* unused ((lib9p_getattr_t)(1<<38)) */ -/* unused ((lib9p_getattr_t)(1<<37)) */ -/* unused ((lib9p_getattr_t)(1<<36)) */ -/* unused ((lib9p_getattr_t)(1<<35)) */ -/* unused ((lib9p_getattr_t)(1<<34)) */ -/* unused ((lib9p_getattr_t)(1<<33)) */ -/* unused ((lib9p_getattr_t)(1<<32)) */ -/* unused ((lib9p_getattr_t)(1<<31)) */ -/* unused ((lib9p_getattr_t)(1<<30)) */ -/* unused ((lib9p_getattr_t)(1<<29)) */ -/* unused ((lib9p_getattr_t)(1<<28)) */ -/* unused ((lib9p_getattr_t)(1<<27)) */ -/* unused ((lib9p_getattr_t)(1<<26)) */ -/* unused ((lib9p_getattr_t)(1<<25)) */ -/* unused ((lib9p_getattr_t)(1<<24)) */ -/* unused ((lib9p_getattr_t)(1<<23)) */ -/* unused ((lib9p_getattr_t)(1<<22)) */ -/* unused ((lib9p_getattr_t)(1<<21)) */ -/* unused ((lib9p_getattr_t)(1<<20)) */ -/* unused ((lib9p_getattr_t)(1<<19)) */ -/* unused ((lib9p_getattr_t)(1<<18)) */ -/* unused ((lib9p_getattr_t)(1<<17)) */ -/* unused ((lib9p_getattr_t)(1<<16)) */ -/* unused ((lib9p_getattr_t)(1<<15)) */ -/* unused ((lib9p_getattr_t)(1<<14)) */ -#define LIB9P_GETATTR_DATA_VERSION ((lib9p_getattr_t)(1<<13)) -#define LIB9P_GETATTR_GEN ((lib9p_getattr_t)(1<<12)) -#define LIB9P_GETATTR_BTIME ((lib9p_getattr_t)(1<<11)) -#define LIB9P_GETATTR_BLOCKS ((lib9p_getattr_t)(1<<10)) -#define LIB9P_GETATTR_SIZE ((lib9p_getattr_t)(1<<9)) -#define LIB9P_GETATTR_INO ((lib9p_getattr_t)(1<<8)) -#define LIB9P_GETATTR_CTIME ((lib9p_getattr_t)(1<<7)) -#define LIB9P_GETATTR_MTIME ((lib9p_getattr_t)(1<<6)) -#define LIB9P_GETATTR_ATIME ((lib9p_getattr_t)(1<<5)) -#define LIB9P_GETATTR_RDEV ((lib9p_getattr_t)(1<<4)) -#define LIB9P_GETATTR_GID ((lib9p_getattr_t)(1<<3)) -#define LIB9P_GETATTR_UID ((lib9p_getattr_t)(1<<2)) -#define LIB9P_GETATTR_NLINK ((lib9p_getattr_t)(1<<1)) -#define LIB9P_GETATTR_MODE ((lib9p_getattr_t)(1<<0)) - -#define LIB9P_GETATTR_BASIC ((lib9p_getattr_t)(0x000007ff)) -#define LIB9P_GETATTR_ALL ((lib9p_getattr_t)(0x00003fff)) +/* bits */ +#define _LIB9P_GETATTR_UNUSED_63 ((lib9p_getattr_t)(UINT64_C(1)<<63)) +#define _LIB9P_GETATTR_UNUSED_62 ((lib9p_getattr_t)(UINT64_C(1)<<62)) +#define _LIB9P_GETATTR_UNUSED_61 ((lib9p_getattr_t)(UINT64_C(1)<<61)) +#define _LIB9P_GETATTR_UNUSED_60 ((lib9p_getattr_t)(UINT64_C(1)<<60)) +#define _LIB9P_GETATTR_UNUSED_59 ((lib9p_getattr_t)(UINT64_C(1)<<59)) +#define _LIB9P_GETATTR_UNUSED_58 ((lib9p_getattr_t)(UINT64_C(1)<<58)) +#define _LIB9P_GETATTR_UNUSED_57 ((lib9p_getattr_t)(UINT64_C(1)<<57)) +#define _LIB9P_GETATTR_UNUSED_56 ((lib9p_getattr_t)(UINT64_C(1)<<56)) +#define _LIB9P_GETATTR_UNUSED_55 ((lib9p_getattr_t)(UINT64_C(1)<<55)) +#define _LIB9P_GETATTR_UNUSED_54 ((lib9p_getattr_t)(UINT64_C(1)<<54)) +#define _LIB9P_GETATTR_UNUSED_53 ((lib9p_getattr_t)(UINT64_C(1)<<53)) +#define _LIB9P_GETATTR_UNUSED_52 ((lib9p_getattr_t)(UINT64_C(1)<<52)) +#define _LIB9P_GETATTR_UNUSED_51 ((lib9p_getattr_t)(UINT64_C(1)<<51)) +#define _LIB9P_GETATTR_UNUSED_50 ((lib9p_getattr_t)(UINT64_C(1)<<50)) +#define _LIB9P_GETATTR_UNUSED_49 ((lib9p_getattr_t)(UINT64_C(1)<<49)) +#define _LIB9P_GETATTR_UNUSED_48 ((lib9p_getattr_t)(UINT64_C(1)<<48)) +#define _LIB9P_GETATTR_UNUSED_47 ((lib9p_getattr_t)(UINT64_C(1)<<47)) +#define _LIB9P_GETATTR_UNUSED_46 ((lib9p_getattr_t)(UINT64_C(1)<<46)) +#define _LIB9P_GETATTR_UNUSED_45 ((lib9p_getattr_t)(UINT64_C(1)<<45)) +#define _LIB9P_GETATTR_UNUSED_44 ((lib9p_getattr_t)(UINT64_C(1)<<44)) +#define _LIB9P_GETATTR_UNUSED_43 ((lib9p_getattr_t)(UINT64_C(1)<<43)) +#define _LIB9P_GETATTR_UNUSED_42 ((lib9p_getattr_t)(UINT64_C(1)<<42)) +#define _LIB9P_GETATTR_UNUSED_41 ((lib9p_getattr_t)(UINT64_C(1)<<41)) +#define _LIB9P_GETATTR_UNUSED_40 ((lib9p_getattr_t)(UINT64_C(1)<<40)) +#define _LIB9P_GETATTR_UNUSED_39 ((lib9p_getattr_t)(UINT64_C(1)<<39)) +#define _LIB9P_GETATTR_UNUSED_38 ((lib9p_getattr_t)(UINT64_C(1)<<38)) +#define _LIB9P_GETATTR_UNUSED_37 ((lib9p_getattr_t)(UINT64_C(1)<<37)) +#define _LIB9P_GETATTR_UNUSED_36 ((lib9p_getattr_t)(UINT64_C(1)<<36)) +#define _LIB9P_GETATTR_UNUSED_35 ((lib9p_getattr_t)(UINT64_C(1)<<35)) +#define _LIB9P_GETATTR_UNUSED_34 ((lib9p_getattr_t)(UINT64_C(1)<<34)) +#define _LIB9P_GETATTR_UNUSED_33 ((lib9p_getattr_t)(UINT64_C(1)<<33)) +#define _LIB9P_GETATTR_UNUSED_32 ((lib9p_getattr_t)(UINT64_C(1)<<32)) +#define _LIB9P_GETATTR_UNUSED_31 ((lib9p_getattr_t)(UINT64_C(1)<<31)) +#define _LIB9P_GETATTR_UNUSED_30 ((lib9p_getattr_t)(UINT64_C(1)<<30)) +#define _LIB9P_GETATTR_UNUSED_29 ((lib9p_getattr_t)(UINT64_C(1)<<29)) +#define _LIB9P_GETATTR_UNUSED_28 ((lib9p_getattr_t)(UINT64_C(1)<<28)) +#define _LIB9P_GETATTR_UNUSED_27 ((lib9p_getattr_t)(UINT64_C(1)<<27)) +#define _LIB9P_GETATTR_UNUSED_26 ((lib9p_getattr_t)(UINT64_C(1)<<26)) +#define _LIB9P_GETATTR_UNUSED_25 ((lib9p_getattr_t)(UINT64_C(1)<<25)) +#define _LIB9P_GETATTR_UNUSED_24 ((lib9p_getattr_t)(UINT64_C(1)<<24)) +#define _LIB9P_GETATTR_UNUSED_23 ((lib9p_getattr_t)(UINT64_C(1)<<23)) +#define _LIB9P_GETATTR_UNUSED_22 ((lib9p_getattr_t)(UINT64_C(1)<<22)) +#define _LIB9P_GETATTR_UNUSED_21 ((lib9p_getattr_t)(UINT64_C(1)<<21)) +#define _LIB9P_GETATTR_UNUSED_20 ((lib9p_getattr_t)(UINT64_C(1)<<20)) +#define _LIB9P_GETATTR_UNUSED_19 ((lib9p_getattr_t)(UINT64_C(1)<<19)) +#define _LIB9P_GETATTR_UNUSED_18 ((lib9p_getattr_t)(UINT64_C(1)<<18)) +#define _LIB9P_GETATTR_UNUSED_17 ((lib9p_getattr_t)(UINT64_C(1)<<17)) +#define _LIB9P_GETATTR_UNUSED_16 ((lib9p_getattr_t)(UINT64_C(1)<<16)) +#define _LIB9P_GETATTR_UNUSED_15 ((lib9p_getattr_t)(UINT64_C(1)<<15)) +#define _LIB9P_GETATTR_UNUSED_14 ((lib9p_getattr_t)(UINT64_C(1)<<14)) +#define LIB9P_GETATTR_DATA_VERSION ((lib9p_getattr_t)(UINT64_C(1)<<13)) +#define LIB9P_GETATTR_GEN ((lib9p_getattr_t)(UINT64_C(1)<<12)) +#define LIB9P_GETATTR_BTIME ((lib9p_getattr_t)(UINT64_C(1)<<11)) +#define LIB9P_GETATTR_BLOCKS ((lib9p_getattr_t)(UINT64_C(1)<<10)) +#define LIB9P_GETATTR_SIZE ((lib9p_getattr_t)(UINT64_C(1)<<9)) +#define LIB9P_GETATTR_INO ((lib9p_getattr_t)(UINT64_C(1)<<8)) +#define LIB9P_GETATTR_CTIME ((lib9p_getattr_t)(UINT64_C(1)<<7)) +#define LIB9P_GETATTR_MTIME ((lib9p_getattr_t)(UINT64_C(1)<<6)) +#define LIB9P_GETATTR_ATIME ((lib9p_getattr_t)(UINT64_C(1)<<5)) +#define LIB9P_GETATTR_RDEV ((lib9p_getattr_t)(UINT64_C(1)<<4)) +#define LIB9P_GETATTR_GID ((lib9p_getattr_t)(UINT64_C(1)<<3)) +#define LIB9P_GETATTR_UID ((lib9p_getattr_t)(UINT64_C(1)<<2)) +#define LIB9P_GETATTR_NLINK ((lib9p_getattr_t)(UINT64_C(1)<<1)) +#define LIB9P_GETATTR_MODE ((lib9p_getattr_t)(UINT64_C(1)<<0)) +/* aliases */ +#define LIB9P_GETATTR_BASIC ((lib9p_getattr_t)(2047)) +#define LIB9P_GETATTR_ALL ((lib9p_getattr_t)(16383)) /* size = 4 ; max_iov = 1 ; max_copy = 4 */ typedef uint32_t lib9p_setattr_t; - -/* unused ((lib9p_setattr_t)(1<<31)) */ -/* unused ((lib9p_setattr_t)(1<<30)) */ -/* unused ((lib9p_setattr_t)(1<<29)) */ -/* unused ((lib9p_setattr_t)(1<<28)) */ -/* unused ((lib9p_setattr_t)(1<<27)) */ -/* unused ((lib9p_setattr_t)(1<<26)) */ -/* unused ((lib9p_setattr_t)(1<<25)) */ -/* unused ((lib9p_setattr_t)(1<<24)) */ -/* unused ((lib9p_setattr_t)(1<<23)) */ -/* unused ((lib9p_setattr_t)(1<<22)) */ -/* unused ((lib9p_setattr_t)(1<<21)) */ -/* unused ((lib9p_setattr_t)(1<<20)) */ -/* unused ((lib9p_setattr_t)(1<<19)) */ -/* unused ((lib9p_setattr_t)(1<<18)) */ -/* unused ((lib9p_setattr_t)(1<<17)) */ -/* unused ((lib9p_setattr_t)(1<<16)) */ -/* unused ((lib9p_setattr_t)(1<<15)) */ -/* unused ((lib9p_setattr_t)(1<<14)) */ -/* unused ((lib9p_setattr_t)(1<<13)) */ -/* unused ((lib9p_setattr_t)(1<<12)) */ -/* unused ((lib9p_setattr_t)(1<<11)) */ -/* unused ((lib9p_setattr_t)(1<<10)) */ -/* unused ((lib9p_setattr_t)(1<<9)) */ -#define LIB9P_SETATTR_MTIME_SET ((lib9p_setattr_t)(1<<8)) -#define LIB9P_SETATTR_ATIME_SET ((lib9p_setattr_t)(1<<7)) -#define LIB9P_SETATTR_CTIME ((lib9p_setattr_t)(1<<6)) -#define LIB9P_SETATTR_MTIME ((lib9p_setattr_t)(1<<5)) -#define LIB9P_SETATTR_ATIME ((lib9p_setattr_t)(1<<4)) -#define LIB9P_SETATTR_SIZE ((lib9p_setattr_t)(1<<3)) -#define LIB9P_SETATTR_GID ((lib9p_setattr_t)(1<<2)) -#define LIB9P_SETATTR_UID ((lib9p_setattr_t)(1<<1)) -#define LIB9P_SETATTR_MODE ((lib9p_setattr_t)(1<<0)) +/* bits */ +#define _LIB9P_SETATTR_UNUSED_31 ((lib9p_setattr_t)(UINT32_C(1)<<31)) +#define _LIB9P_SETATTR_UNUSED_30 ((lib9p_setattr_t)(UINT32_C(1)<<30)) +#define _LIB9P_SETATTR_UNUSED_29 ((lib9p_setattr_t)(UINT32_C(1)<<29)) +#define _LIB9P_SETATTR_UNUSED_28 ((lib9p_setattr_t)(UINT32_C(1)<<28)) +#define _LIB9P_SETATTR_UNUSED_27 ((lib9p_setattr_t)(UINT32_C(1)<<27)) +#define _LIB9P_SETATTR_UNUSED_26 ((lib9p_setattr_t)(UINT32_C(1)<<26)) +#define _LIB9P_SETATTR_UNUSED_25 ((lib9p_setattr_t)(UINT32_C(1)<<25)) +#define _LIB9P_SETATTR_UNUSED_24 ((lib9p_setattr_t)(UINT32_C(1)<<24)) +#define _LIB9P_SETATTR_UNUSED_23 ((lib9p_setattr_t)(UINT32_C(1)<<23)) +#define _LIB9P_SETATTR_UNUSED_22 ((lib9p_setattr_t)(UINT32_C(1)<<22)) +#define _LIB9P_SETATTR_UNUSED_21 ((lib9p_setattr_t)(UINT32_C(1)<<21)) +#define _LIB9P_SETATTR_UNUSED_20 ((lib9p_setattr_t)(UINT32_C(1)<<20)) +#define _LIB9P_SETATTR_UNUSED_19 ((lib9p_setattr_t)(UINT32_C(1)<<19)) +#define _LIB9P_SETATTR_UNUSED_18 ((lib9p_setattr_t)(UINT32_C(1)<<18)) +#define _LIB9P_SETATTR_UNUSED_17 ((lib9p_setattr_t)(UINT32_C(1)<<17)) +#define _LIB9P_SETATTR_UNUSED_16 ((lib9p_setattr_t)(UINT32_C(1)<<16)) +#define _LIB9P_SETATTR_UNUSED_15 ((lib9p_setattr_t)(UINT32_C(1)<<15)) +#define _LIB9P_SETATTR_UNUSED_14 ((lib9p_setattr_t)(UINT32_C(1)<<14)) +#define _LIB9P_SETATTR_UNUSED_13 ((lib9p_setattr_t)(UINT32_C(1)<<13)) +#define _LIB9P_SETATTR_UNUSED_12 ((lib9p_setattr_t)(UINT32_C(1)<<12)) +#define _LIB9P_SETATTR_UNUSED_11 ((lib9p_setattr_t)(UINT32_C(1)<<11)) +#define _LIB9P_SETATTR_UNUSED_10 ((lib9p_setattr_t)(UINT32_C(1)<<10)) +#define _LIB9P_SETATTR_UNUSED_9 ((lib9p_setattr_t)(UINT32_C(1)<<9)) +#define LIB9P_SETATTR_MTIME_SET ((lib9p_setattr_t)(UINT32_C(1)<<8)) +#define LIB9P_SETATTR_ATIME_SET ((lib9p_setattr_t)(UINT32_C(1)<<7)) +#define LIB9P_SETATTR_CTIME ((lib9p_setattr_t)(UINT32_C(1)<<6)) +#define LIB9P_SETATTR_MTIME ((lib9p_setattr_t)(UINT32_C(1)<<5)) +#define LIB9P_SETATTR_ATIME ((lib9p_setattr_t)(UINT32_C(1)<<4)) +#define LIB9P_SETATTR_SIZE ((lib9p_setattr_t)(UINT32_C(1)<<3)) +#define LIB9P_SETATTR_GID ((lib9p_setattr_t)(UINT32_C(1)<<2)) +#define LIB9P_SETATTR_UID ((lib9p_setattr_t)(UINT32_C(1)<<1)) +#define LIB9P_SETATTR_MODE ((lib9p_setattr_t)(UINT32_C(1)<<0)) /* size = 1 ; max_iov = 1 ; max_copy = 1 */ typedef uint8_t lib9p_lock_type_t; -#define LIB9P_LOCK_TYPE_RDLCK ((lib9p_lock_type_t)UINT8_C(0)) -#define LIB9P_LOCK_TYPE_WRLCK ((lib9p_lock_type_t)UINT8_C(1)) -#define LIB9P_LOCK_TYPE_UNLCK ((lib9p_lock_type_t)UINT8_C(2)) +#define LIB9P_LOCK_TYPE_RDLCK ((lib9p_lock_type_t)(0)) +#define LIB9P_LOCK_TYPE_WRLCK ((lib9p_lock_type_t)(1)) +#define LIB9P_LOCK_TYPE_UNLCK ((lib9p_lock_type_t)(2)) /* size = 4 ; max_iov = 1 ; max_copy = 4 */ typedef uint32_t lib9p_lock_flags_t; - -/* unused ((lib9p_lock_flags_t)(1<<31)) */ -/* unused ((lib9p_lock_flags_t)(1<<30)) */ -/* unused ((lib9p_lock_flags_t)(1<<29)) */ -/* unused ((lib9p_lock_flags_t)(1<<28)) */ -/* unused ((lib9p_lock_flags_t)(1<<27)) */ -/* unused ((lib9p_lock_flags_t)(1<<26)) */ -/* unused ((lib9p_lock_flags_t)(1<<25)) */ -/* unused ((lib9p_lock_flags_t)(1<<24)) */ -/* unused ((lib9p_lock_flags_t)(1<<23)) */ -/* unused ((lib9p_lock_flags_t)(1<<22)) */ -/* unused ((lib9p_lock_flags_t)(1<<21)) */ -/* unused ((lib9p_lock_flags_t)(1<<20)) */ -/* unused ((lib9p_lock_flags_t)(1<<19)) */ -/* unused ((lib9p_lock_flags_t)(1<<18)) */ -/* unused ((lib9p_lock_flags_t)(1<<17)) */ -/* unused ((lib9p_lock_flags_t)(1<<16)) */ -/* unused ((lib9p_lock_flags_t)(1<<15)) */ -/* unused ((lib9p_lock_flags_t)(1<<14)) */ -/* unused ((lib9p_lock_flags_t)(1<<13)) */ -/* unused ((lib9p_lock_flags_t)(1<<12)) */ -/* unused ((lib9p_lock_flags_t)(1<<11)) */ -/* unused ((lib9p_lock_flags_t)(1<<10)) */ -/* unused ((lib9p_lock_flags_t)(1<<9)) */ -/* unused ((lib9p_lock_flags_t)(1<<8)) */ -/* unused ((lib9p_lock_flags_t)(1<<7)) */ -/* unused ((lib9p_lock_flags_t)(1<<6)) */ -/* unused ((lib9p_lock_flags_t)(1<<5)) */ -/* unused ((lib9p_lock_flags_t)(1<<4)) */ -/* unused ((lib9p_lock_flags_t)(1<<3)) */ -/* unused ((lib9p_lock_flags_t)(1<<2)) */ -#define LIB9P_LOCK_FLAGS_RECLAIM ((lib9p_lock_flags_t)(1<<1)) -#define LIB9P_LOCK_FLAGS_BLOCK ((lib9p_lock_flags_t)(1<<0)) +/* bits */ +#define _LIB9P_LOCK_FLAGS_UNUSED_31 ((lib9p_lock_flags_t)(UINT32_C(1)<<31)) +#define _LIB9P_LOCK_FLAGS_UNUSED_30 ((lib9p_lock_flags_t)(UINT32_C(1)<<30)) +#define _LIB9P_LOCK_FLAGS_UNUSED_29 ((lib9p_lock_flags_t)(UINT32_C(1)<<29)) +#define _LIB9P_LOCK_FLAGS_UNUSED_28 ((lib9p_lock_flags_t)(UINT32_C(1)<<28)) +#define _LIB9P_LOCK_FLAGS_UNUSED_27 ((lib9p_lock_flags_t)(UINT32_C(1)<<27)) +#define _LIB9P_LOCK_FLAGS_UNUSED_26 ((lib9p_lock_flags_t)(UINT32_C(1)<<26)) +#define _LIB9P_LOCK_FLAGS_UNUSED_25 ((lib9p_lock_flags_t)(UINT32_C(1)<<25)) +#define _LIB9P_LOCK_FLAGS_UNUSED_24 ((lib9p_lock_flags_t)(UINT32_C(1)<<24)) +#define _LIB9P_LOCK_FLAGS_UNUSED_23 ((lib9p_lock_flags_t)(UINT32_C(1)<<23)) +#define _LIB9P_LOCK_FLAGS_UNUSED_22 ((lib9p_lock_flags_t)(UINT32_C(1)<<22)) +#define _LIB9P_LOCK_FLAGS_UNUSED_21 ((lib9p_lock_flags_t)(UINT32_C(1)<<21)) +#define _LIB9P_LOCK_FLAGS_UNUSED_20 ((lib9p_lock_flags_t)(UINT32_C(1)<<20)) +#define _LIB9P_LOCK_FLAGS_UNUSED_19 ((lib9p_lock_flags_t)(UINT32_C(1)<<19)) +#define _LIB9P_LOCK_FLAGS_UNUSED_18 ((lib9p_lock_flags_t)(UINT32_C(1)<<18)) +#define _LIB9P_LOCK_FLAGS_UNUSED_17 ((lib9p_lock_flags_t)(UINT32_C(1)<<17)) +#define _LIB9P_LOCK_FLAGS_UNUSED_16 ((lib9p_lock_flags_t)(UINT32_C(1)<<16)) +#define _LIB9P_LOCK_FLAGS_UNUSED_15 ((lib9p_lock_flags_t)(UINT32_C(1)<<15)) +#define _LIB9P_LOCK_FLAGS_UNUSED_14 ((lib9p_lock_flags_t)(UINT32_C(1)<<14)) +#define _LIB9P_LOCK_FLAGS_UNUSED_13 ((lib9p_lock_flags_t)(UINT32_C(1)<<13)) +#define _LIB9P_LOCK_FLAGS_UNUSED_12 ((lib9p_lock_flags_t)(UINT32_C(1)<<12)) +#define _LIB9P_LOCK_FLAGS_UNUSED_11 ((lib9p_lock_flags_t)(UINT32_C(1)<<11)) +#define _LIB9P_LOCK_FLAGS_UNUSED_10 ((lib9p_lock_flags_t)(UINT32_C(1)<<10)) +#define _LIB9P_LOCK_FLAGS_UNUSED_9 ((lib9p_lock_flags_t)(UINT32_C(1)<<9)) +#define _LIB9P_LOCK_FLAGS_UNUSED_8 ((lib9p_lock_flags_t)(UINT32_C(1)<<8)) +#define _LIB9P_LOCK_FLAGS_UNUSED_7 ((lib9p_lock_flags_t)(UINT32_C(1)<<7)) +#define _LIB9P_LOCK_FLAGS_UNUSED_6 ((lib9p_lock_flags_t)(UINT32_C(1)<<6)) +#define _LIB9P_LOCK_FLAGS_UNUSED_5 ((lib9p_lock_flags_t)(UINT32_C(1)<<5)) +#define _LIB9P_LOCK_FLAGS_UNUSED_4 ((lib9p_lock_flags_t)(UINT32_C(1)<<4)) +#define _LIB9P_LOCK_FLAGS_UNUSED_3 ((lib9p_lock_flags_t)(UINT32_C(1)<<3)) +#define _LIB9P_LOCK_FLAGS_UNUSED_2 ((lib9p_lock_flags_t)(UINT32_C(1)<<2)) +#define LIB9P_LOCK_FLAGS_RECLAIM ((lib9p_lock_flags_t)(UINT32_C(1)<<1)) +#define LIB9P_LOCK_FLAGS_BLOCK ((lib9p_lock_flags_t)(UINT32_C(1)<<0)) /* size = 1 ; max_iov = 1 ; max_copy = 1 */ typedef uint8_t lib9p_lock_status_t; -#define LIB9P_LOCK_STATUS_SUCCESS ((lib9p_lock_status_t)UINT8_C(0)) -#define LIB9P_LOCK_STATUS_BLOCKED ((lib9p_lock_status_t)UINT8_C(1)) -#define LIB9P_LOCK_STATUS_ERROR ((lib9p_lock_status_t)UINT8_C(2)) -#define LIB9P_LOCK_STATUS_GRACE ((lib9p_lock_status_t)UINT8_C(3)) +#define LIB9P_LOCK_STATUS_SUCCESS ((lib9p_lock_status_t)(0)) +#define LIB9P_LOCK_STATUS_BLOCKED ((lib9p_lock_status_t)(1)) +#define LIB9P_LOCK_STATUS_ERROR ((lib9p_lock_status_t)(2)) +#define LIB9P_LOCK_STATUS_GRACE ((lib9p_lock_status_t)(3)) #endif /* CONFIG_9P_ENABLE_9P2000_L */ #if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_p9p || CONFIG_9P_ENABLE_9P2000_u |