diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-03-14 18:16:52 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-03-22 16:22:29 -0600 |
commit | 83b1f50d4d5d5fdba71e27a833e550f06262cdb5 (patch) | |
tree | 37817386b5c144d8da0aa86eb6f6dddac39c5918 | |
parent | d2ef29ecf234aceb81d300f276d1f5704617d94d (diff) |
lib9p: Declare lib9p_errorf as printf-like, fix found errors
-rw-r--r-- | lib9p/9p.generated.c | 148 | ||||
-rwxr-xr-x | lib9p/idl.gen | 2 | ||||
-rw-r--r-- | lib9p/include/lib9p/9p.h | 2 | ||||
-rw-r--r-- | lib9p/srv.c | 6 |
4 files changed, 79 insertions, 79 deletions
diff --git a/lib9p/9p.generated.c b/lib9p/9p.generated.c index fe042e6..567f450 100644 --- a/lib9p/9p.generated.c +++ b/lib9p/9p.generated.c @@ -2923,7 +2923,7 @@ static bool marshal_stat(struct _marshal_ctx *ctx, struct lib9p_stat *val) { static bool marshal_Tversion(struct _marshal_ctx *ctx, struct lib9p_msg_Tversion *val) { uint32_t needed_size = 13 + val->version.len; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Tversion", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -2943,7 +2943,7 @@ static bool marshal_Tversion(struct _marshal_ctx *ctx, struct lib9p_msg_Tversion static bool marshal_Rversion(struct _marshal_ctx *ctx, struct lib9p_msg_Rversion *val) { uint32_t needed_size = 13 + val->version.len; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rversion", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -2968,7 +2968,7 @@ static bool marshal_Tauth(struct _marshal_ctx *ctx, struct lib9p_msg_Tauth *val) } #endif /* CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_u */ if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Tauth", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -2995,7 +2995,7 @@ static bool marshal_Tauth(struct _marshal_ctx *ctx, struct lib9p_msg_Tauth *val) static bool marshal_Rauth(struct _marshal_ctx *ctx, struct lib9p_msg_Rauth *val) { uint32_t needed_size = 20; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rauth", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -3020,7 +3020,7 @@ static bool marshal_Tattach(struct _marshal_ctx *ctx, struct lib9p_msg_Tattach * } #endif /* CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_u */ if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Tattach", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -3048,7 +3048,7 @@ static bool marshal_Tattach(struct _marshal_ctx *ctx, struct lib9p_msg_Tattach * static bool marshal_Rattach(struct _marshal_ctx *ctx, struct lib9p_msg_Rattach *val) { uint32_t needed_size = 20; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rattach", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -3073,7 +3073,7 @@ static bool marshal_Rerror(struct _marshal_ctx *ctx, struct lib9p_msg_Rerror *va } #endif /* CONFIG_9P_ENABLE_9P2000_u */ if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rerror", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -3097,7 +3097,7 @@ static bool marshal_Rerror(struct _marshal_ctx *ctx, struct lib9p_msg_Rerror *va static bool marshal_Tflush(struct _marshal_ctx *ctx, struct lib9p_msg_Tflush *val) { uint32_t needed_size = 9; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Tflush", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -3115,7 +3115,7 @@ static bool marshal_Tflush(struct _marshal_ctx *ctx, struct lib9p_msg_Tflush *va static bool marshal_Rflush(struct _marshal_ctx *ctx, struct lib9p_msg_Rflush *val) { uint32_t needed_size = 7; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rflush", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -3135,7 +3135,7 @@ static bool marshal_Twalk(struct _marshal_ctx *ctx, struct lib9p_msg_Twalk *val) needed_size += 2 + val->wname[i].len; } if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Twalk", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -3159,7 +3159,7 @@ static bool marshal_Twalk(struct _marshal_ctx *ctx, struct lib9p_msg_Twalk *val) static bool marshal_Rwalk(struct _marshal_ctx *ctx, struct lib9p_msg_Rwalk *val) { uint32_t needed_size = 9 + (val->nwqid)*13; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rwalk", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -3184,7 +3184,7 @@ static bool marshal_Rwalk(struct _marshal_ctx *ctx, struct lib9p_msg_Rwalk *val) static bool marshal_Topen(struct _marshal_ctx *ctx, struct lib9p_msg_Topen *val) { uint32_t needed_size = 12; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Topen", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -3203,7 +3203,7 @@ static bool marshal_Topen(struct _marshal_ctx *ctx, struct lib9p_msg_Topen *val) static bool marshal_Ropen(struct _marshal_ctx *ctx, struct lib9p_msg_Ropen *val) { uint32_t needed_size = 24; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Ropen", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -3224,7 +3224,7 @@ static bool marshal_Ropen(struct _marshal_ctx *ctx, struct lib9p_msg_Ropen *val) static bool marshal_Tcreate(struct _marshal_ctx *ctx, struct lib9p_msg_Tcreate *val) { uint32_t needed_size = 18 + val->name.len; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Tcreate", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -3246,7 +3246,7 @@ static bool marshal_Tcreate(struct _marshal_ctx *ctx, struct lib9p_msg_Tcreate * static bool marshal_Rcreate(struct _marshal_ctx *ctx, struct lib9p_msg_Rcreate *val) { uint32_t needed_size = 24; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rcreate", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -3269,7 +3269,7 @@ static bool marshal_Rcreate(struct _marshal_ctx *ctx, struct lib9p_msg_Rcreate * static bool marshal_Tread(struct _marshal_ctx *ctx, struct lib9p_msg_Tread *val) { uint32_t needed_size = 23; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Tread", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -3289,7 +3289,7 @@ static bool marshal_Tread(struct _marshal_ctx *ctx, struct lib9p_msg_Tread *val) static bool marshal_Rread(struct _marshal_ctx *ctx, struct lib9p_msg_Rread *val) { uint32_t needed_size = 11 + val->count; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rread", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -3308,7 +3308,7 @@ static bool marshal_Rread(struct _marshal_ctx *ctx, struct lib9p_msg_Rread *val) static bool marshal_Twrite(struct _marshal_ctx *ctx, struct lib9p_msg_Twrite *val) { uint32_t needed_size = 23 + val->count; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Twrite", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -3329,7 +3329,7 @@ static bool marshal_Twrite(struct _marshal_ctx *ctx, struct lib9p_msg_Twrite *va static bool marshal_Rwrite(struct _marshal_ctx *ctx, struct lib9p_msg_Rwrite *val) { uint32_t needed_size = 11; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rwrite", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -3347,7 +3347,7 @@ static bool marshal_Rwrite(struct _marshal_ctx *ctx, struct lib9p_msg_Rwrite *va static bool marshal_Tclunk(struct _marshal_ctx *ctx, struct lib9p_msg_Tclunk *val) { uint32_t needed_size = 11; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Tclunk", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -3365,7 +3365,7 @@ static bool marshal_Tclunk(struct _marshal_ctx *ctx, struct lib9p_msg_Tclunk *va static bool marshal_Rclunk(struct _marshal_ctx *ctx, struct lib9p_msg_Rclunk *val) { uint32_t needed_size = 7; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rclunk", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -3382,7 +3382,7 @@ static bool marshal_Rclunk(struct _marshal_ctx *ctx, struct lib9p_msg_Rclunk *va static bool marshal_Tremove(struct _marshal_ctx *ctx, struct lib9p_msg_Tremove *val) { uint32_t needed_size = 11; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Tremove", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -3400,7 +3400,7 @@ static bool marshal_Tremove(struct _marshal_ctx *ctx, struct lib9p_msg_Tremove * static bool marshal_Rremove(struct _marshal_ctx *ctx, struct lib9p_msg_Rremove *val) { uint32_t needed_size = 7; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rremove", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -3419,7 +3419,7 @@ static bool marshal_Rremove(struct _marshal_ctx *ctx, struct lib9p_msg_Rremove * static bool marshal_Tstat(struct _marshal_ctx *ctx, struct lib9p_msg_Tstat *val) { uint32_t needed_size = 11; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Tstat", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -3442,7 +3442,7 @@ static bool marshal_Rstat(struct _marshal_ctx *ctx, struct lib9p_msg_Rstat *val) } #endif /* CONFIG_9P_ENABLE_9P2000_u */ if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rstat", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -3512,7 +3512,7 @@ static bool marshal_Twstat(struct _marshal_ctx *ctx, struct lib9p_msg_Twstat *va } #endif /* CONFIG_9P_ENABLE_9P2000_u */ if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Twstat", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -3578,7 +3578,7 @@ static bool marshal_Twstat(struct _marshal_ctx *ctx, struct lib9p_msg_Twstat *va static bool marshal_Rwstat(struct _marshal_ctx *ctx, struct lib9p_msg_Rwstat *val) { uint32_t needed_size = 7; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rwstat", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -3597,7 +3597,7 @@ static bool marshal_Rwstat(struct _marshal_ctx *ctx, struct lib9p_msg_Rwstat *va static bool marshal_Topenfd(struct _marshal_ctx *ctx, struct lib9p_msg_Topenfd *val) { uint32_t needed_size = 12; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Topenfd", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -3616,7 +3616,7 @@ static bool marshal_Topenfd(struct _marshal_ctx *ctx, struct lib9p_msg_Topenfd * static bool marshal_Ropenfd(struct _marshal_ctx *ctx, struct lib9p_msg_Ropenfd *val) { uint32_t needed_size = 28; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Ropenfd", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -3640,7 +3640,7 @@ static bool marshal_Ropenfd(struct _marshal_ctx *ctx, struct lib9p_msg_Ropenfd * static bool marshal_Rlerror(struct _marshal_ctx *ctx, struct lib9p_msg_Rlerror *val) { uint32_t needed_size = 11; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rlerror", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -3658,7 +3658,7 @@ static bool marshal_Rlerror(struct _marshal_ctx *ctx, struct lib9p_msg_Rlerror * static bool marshal_Tstatfs(struct _marshal_ctx *ctx, struct lib9p_msg_Tstatfs *val) { uint32_t needed_size = 11; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Tstatfs", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -3676,7 +3676,7 @@ static bool marshal_Tstatfs(struct _marshal_ctx *ctx, struct lib9p_msg_Tstatfs * static bool marshal_Rstatfs(struct _marshal_ctx *ctx, struct lib9p_msg_Rstatfs *val) { uint32_t needed_size = 67; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rstatfs", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -3702,7 +3702,7 @@ static bool marshal_Rstatfs(struct _marshal_ctx *ctx, struct lib9p_msg_Rstatfs * static bool marshal_Tlopen(struct _marshal_ctx *ctx, struct lib9p_msg_Tlopen *val) { uint32_t needed_size = 15; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Tlopen", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -3721,7 +3721,7 @@ static bool marshal_Tlopen(struct _marshal_ctx *ctx, struct lib9p_msg_Tlopen *va static bool marshal_Rlopen(struct _marshal_ctx *ctx, struct lib9p_msg_Rlopen *val) { uint32_t needed_size = 24; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rlopen", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -3742,7 +3742,7 @@ static bool marshal_Rlopen(struct _marshal_ctx *ctx, struct lib9p_msg_Rlopen *va static bool marshal_Tlcreate(struct _marshal_ctx *ctx, struct lib9p_msg_Tlcreate *val) { uint32_t needed_size = 25 + val->name.len; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Tlcreate", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -3765,7 +3765,7 @@ static bool marshal_Tlcreate(struct _marshal_ctx *ctx, struct lib9p_msg_Tlcreate static bool marshal_Rlcreate(struct _marshal_ctx *ctx, struct lib9p_msg_Rlcreate *val) { uint32_t needed_size = 24; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rlcreate", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -3786,7 +3786,7 @@ static bool marshal_Rlcreate(struct _marshal_ctx *ctx, struct lib9p_msg_Rlcreate static bool marshal_Tsymlink(struct _marshal_ctx *ctx, struct lib9p_msg_Tsymlink *val) { uint32_t needed_size = 19 + val->name.len + val->symtgt.len; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Tsymlink", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -3809,7 +3809,7 @@ static bool marshal_Tsymlink(struct _marshal_ctx *ctx, struct lib9p_msg_Tsymlink static bool marshal_Rsymlink(struct _marshal_ctx *ctx, struct lib9p_msg_Rsymlink *val) { uint32_t needed_size = 20; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rsymlink", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -3829,7 +3829,7 @@ static bool marshal_Rsymlink(struct _marshal_ctx *ctx, struct lib9p_msg_Rsymlink static bool marshal_Tmknod(struct _marshal_ctx *ctx, struct lib9p_msg_Tmknod *val) { uint32_t needed_size = 29 + val->name.len; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Tmknod", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -3853,7 +3853,7 @@ static bool marshal_Tmknod(struct _marshal_ctx *ctx, struct lib9p_msg_Tmknod *va static bool marshal_Rmknod(struct _marshal_ctx *ctx, struct lib9p_msg_Rmknod *val) { uint32_t needed_size = 20; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rmknod", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -3873,7 +3873,7 @@ static bool marshal_Rmknod(struct _marshal_ctx *ctx, struct lib9p_msg_Rmknod *va static bool marshal_Trename(struct _marshal_ctx *ctx, struct lib9p_msg_Trename *val) { uint32_t needed_size = 17 + val->name.len; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Trename", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -3894,7 +3894,7 @@ static bool marshal_Trename(struct _marshal_ctx *ctx, struct lib9p_msg_Trename * static bool marshal_Rrename(struct _marshal_ctx *ctx, struct lib9p_msg_Rrename *val) { uint32_t needed_size = 7; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rrename", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -3911,7 +3911,7 @@ static bool marshal_Rrename(struct _marshal_ctx *ctx, struct lib9p_msg_Rrename * static bool marshal_Treadlink(struct _marshal_ctx *ctx, struct lib9p_msg_Treadlink *val) { uint32_t needed_size = 11; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Treadlink", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -3929,7 +3929,7 @@ static bool marshal_Treadlink(struct _marshal_ctx *ctx, struct lib9p_msg_Treadli static bool marshal_Rreadlink(struct _marshal_ctx *ctx, struct lib9p_msg_Rreadlink *val) { uint32_t needed_size = 9 + val->target.len; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rreadlink", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -3948,7 +3948,7 @@ static bool marshal_Rreadlink(struct _marshal_ctx *ctx, struct lib9p_msg_Rreadli static bool marshal_Tgetattr(struct _marshal_ctx *ctx, struct lib9p_msg_Tgetattr *val) { uint32_t needed_size = 19; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Tgetattr", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -3967,7 +3967,7 @@ static bool marshal_Tgetattr(struct _marshal_ctx *ctx, struct lib9p_msg_Tgetattr static bool marshal_Rgetattr(struct _marshal_ctx *ctx, struct lib9p_msg_Rgetattr *val) { uint32_t needed_size = 160; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rgetattr", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -4006,7 +4006,7 @@ static bool marshal_Rgetattr(struct _marshal_ctx *ctx, struct lib9p_msg_Rgetattr static bool marshal_Tsetattr(struct _marshal_ctx *ctx, struct lib9p_msg_Tsetattr *val) { uint32_t needed_size = 67; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Tsetattr", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -4033,7 +4033,7 @@ static bool marshal_Tsetattr(struct _marshal_ctx *ctx, struct lib9p_msg_Tsetattr static bool marshal_Rsetattr(struct _marshal_ctx *ctx, struct lib9p_msg_Rsetattr *val) { uint32_t needed_size = 7; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rsetattr", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -4050,7 +4050,7 @@ static bool marshal_Rsetattr(struct _marshal_ctx *ctx, struct lib9p_msg_Rsetattr static bool marshal_Txattrwalk(struct _marshal_ctx *ctx, struct lib9p_msg_Txattrwalk *val) { uint32_t needed_size = 17 + val->name.len; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Txattrwalk", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -4071,7 +4071,7 @@ static bool marshal_Txattrwalk(struct _marshal_ctx *ctx, struct lib9p_msg_Txattr static bool marshal_Rxattrwalk(struct _marshal_ctx *ctx, struct lib9p_msg_Rxattrwalk *val) { uint32_t needed_size = 15; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rxattrwalk", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -4089,7 +4089,7 @@ static bool marshal_Rxattrwalk(struct _marshal_ctx *ctx, struct lib9p_msg_Rxattr static bool marshal_Txattrcreate(struct _marshal_ctx *ctx, struct lib9p_msg_Txattrcreate *val) { uint32_t needed_size = 25 + val->name.len; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Txattrcreate", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -4111,7 +4111,7 @@ static bool marshal_Txattrcreate(struct _marshal_ctx *ctx, struct lib9p_msg_Txat static bool marshal_Rxattrcreate(struct _marshal_ctx *ctx, struct lib9p_msg_Rxattrcreate *val) { uint32_t needed_size = 7; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rxattrcreate", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -4128,7 +4128,7 @@ static bool marshal_Rxattrcreate(struct _marshal_ctx *ctx, struct lib9p_msg_Rxat static bool marshal_Treaddir(struct _marshal_ctx *ctx, struct lib9p_msg_Treaddir *val) { uint32_t needed_size = 23; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Treaddir", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -4148,7 +4148,7 @@ static bool marshal_Treaddir(struct _marshal_ctx *ctx, struct lib9p_msg_Treaddir static bool marshal_Rreaddir(struct _marshal_ctx *ctx, struct lib9p_msg_Rreaddir *val) { uint64_t needed_size = 11 + val->count; if (needed_size > (uint64_t)(ctx->ctx->max_msg_size)) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rreaddir", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -4167,7 +4167,7 @@ static bool marshal_Rreaddir(struct _marshal_ctx *ctx, struct lib9p_msg_Rreaddir static bool marshal_Tfsync(struct _marshal_ctx *ctx, struct lib9p_msg_Tfsync *val) { uint32_t needed_size = 15; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Tfsync", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -4186,7 +4186,7 @@ static bool marshal_Tfsync(struct _marshal_ctx *ctx, struct lib9p_msg_Tfsync *va static bool marshal_Rfsync(struct _marshal_ctx *ctx, struct lib9p_msg_Rfsync *val) { uint32_t needed_size = 7; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rfsync", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -4203,7 +4203,7 @@ static bool marshal_Rfsync(struct _marshal_ctx *ctx, struct lib9p_msg_Rfsync *va static bool marshal_Tlock(struct _marshal_ctx *ctx, struct lib9p_msg_Tlock *val) { uint32_t needed_size = 38 + val->client_id.len; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Tlock", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -4228,7 +4228,7 @@ static bool marshal_Tlock(struct _marshal_ctx *ctx, struct lib9p_msg_Tlock *val) static bool marshal_Rlock(struct _marshal_ctx *ctx, struct lib9p_msg_Rlock *val) { uint32_t needed_size = 8; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rlock", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -4246,7 +4246,7 @@ static bool marshal_Rlock(struct _marshal_ctx *ctx, struct lib9p_msg_Rlock *val) static bool marshal_Tgetlock(struct _marshal_ctx *ctx, struct lib9p_msg_Tgetlock *val) { uint32_t needed_size = 34 + val->client_id.len; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Tgetlock", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -4270,7 +4270,7 @@ static bool marshal_Tgetlock(struct _marshal_ctx *ctx, struct lib9p_msg_Tgetlock static bool marshal_Rgetlock(struct _marshal_ctx *ctx, struct lib9p_msg_Rgetlock *val) { uint32_t needed_size = 30 + val->client_id.len; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rgetlock", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -4293,7 +4293,7 @@ static bool marshal_Rgetlock(struct _marshal_ctx *ctx, struct lib9p_msg_Rgetlock static bool marshal_Tlink(struct _marshal_ctx *ctx, struct lib9p_msg_Tlink *val) { uint32_t needed_size = 17 + val->name.len; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Tlink", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -4314,7 +4314,7 @@ static bool marshal_Tlink(struct _marshal_ctx *ctx, struct lib9p_msg_Tlink *val) static bool marshal_Rlink(struct _marshal_ctx *ctx, struct lib9p_msg_Rlink *val) { uint32_t needed_size = 7; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rlink", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -4331,7 +4331,7 @@ static bool marshal_Rlink(struct _marshal_ctx *ctx, struct lib9p_msg_Rlink *val) static bool marshal_Tmkdir(struct _marshal_ctx *ctx, struct lib9p_msg_Tmkdir *val) { uint32_t needed_size = 21 + val->name.len; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Tmkdir", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -4353,7 +4353,7 @@ static bool marshal_Tmkdir(struct _marshal_ctx *ctx, struct lib9p_msg_Tmkdir *va static bool marshal_Rmkdir(struct _marshal_ctx *ctx, struct lib9p_msg_Rmkdir *val) { uint32_t needed_size = 20; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rmkdir", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -4373,7 +4373,7 @@ static bool marshal_Rmkdir(struct _marshal_ctx *ctx, struct lib9p_msg_Rmkdir *va static bool marshal_Trenameat(struct _marshal_ctx *ctx, struct lib9p_msg_Trenameat *val) { uint32_t needed_size = 19 + val->oldname.len + val->newname.len; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Trenameat", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -4396,7 +4396,7 @@ static bool marshal_Trenameat(struct _marshal_ctx *ctx, struct lib9p_msg_Trename static bool marshal_Rrenameat(struct _marshal_ctx *ctx, struct lib9p_msg_Rrenameat *val) { uint32_t needed_size = 7; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rrenameat", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -4413,7 +4413,7 @@ static bool marshal_Rrenameat(struct _marshal_ctx *ctx, struct lib9p_msg_Rrename static bool marshal_Tunlinkat(struct _marshal_ctx *ctx, struct lib9p_msg_Tunlinkat *val) { uint32_t needed_size = 17 + val->name.len; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Tunlinkat", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -4434,7 +4434,7 @@ static bool marshal_Tunlinkat(struct _marshal_ctx *ctx, struct lib9p_msg_Tunlink static bool marshal_Runlinkat(struct _marshal_ctx *ctx, struct lib9p_msg_Runlinkat *val) { uint32_t needed_size = 7; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Runlinkat", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -4453,7 +4453,7 @@ static bool marshal_Runlinkat(struct _marshal_ctx *ctx, struct lib9p_msg_Runlink static bool marshal_Tsession(struct _marshal_ctx *ctx, struct lib9p_msg_Tsession *val) { uint32_t needed_size = 15; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Tsession", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -4471,7 +4471,7 @@ static bool marshal_Tsession(struct _marshal_ctx *ctx, struct lib9p_msg_Tsession static bool marshal_Rsession(struct _marshal_ctx *ctx, struct lib9p_msg_Rsession *val) { uint32_t needed_size = 7; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rsession", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -4491,7 +4491,7 @@ static bool marshal_Tsread(struct _marshal_ctx *ctx, struct lib9p_msg_Tsread *va needed_size += 2 + val->wname[i].len; } if (needed_size > (uint64_t)(ctx->ctx->max_msg_size)) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Tsread", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -4514,7 +4514,7 @@ static bool marshal_Tsread(struct _marshal_ctx *ctx, struct lib9p_msg_Tsread *va static bool marshal_Rsread(struct _marshal_ctx *ctx, struct lib9p_msg_Rsread *val) { uint64_t needed_size = 11 + val->count; if (needed_size > (uint64_t)(ctx->ctx->max_msg_size)) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rsread", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); @@ -4536,7 +4536,7 @@ static bool marshal_Tswrite(struct _marshal_ctx *ctx, struct lib9p_msg_Tswrite * needed_size += 2 + val->wname[i].len; } if (needed_size > (uint64_t)(ctx->ctx->max_msg_size)) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Tswrite", ctx->ctx->version ? "negotiated" : "client", ctx->ctx->max_msg_size); @@ -4561,7 +4561,7 @@ static bool marshal_Tswrite(struct _marshal_ctx *ctx, struct lib9p_msg_Tswrite * static bool marshal_Rswrite(struct _marshal_ctx *ctx, struct lib9p_msg_Rswrite *val) { uint32_t needed_size = 11; if (needed_size > ctx->ctx->max_msg_size) { - lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)", + lib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")", "Rswrite", ctx->ctx->version ? "negotiated" : "server", ctx->ctx->max_msg_size); diff --git a/lib9p/idl.gen b/lib9p/idl.gen index db5f37d..5fb2dd3 100755 --- a/lib9p/idl.gen +++ b/lib9p/idl.gen @@ -1170,7 +1170,7 @@ LM_ALWAYS_INLINE static void unmarshal_8(struct _unmarshal_ctx *ctx, uint64_t *o ) ret += "\tif (needed_size > ctx->ctx->max_msg_size) {\n" if isinstance(typ, idl.Message): # SPECIAL (disable for stat) - ret += f'\t\tlib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%PRIu32)",\n' + ret += f'\t\tlib9p_errorf(ctx->ctx, LINUX_ERANGE, "%s message too large to marshal into %s limit (limit=%"PRIu32")",\n' ret += f'\t\t\t"{typ.name}",\n' ret += f'\t\t\tctx->ctx->version ? "negotiated" : "{'client' if typ.msgid % 2 == 0 else 'server'}",\n' ret += "\t\t\tctx->ctx->max_msg_size);\n" diff --git a/lib9p/include/lib9p/9p.h b/lib9p/include/lib9p/9p.h index 7724fc8..44b5410 100644 --- a/lib9p/include/lib9p/9p.h +++ b/lib9p/include/lib9p/9p.h @@ -58,7 +58,7 @@ bool lib9p_ctx_has_error(struct lib9p_ctx *ctx); /** Write an static error into ctx, return -1. */ int lib9p_error(struct lib9p_ctx *ctx, uint32_t linux_errno, char const *msg); /** Write a printf-style error into ctx, return -1. */ -int lib9p_errorf(struct lib9p_ctx *ctx, uint32_t linux_errno, char const *fmt, ...); +int lib9p_errorf(struct lib9p_ctx *ctx, uint32_t linux_errno, char const *fmt, ...) [[gnu::format(printf, 3, 4)]]; /* main T-message functions ***************************************************/ diff --git a/lib9p/srv.c b/lib9p/srv.c index 932cd4d..2475baf 100644 --- a/lib9p/srv.c +++ b/lib9p/srv.c @@ -81,7 +81,7 @@ struct _srv_fidinfo { uint8_t flags; uint32_t iounit; size_t dir_idx; - uint32_t dir_off; + uint64_t dir_off; }; #define NAME fidmap @@ -566,7 +566,7 @@ static void handle_Tversion(struct _lib9p_srv_req *ctx, if (req->max_msg_size < min_msg_size) { lib9p_errorf(&ctx->ctx.basectx, LINUX_EDOM, "requested max_msg_size is less than minimum for %s (%"PRIu32" < %"PRIu32")", - version, req->max_msg_size, min_msg_size); + lib9p_version_str(version), req->max_msg_size, min_msg_size); return; } @@ -935,7 +935,7 @@ static void handle_Tread(struct _lib9p_srv_req *ctx, idx = fidinfo->dir_idx; else { lib9p_errorf(&ctx->ctx.basectx, - LINUX_EINVAL, "invalid offset (must be 0 or %"PRIu32"): %"PRIu32, + LINUX_EINVAL, "invalid offset (must be 0 or %"PRIu64"): %"PRIu64, fidinfo->dir_off, req->offset); return; } |