diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-04-19 09:14:20 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-04-19 12:53:42 -0600 |
commit | b85e0bd570de1245afa2738057925320789601c5 (patch) | |
tree | 865061c13a9b256c2b0cd66e0530d9cf951c981a /lib9p_util/static.c | |
parent | 0a700d5e8e5feec3fc07316924a00b2b7cab6050 (diff) |
lib9p_idl: Clean up struct stat and numeric user IDs
Diffstat (limited to 'lib9p_util/static.c')
-rw-r--r-- | lib9p_util/static.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/lib9p_util/static.c b/lib9p_util/static.c index 44b8242..e1df3ca 100644 --- a/lib9p_util/static.c +++ b/lib9p_util/static.c @@ -38,21 +38,21 @@ static struct lib9p_stat util9p_static_dir_stat(struct util9p_static_dir *self, assert(ctx); return (struct lib9p_stat){ - .kern_type = 0, - .kern_dev = 0, - .file_qid = util9p_static_dir_qid(self), - .file_mode = LIB9P_DM_DIR | (self->perm & 0555), - .file_atime = self->atime, - .file_mtime = self->mtime, - .file_size = 0, - .file_name = lib9p_str(self->name), - .file_owner_uid = lib9p_str(self->u_name), - .file_owner_gid = lib9p_str(self->g_name), - .file_last_modified_uid = lib9p_str(self->m_name), - .file_extension = lib9p_str(NULL), - .file_owner_n_uid = self->u_num, - .file_owner_n_gid = self->g_num, - .file_last_modified_n_uid = self->m_num, + .fstype = 0, + .fsdev = 0, + .qid = util9p_static_dir_qid(self), + .mode = LIB9P_DM_DIR | (self->perm & 0555), + .atime = self->atime, + .mtime = self->mtime, + .length = 0, + .name = lib9p_str(self->name), + .owner_uname = lib9p_str(self->u_name), + .owner_unum = self->u_num, + .owner_gname = lib9p_str(self->g_name), + .owner_gnum = self->g_num, + .last_modifier_uname = lib9p_str(self->m_name), + .last_modifier_unum = self->m_num, + .extension = lib9p_str(NULL), }; } static void util9p_static_dir_wstat(struct util9p_static_dir *self, struct lib9p_srv_ctx *ctx, @@ -80,7 +80,7 @@ static lo_interface lib9p_srv_file util9p_static_dir_dwalk(struct util9p_static_ if (lib9p_ctx_has_error(&ctx->basectx)) break; lib9p_stat_assert(stat); - if (lib9p_str_eq(stat.file_name, childname)) + if (lib9p_str_eq(stat.name, childname)) return file; } lib9p_error(&ctx->basectx, @@ -171,21 +171,21 @@ static struct lib9p_stat util9p_static_file_stat(struct util9p_static_file *self assert(ctx); return (struct lib9p_stat){ - .kern_type = 0, - .kern_dev = 0, - .file_qid = util9p_static_file_qid(self), - .file_mode = self->perm & 0444, - .file_atime = self->atime, - .file_mtime = self->mtime, - .file_size = (uint64_t)util9p_static_file_size(self), - .file_name = lib9p_str(self->name), - .file_owner_uid = lib9p_str(self->u_name), - .file_owner_gid = lib9p_str(self->g_name), - .file_last_modified_uid = lib9p_str(self->m_name), - .file_extension = lib9p_str(NULL), - .file_owner_n_uid = self->u_num, - .file_owner_n_gid = self->g_num, - .file_last_modified_n_uid = self->m_num, + .fstype = 0, + .fsdev = 0, + .qid = util9p_static_file_qid(self), + .mode = self->perm & 0444, + .atime = self->atime, + .mtime = self->mtime, + .length = (uint64_t)util9p_static_file_size(self), + .name = lib9p_str(self->name), + .owner_uname = lib9p_str(self->u_name), + .owner_unum = self->u_num, + .owner_gname = lib9p_str(self->g_name), + .owner_gnum = self->g_num, + .last_modifier_uname = lib9p_str(self->m_name), + .last_modifier_unum = self->m_num, + .extension = lib9p_str(NULL), }; } static void util9p_static_file_wstat(struct util9p_static_file *self, struct lib9p_srv_ctx *ctx, |