From cfc745ce0919e4a0fba3524df23c2eff95d901dd Mon Sep 17 00:00:00 2001 From: Luca Weiss Date: Fri, 20 Mar 2026 12:12:16 +0100 Subject: [PATCH 1/3] hexagonrpcd: apps_std: Print rw_mode in openat verbose log This is good to print for completeness, and can be useful when extending fopen to not just allow read operations. Signed-off-by: Luca Weiss --- hexagonrpcd/apps_std.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hexagonrpcd/apps_std.c b/hexagonrpcd/apps_std.c index 06519f8..ff4d5a7 100644 --- a/hexagonrpcd/apps_std.c +++ b/hexagonrpcd/apps_std.c @@ -197,9 +197,10 @@ static uint32_t apps_std_fopen_with_env(void *data, } #ifdef HEXAGONRPC_VERBOSE - printf("openat($%s, %s) -> %d\n", (const char *) inbufs[1].p, - (const char *) inbufs[3].p, - fd); + printf("openat($%s, %s, %c) -> %d\n", (const char *) inbufs[1].p, + (const char *) inbufs[3].p, + rw_mode, + fd); #endif *out = fd; From 196c72e80f249766167a55835b142e49b1a1baca Mon Sep 17 00:00:00 2001 From: Luca Weiss Date: Fri, 20 Mar 2026 13:06:14 +0100 Subject: [PATCH 2/3] listener: Print more info with "Unexpected buffer count" errors Make sure that the message is useful and doesn't just print a hex number like "1f050100". "Unexpected buffer count for method 31: 1f050100 (in: 5 vs 2, out: 1 vs 1)" is a much more descriptive and helpful error. Signed-off-by: Luca Weiss --- hexagonrpcd/listener.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hexagonrpcd/listener.c b/hexagonrpcd/listener.c index 932c54d..e298688 100644 --- a/hexagonrpcd/listener.c +++ b/hexagonrpcd/listener.c @@ -254,7 +254,10 @@ static int invoke_requested_procedure(size_t n_ifaces, if (REMOTE_SCALARS_INBUFS(sc) != in_count || REMOTE_SCALARS_OUTBUFS(sc) != out_count) { - fprintf(stderr, "Unexpected buffer count: %08x\n", sc); + fprintf(stderr, "Unexpected buffer count for method %u: %08x (in: %d vs %d, out: %d vs %d)\n", + method, sc, + REMOTE_SCALARS_INBUFS(sc), in_count, + REMOTE_SCALARS_OUTBUFS(sc), out_count); *result = AEE_EBADPARM; return 1; } From eec389f322f78d67c211e2181f1fdb7f04f3f67d Mon Sep 17 00:00:00 2001 From: Luca Weiss Date: Fri, 20 Mar 2026 16:23:47 +0100 Subject: [PATCH 3/3] Add .editorconfig EditorConfig is a file format and collection of text editor plugins for maintaining consistent coding styles between different editors and IDEs. Add a config for hexagonrpc with the preferred indentation style, and some other settings. Signed-off-by: Luca Weiss --- .editorconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..ddf69ea --- /dev/null +++ b/.editorconfig @@ -0,0 +1,10 @@ +# SPDX-License-Identifier: GPL-3.0-or-later + +root = true + +[*.{c,h}] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = tab +indent_size = 8