summaryrefslogtreecommitdiff
path: root/lib9p/srv.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib9p/srv.c')
-rw-r--r--lib9p/srv.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib9p/srv.c b/lib9p/srv.c
index 6d9d992..12124af 100644
--- a/lib9p/srv.c
+++ b/lib9p/srv.c
@@ -54,12 +54,12 @@ void lib9p_srv_acknowledge_flush(struct lib9p_srv_ctx *ctx) {
ctx->flush_acknowledged = true;
}
-#define req_debugf(fmt, ...) \
- debugf("cid=%zu: %s(tag=%"PRIu16"): " fmt, \
- cr_getcid(), \
- lib9p_msgtype_str(ctx->basectx.version, ctx->net_bytes[4]), \
- ctx->tag \
- __VA_OPT__(,) __VA_ARGS__)
+#define req_debugf(fmt, ...) \
+ log_debugf("cid=%zu: %s(tag=%"PRIu16"): " fmt, \
+ cr_getcid(), \
+ lib9p_msgtype_str(ctx->basectx.version, ctx->net_bytes[4]), \
+ ctx->tag \
+ __VA_OPT__(,) __VA_ARGS__)
/* structs ********************************************************************/
@@ -176,7 +176,7 @@ static inline bool srv_check_perm(struct srv_req *ctx, struct lib9p_srv_stat *st
return mode & action;
}
-[[gnu::unused]]
+[[maybe_unused]]
static struct lib9p_srv_userid *srv_userid_new(struct lib9p_s name
#if CONFIG_9P_ENABLE_9P2000_u || CONFIG_9P_ENABLE_9P2000_L
, lib9p_nuid_t num
@@ -361,7 +361,7 @@ static void srv_msglog(struct srv_req *req, enum lib9p_msg_type typ, void *hostm
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
#pragma GCC diagnostic ignored "-Wformat-extra-args"
- infof("%c %v", typ % 2 ? '<' : '>', lo_box_lib9p_msg_as_fmt_formatter(&req->basectx, typ, hostmsg));
+ log_infof("%c %v", typ % 2 ? '<' : '>', lo_box_lib9p_msg_as_fmt_formatter(&req->basectx, typ, hostmsg));
#pragma GCC diagnostic pop
}
@@ -373,7 +373,7 @@ static ssize_t srv_write_Rmsg(struct srv_req *req, struct lib9p_Rmsg_send_buf *r
return r;
}
-#define srv_nonrespond_errorf errorf
+#define srv_nonrespond_errorf log_errorf
static void srv_respond_error(struct srv_req *req) {
#if CONFIG_9P_ENABLE_9P2000_u || CONFIG_9P_ENABLE_9P2000_L
@@ -707,10 +707,10 @@ static inline void _srv_respond(struct srv_req *ctx, enum lib9p_msg_type resp_ty
/* handle_T* ******************************************************************/
-#define srv_handler_common(ctx, typ, req) \
- assert(ctx); \
- assert(req); \
- struct lib9p_msg_T##typ *_typecheck_req [[gnu::unused]] = req; \
+#define srv_handler_common(ctx, typ, req) \
+ assert(ctx); \
+ assert(req); \
+ struct lib9p_msg_T##typ *_typecheck_req [[maybe_unused]] = req; \
struct lib9p_msg_R##typ resp = { .tag = ctx->tag }
static void handle_Tversion(struct srv_req *ctx,