summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/sbc_harness/fs_harness_flash_bin.c23
-rw-r--r--cmd/sbc_harness/fs_harness_uptime_txt.c23
2 files changed, 18 insertions, 28 deletions
diff --git a/cmd/sbc_harness/fs_harness_flash_bin.c b/cmd/sbc_harness/fs_harness_flash_bin.c
index fa4069f..5920b85 100644
--- a/cmd/sbc_harness/fs_harness_flash_bin.c
+++ b/cmd/sbc_harness/fs_harness_flash_bin.c
@@ -148,30 +148,25 @@ static struct lib9p_qid flash_file_qid(struct flash_file *self) {
};
}
-static struct lib9p_stat flash_file_stat(struct flash_file *self, struct lib9p_srv_ctx *ctx) {
+static struct lib9p_srv_stat flash_file_stat(struct flash_file *self, struct lib9p_srv_ctx *ctx) {
assert(self);
assert(ctx);
- return (struct lib9p_stat){
- .fstype = 0,
- .fsdev = 0,
+ return (struct lib9p_srv_stat){
.qid = flash_file_qid(self),
.mode = LIB9P_DM_EXCL|0666,
- .atime = UTIL9P_ATIME,
- .mtime = UTIL9P_MTIME,
- .length = DATA_SIZE,
+ .atime_sec = UTIL9P_ATIME,
+ .mtime_sec = UTIL9P_MTIME,
+ .size = DATA_SIZE,
.name = lib9p_str(self->name),
- .owner_uname = lib9p_str("root"),
- .owner_unum = 0,
- .owner_gname = lib9p_str("root"),
- .owner_gnum = 0,
- .last_modifier_uname = lib9p_str("root"),
- .last_modifier_unum = 0,
+ .owner_uid = { .name = lib9p_str("root"), .num = 0 },
+ .owner_gid = { .name = lib9p_str("root"), .num = 0 },
+ .last_modifier_uid = { .name = lib9p_str("root"), .num = 0 },
.extension = lib9p_str(NULL),
};
}
static void flash_file_wstat(struct flash_file *self, struct lib9p_srv_ctx *ctx,
- struct lib9p_stat) {
+ struct lib9p_srv_stat) {
assert(self);
assert(ctx);
diff --git a/cmd/sbc_harness/fs_harness_uptime_txt.c b/cmd/sbc_harness/fs_harness_uptime_txt.c
index bfe1d98..f7b755f 100644
--- a/cmd/sbc_harness/fs_harness_uptime_txt.c
+++ b/cmd/sbc_harness/fs_harness_uptime_txt.c
@@ -38,7 +38,7 @@ static struct lib9p_qid uptime_file_qid(struct uptime_file *self) {
};
}
-static struct lib9p_stat uptime_file_stat(struct uptime_file *self, struct lib9p_srv_ctx *ctx) {
+static struct lib9p_srv_stat uptime_file_stat(struct uptime_file *self, struct lib9p_srv_ctx *ctx) {
assert(self);
assert(ctx);
@@ -52,26 +52,21 @@ static struct lib9p_stat uptime_file_stat(struct uptime_file *self, struct lib9p
size++;
size += 3;
- return (struct lib9p_stat){
- .fstype = 0,
- .fsdev = 0,
+ return (struct lib9p_srv_stat){
.qid = uptime_file_qid(self),
.mode = 0444,
- .atime = UTIL9P_ATIME,
- .mtime = UTIL9P_MTIME,
- .length = size,
+ .atime_sec = UTIL9P_ATIME,
+ .mtime_sec = UTIL9P_MTIME,
+ .size = size,
.name = lib9p_str(self->name),
- .owner_uname = lib9p_str("root"),
- .owner_unum = 0,
- .owner_gname = lib9p_str("root"),
- .owner_gnum = 0,
- .last_modifier_uname = lib9p_str("root"),
- .last_modifier_unum = 0,
+ .owner_uid = { .name = lib9p_str("root"), .num = 0 },
+ .owner_gid = { .name = lib9p_str("root"), .num = 0 },
+ .last_modifier_uid = { .name = lib9p_str("root"), .num = 0 },
.extension = lib9p_str(NULL),
};
}
static void uptime_file_wstat(struct uptime_file *self, struct lib9p_srv_ctx *ctx,
- struct lib9p_stat) {
+ struct lib9p_srv_stat) {
assert(self);
assert(ctx);