This patch adds a reply to the file write ubus call:
{
"code": 0,
"bytes": 9
}Where code is the return code of the operation and bytes is the number of bytes written. Getting a response is helpful since it lets the user know if the write operation was successful, knowing the number of bytes written allows for further error checking. Can this patch be merged into the rpcd repo? Index: rpcd/file.c =================================================================== --- rpcd.orig/file.c 2016-05-17 22:07:03.679363210 +0000 +++ rpcd/file.c 2016-05-17 22:08:15.627440178 +0000 @@ -315,6 +315,12 @@ close(fd); sync(); + blob_buf_init(&buf, 0); + blobmsg_add_u32 (&buf, "code", rv); + blobmsg_add_u32 (&buf, "bytes", (int)data_len); + ubus_send_reply (ctx, req, buf.head); + blob_buf_free(&buf); + if (rv) return rpc_errno_status();
_______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
