summaryrefslogtreecommitdiff
path: root/lib9p/core_include
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-19 09:14:20 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-19 12:53:42 -0600
commitb85e0bd570de1245afa2738057925320789601c5 (patch)
tree865061c13a9b256c2b0cd66e0530d9cf951c981a /lib9p/core_include
parent0a700d5e8e5feec3fc07316924a00b2b7cab6050 (diff)
lib9p_idl: Clean up struct stat and numeric user IDs
Diffstat (limited to 'lib9p/core_include')
-rw-r--r--lib9p/core_include/lib9p/_core_generated.h34
-rw-r--r--lib9p/core_include/lib9p/core.h12
2 files changed, 23 insertions, 23 deletions
diff --git a/lib9p/core_include/lib9p/_core_generated.h b/lib9p/core_include/lib9p/_core_generated.h
index 68eb636..705e608 100644
--- a/lib9p/core_include/lib9p/_core_generated.h
+++ b/lib9p/core_include/lib9p/_core_generated.h
@@ -999,22 +999,22 @@ LO_IMPLEMENTATION_H(fmt_formatter, struct lib9p_msg_Rswrite, lib9p_msg_Rswrite);
/* LIB9P_VER_9P2000_p9p: min_size = 49 ; exp_size = 157 ; max_size = 262,189 ; max_iov = 8 ; max_copy = 49 */
/* LIB9P_VER_9P2000_u : min_size = 63 ; exp_size = 198 ; max_size = 327,738 ; max_iov = 11 ; max_copy = 63 */
struct lib9p_stat {
- uint16_t kern_type;
- uint32_t kern_dev;
- struct lib9p_qid file_qid;
- lib9p_dm_t file_mode;
- uint32_t file_atime;
- uint32_t file_mtime;
- uint64_t file_size;
- struct lib9p_s file_name;
- struct lib9p_s file_owner_uid;
- struct lib9p_s file_owner_gid;
- struct lib9p_s file_last_modified_uid;
+ uint16_t fstype;
+ uint32_t fsdev;
+ struct lib9p_qid qid;
+ lib9p_dm_t mode;
+ uint32_t atime;
+ uint32_t mtime;
+ uint64_t length;
+ struct lib9p_s name;
+ struct lib9p_s owner_uname;
+ struct lib9p_s owner_gname;
+ struct lib9p_s last_modifier_uname;
#if CONFIG_9P_ENABLE_9P2000_u
- struct lib9p_s file_extension;
- lib9p_nuid_t file_owner_n_uid;
- lib9p_nuid_t file_owner_n_gid;
- lib9p_nuid_t file_last_modified_n_uid;
+ struct lib9p_s extension;
+ lib9p_nuid_t owner_unum;
+ lib9p_nuid_t owner_gnum;
+ lib9p_nuid_t last_modifier_unum;
#endif /* CONFIG_9P_ENABLE_9P2000_u */
};
LO_IMPLEMENTATION_H(fmt_formatter, struct lib9p_stat, lib9p_stat);
@@ -1048,7 +1048,7 @@ struct lib9p_msg_Tauth {
struct lib9p_s uname;
struct lib9p_s aname;
#if CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_u
- lib9p_nuid_t n_uid;
+ lib9p_nuid_t unum;
#endif /* CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_u */
};
LO_IMPLEMENTATION_H(fmt_formatter, struct lib9p_msg_Tauth, lib9p_msg_Tauth);
@@ -1072,7 +1072,7 @@ struct lib9p_msg_Tattach {
struct lib9p_s uname;
struct lib9p_s aname;
#if CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_u
- lib9p_nuid_t n_uid;
+ lib9p_nuid_t unum;
#endif /* CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_u */
};
LO_IMPLEMENTATION_H(fmt_formatter, struct lib9p_msg_Tattach, lib9p_msg_Tattach);
diff --git a/lib9p/core_include/lib9p/core.h b/lib9p/core_include/lib9p/core.h
index 8f76c3b..a82252b 100644
--- a/lib9p/core_include/lib9p/core.h
+++ b/lib9p/core_include/lib9p/core.h
@@ -167,12 +167,12 @@ bool lib9p_Rmsg_marshal(struct lib9p_ctx *ctx, enum lib9p_msg_type typ, void *bo
/** Assert that a `struct lib9p_stat` object looks valid. */
static inline void lib9p_stat_assert(struct lib9p_stat stat) {
- assert( ((bool)(stat.file_mode & LIB9P_DM_DIR )) == ((bool)(stat.file_qid.type & LIB9P_QT_DIR )) );
- assert( ((bool)(stat.file_mode & LIB9P_DM_APPEND)) == ((bool)(stat.file_qid.type & LIB9P_QT_APPEND)) );
- assert( ((bool)(stat.file_mode & LIB9P_DM_EXCL )) == ((bool)(stat.file_qid.type & LIB9P_QT_EXCL )) );
- assert( ((bool)(stat.file_mode & LIB9P_DM_AUTH )) == ((bool)(stat.file_qid.type & LIB9P_QT_AUTH )) );
- assert( ((bool)(stat.file_mode & LIB9P_DM_TMP )) == ((bool)(stat.file_qid.type & LIB9P_QT_TMP )) );
- assert( (stat.file_size == 0) || !(stat.file_mode & LIB9P_DM_DIR) );
+ assert( ((bool)(stat.mode & LIB9P_DM_DIR )) == ((bool)(stat.qid.type & LIB9P_QT_DIR )) );
+ assert( ((bool)(stat.mode & LIB9P_DM_APPEND)) == ((bool)(stat.qid.type & LIB9P_QT_APPEND)) );
+ assert( ((bool)(stat.mode & LIB9P_DM_EXCL )) == ((bool)(stat.qid.type & LIB9P_QT_EXCL )) );
+ assert( ((bool)(stat.mode & LIB9P_DM_AUTH )) == ((bool)(stat.qid.type & LIB9P_QT_AUTH )) );
+ assert( ((bool)(stat.mode & LIB9P_DM_TMP )) == ((bool)(stat.qid.type & LIB9P_QT_TMP )) );
+ assert( (stat.length == 0) || !(stat.mode & LIB9P_DM_DIR) );
}
/**