summaryrefslogtreecommitdiff
path: root/lib9p/9p.generated.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib9p/9p.generated.c')
-rw-r--r--lib9p/9p.generated.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib9p/9p.generated.c b/lib9p/9p.generated.c
index fc243f5..54e7613 100644
--- a/lib9p/9p.generated.c
+++ b/lib9p/9p.generated.c
@@ -441,7 +441,8 @@ static FLATTEN bool validate_Tattach(struct _validate_ctx *ctx) {
return validate_4(ctx)
|| validate_4(ctx)
|| validate_s(ctx)
- || validate_s(ctx);
+ || validate_s(ctx)
+ || ( (ctx->ctx->version==LIB9P_VER_9P2000_u) && validate_4(ctx) );
}
static FLATTEN bool validate_Rattach(struct _validate_ctx *ctx) {
@@ -613,7 +614,7 @@ static ALWAYS_INLINE void unmarshal_d(struct _unmarshal_ctx *ctx, struct lib9p_d
out->dat = ctx->extra;
ctx->extra += sizeof(out->dat[0]) * out->len;
for (typeof(out->len) i = 0; i < out->len; i++)
- unmarshal_1(ctx, &out->dat[i]);
+ unmarshal_1(ctx, (uint8_t *)&out->dat[i]);
}
static ALWAYS_INLINE void unmarshal_s(struct _unmarshal_ctx *ctx, struct lib9p_s *out) {
@@ -622,7 +623,7 @@ static ALWAYS_INLINE void unmarshal_s(struct _unmarshal_ctx *ctx, struct lib9p_s
out->utf8 = ctx->extra;
ctx->extra += sizeof(out->utf8[0]) * out->len;
for (typeof(out->len) i = 0; i < out->len; i++)
- unmarshal_1(ctx, &out->utf8[i]);
+ unmarshal_1(ctx, (uint8_t *)&out->utf8[i]);
}
static ALWAYS_INLINE void unmarshal_dm(struct _unmarshal_ctx *ctx, lib9p_dm_t *out) {
@@ -695,6 +696,7 @@ static FLATTEN void unmarshal_Tattach(struct _unmarshal_ctx *ctx, struct lib9p_m
unmarshal_4(ctx, &out->afid);
unmarshal_s(ctx, &out->uname);
unmarshal_s(ctx, &out->aname);
+ if ( (ctx->ctx->version==LIB9P_VER_9P2000_u) ) unmarshal_4(ctx, &out->n_uname);
}
static FLATTEN void unmarshal_Rattach(struct _unmarshal_ctx *ctx, struct lib9p_msg_Rattach *out) {
@@ -912,7 +914,7 @@ static ALWAYS_INLINE bool marshal_d(struct _marshal_ctx *ctx, struct lib9p_d *va
|| ({
bool err = false;
for (typeof(val->len) i = 0; i < val->len && !err; i++)
- err = marshal_1(ctx, &val->dat[i]);
+ err = marshal_1(ctx, (uint8_t *)&val->dat[i]);
err;
});
}
@@ -922,7 +924,7 @@ static ALWAYS_INLINE bool marshal_s(struct _marshal_ctx *ctx, struct lib9p_s *va
|| ({
bool err = false;
for (typeof(val->len) i = 0; i < val->len && !err; i++)
- err = marshal_1(ctx, &val->utf8[i]);
+ err = marshal_1(ctx, (uint8_t *)&val->utf8[i]);
err;
});
}
@@ -996,7 +998,8 @@ static FLATTEN bool marshal_Tattach(struct _marshal_ctx *ctx, struct lib9p_msg_T
return marshal_4(ctx, &val->fid)
|| marshal_4(ctx, &val->afid)
|| marshal_s(ctx, &val->uname)
- || marshal_s(ctx, &val->aname);
+ || marshal_s(ctx, &val->aname)
+ || ( (ctx->ctx->version==LIB9P_VER_9P2000_u) && marshal_4(ctx, &val->n_uname) );
}
static FLATTEN bool marshal_Rattach(struct _marshal_ctx *ctx, struct lib9p_msg_Rattach *val) {