From aa155824d30744ffecea6e321a310e23352d9e9f Mon Sep 17 00:00:00 2001 From: Max Wash Date: Sat, 21 Mar 2026 10:51:17 +0000 Subject: [PATCH] lib: xpc: add a nr_written output to xpc_msg_write --- lib/libxpc/include/xpc/msg.h | 3 ++- lib/libxpc/msg.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/libxpc/include/xpc/msg.h b/lib/libxpc/include/xpc/msg.h index 3ae443e..debd15c 100644 --- a/lib/libxpc/include/xpc/msg.h +++ b/lib/libxpc/include/xpc/msg.h @@ -39,7 +39,8 @@ extern kern_status_t xpc_msg_write( const xpc_msg_t *msg, size_t offset, const void *p, - size_t count); + size_t count, + size_t *nr_written); extern kern_status_t xpc_msg_reply( const xpc_msg_t *msg, diff --git a/lib/libxpc/msg.c b/lib/libxpc/msg.c index ec4b7d2..81d13c3 100644 --- a/lib/libxpc/msg.c +++ b/lib/libxpc/msg.c @@ -106,17 +106,17 @@ kern_status_t xpc_msg_write( const xpc_msg_t *msg, size_t offset, const void *p, - size_t count) + size_t count, + size_t *nr_written) { kern_iovec_t iov = IOVEC(p, count); - size_t w = 0; return msg_write( msg->msg_sender.e_channel, msg->msg_sender.e_msg, offset, &iov, 1, - &w); + nr_written); } kern_status_t xpc_msg_reply(