diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-03-18 10:53:12 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-03-26 22:17:22 -0600 |
commit | e7f3db0679e5d37970a06f428208c3f5b51db5d2 (patch) | |
tree | 607b6716d89fb1615dda1bc27e582bed23043f68 /lib9p/9p.generated.c | |
parent | 865bb702f828784a0225b5eae9ed8803094140d5 (diff) |
Diffstat (limited to 'lib9p/9p.generated.c')
-rw-r--r-- | lib9p/9p.generated.c | 45 |
1 files changed, 35 insertions, 10 deletions
diff --git a/lib9p/9p.generated.c b/lib9p/9p.generated.c index 6726084..868d936 100644 --- a/lib9p/9p.generated.c +++ b/lib9p/9p.generated.c @@ -2259,7 +2259,11 @@ static void unmarshal_Rread([[gnu::unused]] struct lib9p_ctx *ctx, uint8_t *net_ net_offset += 1; UNMARSHAL_U16LE(ctx, out->tag); UNMARSHAL_U32LE(ctx, out->count); - UNMARSHAL_BYTES(ctx, out->data, out->count); + out->data.iov = ctx->extra; + ctx->extra += sizeof(out->data.iov[0]); + out->data.iov->iov_base = &ctx->net_bytes[ctx->net_offset]; + out->data.iov->iov_len = out->count; + out->data.iovcnt = 1; } static void unmarshal_Twrite([[gnu::unused]] struct lib9p_ctx *ctx, uint8_t *net_bytes, void *out_buf) { @@ -2272,7 +2276,11 @@ static void unmarshal_Twrite([[gnu::unused]] struct lib9p_ctx *ctx, uint8_t *net UNMARSHAL_U32LE(ctx, out->fid); UNMARSHAL_U64LE(ctx, out->offset); UNMARSHAL_U32LE(ctx, out->count); - UNMARSHAL_BYTES(ctx, out->data, out->count); + out->data.iov = ctx->extra; + ctx->extra += sizeof(out->data.iov[0]); + out->data.iov->iov_base = &ctx->net_bytes[ctx->net_offset]; + out->data.iov->iov_len = out->count; + out->data.iovcnt = 1; } static void unmarshal_Rwrite([[gnu::unused]] struct lib9p_ctx *ctx, uint8_t *net_bytes, void *out_buf) { @@ -2772,7 +2780,11 @@ static void unmarshal_Rreaddir([[gnu::unused]] struct lib9p_ctx *ctx, uint8_t *n net_offset += 1; UNMARSHAL_U16LE(ctx, out->tag); UNMARSHAL_U32LE(ctx, out->count); - UNMARSHAL_BYTES(ctx, out->data, out->count); + out->data.iov = ctx->extra; + ctx->extra += sizeof(out->data.iov[0]); + out->data.iov->iov_base = &ctx->net_bytes[ctx->net_offset]; + out->data.iov->iov_len = out->count; + out->data.iovcnt = 1; } static void unmarshal_Tfsync([[gnu::unused]] struct lib9p_ctx *ctx, uint8_t *net_bytes, void *out_buf) { @@ -2993,7 +3005,11 @@ static void unmarshal_Rsread([[gnu::unused]] struct lib9p_ctx *ctx, uint8_t *net net_offset += 1; UNMARSHAL_U16LE(ctx, out->tag); UNMARSHAL_U32LE(ctx, out->count); - UNMARSHAL_BYTES(ctx, out->data, out->count); + out->data.iov = ctx->extra; + ctx->extra += sizeof(out->data.iov[0]); + out->data.iov->iov_base = &ctx->net_bytes[ctx->net_offset]; + out->data.iov->iov_len = out->count; + out->data.iovcnt = 1; } static void unmarshal_Tswrite([[gnu::unused]] struct lib9p_ctx *ctx, uint8_t *net_bytes, void *out_buf) { @@ -3012,7 +3028,11 @@ static void unmarshal_Tswrite([[gnu::unused]] struct lib9p_ctx *ctx, uint8_t *ne UNMARSHAL_BYTES(ctx, out->wname[i].utf8, out->wname[i].len); } UNMARSHAL_U32LE(ctx, out->count); - UNMARSHAL_BYTES(ctx, out->data, out->count); + out->data.iov = ctx->extra; + ctx->extra += sizeof(out->data.iov[0]); + out->data.iov->iov_base = &ctx->net_bytes[ctx->net_offset]; + out->data.iov->iov_len = out->count; + out->data.iovcnt = 1; } static void unmarshal_Rswrite([[gnu::unused]] struct lib9p_ctx *ctx, uint8_t *net_bytes, void *out_buf) { @@ -3491,7 +3511,8 @@ static bool marshal_Rread(struct lib9p_ctx *ctx, struct lib9p_msg_Rread *val, st MARSHAL_U8LE(ctx, 117); MARSHAL_U16LE(ctx, val->tag); MARSHAL_U32LE(ctx, val->count); - MARSHAL_BYTES_ZEROCOPY(ctx, val->data, val->count); + for (int iov_i = 0; iov_i < val->data->iovcnt; iov_i++) + MARSHAL_BYTES_ZEROCOPY(ctx, val->data->iov[iov_i].iov_base, val->data->iov[iov_i].iov_len); return false; } @@ -3512,7 +3533,8 @@ static bool marshal_Twrite(struct lib9p_ctx *ctx, struct lib9p_msg_Twrite *val, MARSHAL_U32LE(ctx, val->fid); MARSHAL_U64LE(ctx, val->offset); MARSHAL_U32LE(ctx, val->count); - MARSHAL_BYTES_ZEROCOPY(ctx, val->data, val->count); + for (int iov_i = 0; iov_i < val->data->iovcnt; iov_i++) + MARSHAL_BYTES_ZEROCOPY(ctx, val->data->iov[iov_i].iov_base, val->data->iov[iov_i].iov_len); return false; } @@ -4326,7 +4348,8 @@ static bool marshal_Rreaddir(struct lib9p_ctx *ctx, struct lib9p_msg_Rreaddir *v MARSHAL_U8LE(ctx, 41); MARSHAL_U16LE(ctx, val->tag); MARSHAL_U32LE(ctx, val->count); - MARSHAL_BYTES_ZEROCOPY(ctx, val->data, val->count); + for (int iov_i = 0; iov_i < val->data->iovcnt; iov_i++) + MARSHAL_BYTES_ZEROCOPY(ctx, val->data->iov[iov_i].iov_base, val->data->iov[iov_i].iov_len); return false; } @@ -4692,7 +4715,8 @@ static bool marshal_Rsread(struct lib9p_ctx *ctx, struct lib9p_msg_Rsread *val, MARSHAL_U8LE(ctx, 153); MARSHAL_U16LE(ctx, val->tag); MARSHAL_U32LE(ctx, val->count); - MARSHAL_BYTES_ZEROCOPY(ctx, val->data, val->count); + for (int iov_i = 0; iov_i < val->data->iovcnt; iov_i++) + MARSHAL_BYTES_ZEROCOPY(ctx, val->data->iov[iov_i].iov_base, val->data->iov[iov_i].iov_len); return false; } @@ -4720,7 +4744,8 @@ static bool marshal_Tswrite(struct lib9p_ctx *ctx, struct lib9p_msg_Tswrite *val MARSHAL_BYTES_ZEROCOPY(ctx, val->wname[i].utf8, val->wname[i].len); } MARSHAL_U32LE(ctx, val->count); - MARSHAL_BYTES_ZEROCOPY(ctx, val->data, val->count); + for (int iov_i = 0; iov_i < val->data->iovcnt; iov_i++) + MARSHAL_BYTES_ZEROCOPY(ctx, val->data->iov[iov_i].iov_base, val->data->iov[iov_i].iov_len); return false; } |