Author SHA1 Message Date
Richard Acayan 598b591ae9 tests: add unit test for hexagonrpc function
The hexagonrpc function is getting very complex and deserves its own
unit test. Add a unit test for the hexagonrpc function.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
2026-08-24 17:40:17 -04:00
Richard Acayan ab26a830a6 libhexagonrpc: remove legacy APIs
There is now no user of the interp2 APIs in the source tree.
Remove them.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
2026-08-24 17:40:17 -04:00
Richard Acayan 605b90ac7e hexagonrpcd: iobuffer: depend on new hexagonrpc header
The iobuffer decoder depends on REMOTE_SCALARS_INBUFS to know the number
of encoded input buffers without knowing the exact length of the encoded
input. Depend on the new hexagonrpc header which is being switched to.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
2026-08-24 17:40:17 -04:00
Richard Acayan 5218213f66 tests: depend on stdlib and new libhexagonrpc header file
Both the hexagonfs and iobuffer tests need malloc and free. The iobuffer
test also needs REMOTE_SCALARS_MAKE. Include stdlib directly and include
the new libhexagonrpc header file.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
2026-08-24 17:40:17 -04:00
Richard Acayan 4210f6d851 hexagonrpcd: listener: remove interp2 support
With the remote method definitions converted to interp4, the interp2
definitions are no longer needed. Replace the interp2 definitions with
the interp4 definitions recently added.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
2026-08-24 17:40:17 -04:00
Richard Acayan 9da2b5ec0c hexagonrpcd: interface: switch adsp_default_listener to interp4
The new interp4 definitions add support for more remote methods with
sequences of multi-byte data, sequences of sequences, plain integers
interleaved with sequences, and constant-size data other than 32-bit
integers. The new definitions are complex and can't fit in a simple
macro. Switch the chre_slpi interface to interp4, split it into a header
and source file, and update the users.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
2026-08-24 17:40:17 -04:00
Richard Acayan 0b2b5d245e hexagonrpcd: interface: switch adsp_listener to interp4
The new interp4 definitions add support for more remote methods with
sequences of multi-byte data, sequences of sequences, plain integers
interleaved with sequences, and constant-size data other than 32-bit
integers. The new definitions are complex and can't fit in a simple
macro. Switch the adsp_listener interface to interp4, split it into a
header and source file, and update the users.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
2026-08-24 17:40:17 -04:00
Richard Acayan 0390727bca hexagonrpcd: interface: switch apps_mem interface to interp4
The new interp4 definitions add support for more remote methods with
sequences of multi-byte data, sequences of sequences, plain integers
interleaved with sequences, and constant-size data other than 32-bit
integers. The new definitions are complex and can't fit in a simple
macro. Switch the apps_mem interface to interp4, split it into a header
and source file, and add the new definitions to the implementation.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
2026-08-24 17:40:17 -04:00
Richard Acayan 2469c21ca7 hexagonrpcd: interface: switch apps_std interface to interp4
The new interp4 definitions add support for more remote methods with
sequences of multi-byte data, sequences of sequences, plain integers
interleaved with sequences, and constant-size data other than 32-bit
integers. The new definitions are complex and can't fit in a simple
macro. Switch the chre_slpi interface to interp4, split it into a header
and source file, and add the new definitions to the implementation.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
2026-08-24 17:40:17 -04:00
Richard Acayan e53998a12e chrecd: interface: switch chre_slpi interface to interp4
The new interp4 definitions add support for more remote methods with
sequences of multi-byte data, sequences of sequences, plain integers
interleaved with sequences, and constant-size data other than 32-bit
integers. The new definitions are complex and can't fit in a simple
macro. Switch the chre_slpi interface to interp4, split it into a header
and source file, and update the users.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
2026-08-24 17:40:17 -04:00
Richard Acayan 1dacea0470 libhexagonrpc: interface: switch remotectl interface to interp4
The new interp4 definitions add support for more remote methods with
sequences of multi-byte data, sequences of sequences, plain integers
interleaved with sequences, and constant-size data other than 32-bit
integers. The new definitions are complex and can't fit in a simple
macro. Switch the remotectl interface to interp4, split it into a header
and source file, and update the users.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
2026-08-24 17:40:17 -04:00
Richard Acayan 8cbdeb5ebf hexagonrpcd: listener: decode interp4 method definitions
To use interp4 method definitions for everything, the reverse tunnel
needs to be updated to understand them. Add support for the new method
definitions, preferring them if present.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
2026-08-24 17:40:17 -04:00
Richard Acayan 7d71de1ebc hexagonrpcd: iobuffer: use size_t for buffer sizes
The FastRPC peer can encode a 32-bit size for a variable-length
sequence. The members of the sequence can have a size more than 1,
potentially using more than 32 bits. Expand the buffer size to a size_t.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
2026-08-24 17:40:17 -04:00
Richard Acayan 85d96d4df6 chrecd: use hexagonrpc handle API
The handle API is a high-level interface that puts all error messages in
the same buffer. Use the handle API to open and close the chre_slpi
remote interface for code deduplication.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
2026-08-24 17:40:17 -04:00
Richard Acayan 034d35a6ed hexagonrpcd: use hexagonrpc handle API for default listener
The handle API is a high-level interface that puts all error messages in
the same buffer. Use the handle API to open and close the
adsp_default_listener remote interface.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
2026-08-24 17:40:17 -04:00
Richard Acayan 4fd9efcde2 libhexagonrpc: add remote interface open and close API
The code for opening and closing a remote interface with an error is
duplicated in hexagonrpcd and chrecd. Like the remotectl interface
itself, the error handling is useful for most FastRPC applications. Add
a new API for opening and closing remote interfaces with error checking.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
2026-08-24 17:40:17 -04:00
Richard Acayan ea3e58d9e6 libhexagonrpc: add version 4 of method definition format
The current method definition format has a few issues. There is no way
to represent `apps_std_mkdir(in string dir, in long long mode)` because
it has a sequence before a fixed-length argument. The fixed-length
arguments are passed in 4-byte units, making large fixed-length arrays
awkward. Sequences of sequences cannot be represented.

Add a new version of the remote method definition to support more
methods, with sequences of sequences, mixed input and output arguments,
and fixed-length data structures greater than 32 bits.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
2026-08-24 17:40:17 -04:00
Richard Acayan 78e2a94251 fastrpc: hexagonrpcd: listener: support more than 31 methods
When there are more than 31 methods in a remote interface, an extended
method ID is added to the primary input buffer when the ID is greater
than 30. Select the method from the primary input buffer when the ID is
greater than 30 in the reverse tunnel.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
2026-08-24 17:40:17 -04:00
Richard Acayan daab6ff190 fastrpc: libhexagonrpc: add error API
When the kernel side of FastRPC fails, the return value is -1 and errno
is set. When the remote side of FastRPC fails, the return value is an
AEE error code. It is not specialized for the reverse tunnel. Add an
error API that can convert the return value to a string-based error.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
2026-08-24 17:40:17 -04:00
Richard Acayan 435ed1cd68 meson.build: bump to version 0.5.0
No breaking changes

New features:
- systemd unit files
- Android service files and Soong build files
- print access mode in apps_std_fopen_with_env
- run tests in CI and add .editorconfig
- print more detailed error when amount of I/O buffers don't match
  definition

Fixes:
- convert to little endian for I/O buffer coding
2026-08-13 10:48:55 -04:00
Yumi Yukimura dd9ac70c02 data: Add Android service definitions
Signed-off-by: Yumi Yukimura <me.cafebabe@gmail.com>
2026-03-31 15:05:18 +08:00
Yumi Yukimura ffd300c27e hexagonrpcd: Include endian.h where needed
hardware/mainline/qcom/hexagonrpc/hexagonrpcd/iobuffer.c:43:15: error: use of undeclared identifier 'le32toh'
   43 |                 ctx->size = le32toh(ctx->size);
      |                             ^
hardware/mainline/qcom/hexagonrpc/hexagonrpcd/iobuffer.c:218:23: error: use of undeclared identifier 'htole32'
  218 |                 *(uint32_t *) ptr = htole32(outbufs[i].s);
      |                                     ^
2 errors generated.

Signed-off-by: Yumi Yukimura <me.cafebabe@gmail.com>
2026-03-31 15:05:18 +08:00
Yumi Yukimura 5c4e11360d Add Android.bp build rules
Signed-off-by: Yumi Yukimura <me.cafebabe@gmail.com>
2026-03-31 15:05:18 +08:00
Luca Weiss eec389f322 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 <luca.weiss@fairphone.com>
2026-03-29 17:03:32 +02:00
Luca Weiss 196c72e80f 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 <luca.weiss@fairphone.com>
2026-03-29 17:03:32 +02:00
Luca Weiss cfc745ce09 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 <luca.weiss@fairphone.com>
2026-03-20 17:11:46 +01:00
J. Neuschäfer 93f3467dcf iobuffer: Fix encoding/decoding on big-endian
It is possible (albeit unusual) to boot a big-endian system on a
smartphone, and it's generally good to have portable code.

le32toh and htole32 are a glibc extension that is also implemented by
musl-libc, uclibc-ng, and bionic.

Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
2025-12-31 16:06:35 +01:00
Achill Gilgenast c4109b4502 data: Add systemd system services
Signed-off-by: Achill Gilgenast <achill@achill.org>
2025-11-20 15:13:10 +01:00
J. Neuschäfer 5d3cef4e5b CI: Run tests
The tests don't require access to Hexagon hardware, they currently pass,
and running them will provide a better assurance against regressions.

Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
2025-09-22 13:03:46 +02:00
61 changed files with 2700 additions and 962 deletions

No files matched your search

+10
View File
@@ -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
+5 -1
View File
@@ -1,4 +1,4 @@
name: Buildtest
name: Build+test
on:
pull_request:
@@ -27,3 +27,7 @@ jobs:
run: |
meson setup build
ninja -C build
- name: run tests
run: |
ninja -C build test
+10
View File
@@ -0,0 +1,10 @@
cc_defaults {
name: "hexagonrpc_defaults",
cflags: [
"-Wno-unused-parameter",
],
header_libs: [
"device_kernel_headers",
"hexagonrpc_headers",
],
}
+12
View File
@@ -0,0 +1,12 @@
cc_binary {
name: "chrecd",
defaults: ["hexagonrpc_defaults"],
srcs: [
"interfaces.c",
"main.c",
],
shared_libs: [
"libhexagonrpc",
],
vendor: true,
}
+39
View File
@@ -0,0 +1,39 @@
/*
* Context Hub Runtime Environment interface - method definitions
*
* Copyright (C) 2025 HexagonRPC Contributors
*
* This file is part of HexagonRPC.
*
* HexagonRPC is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <libhexagonrpc/hexagonrpc.h>
const struct hrpc_method_def_interp4 chre_slpi_start_thread_def = {
.msg_id = 0,
.n_args = 0,
.args = NULL,
.n_inner_types = 0,
.inner_types = NULL,
};
const struct hrpc_method_def_interp4 chre_slpi_wait_on_thread_exit_def = {
.msg_id = 1,
.n_args = 0,
.args = NULL,
.n_inner_types = 0,
.inner_types = NULL,
};
+41
View File
@@ -0,0 +1,41 @@
/*
* Context Hub Runtime Environment interface - API
*
* Copyright (C) 2025 HexagonRPC Contributors
*
* This file is part of HexagonRPC.
*
* HexagonRPC is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef INTERFACE_CHRE_SLPI_H
#define INTERFACE_CHRE_SLPI_H
#include <stdint.h>
#include <libhexagonrpc/hexagonrpc.h>
extern struct hrpc_method_def_interp4 chre_slpi_start_thread_def;
static inline int chre_slpi_start_thread(int fd, uint32_t hdl)
{
return hexagonrpc(&chre_slpi_start_thread_def, fd, hdl);
}
extern struct hrpc_method_def_interp4 chre_slpi_wait_on_thread_exit_def;
static inline int chre_slpi_wait_on_thread_exit(int fd, uint32_t hdl)
{
return hexagonrpc(&chre_slpi_wait_on_thread_exit_def, fd, hdl);
}
#endif /* INTERFACE_CHRE_SLPI_H */
-30
View File
@@ -1,30 +0,0 @@
/*
* Context Hub Runtime Environment interface
*
* Copyright (C) 2023 The Sensor Shell Contributors
*
* This file is part of sensh.
*
* Sensh is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef INTERFACE_CHRE_SLPI_DEF
#define INTERFACE_CHRE_SLPI_DEF
#include <libhexagonrpc/interface.h>
HEXAGONRPC_DEFINE_REMOTE_METHOD(0, chre_slpi_start_thread, 0, 0, 0, 0)
HEXAGONRPC_DEFINE_REMOTE_METHOD(1, chre_slpi_wait_on_thread_exit, 0, 0, 0, 0)
#endif /* INTERFACE_CHRE_SLPI_DEF */
+11 -74
View File
@@ -20,105 +20,42 @@
*/
#include <errno.h>
#include <libhexagonrpc/fastrpc.h>
#include <libhexagonrpc/interfaces/remotectl.def>
#include <libhexagonrpc/handle.h>
#include <libhexagonrpc/session.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "interfaces/chre_slpi.def"
/* TODO move these to libhexagonrpc since most clients use them */
static int remotectl_open(int fd, char *name, struct fastrpc_context **ctx, void (*err_cb)(const char *err))
{
uint32_t handle;
int32_t dlret;
char err[256];
int ret;
ret = fastrpc2(&remotectl_open_def, fd, REMOTECTL_HANDLE,
strlen(name) + 1, name,
&handle,
&dlret,
256, err);
if (ret == -1) {
err_cb(strerror(errno));
return ret;
}
if (dlret == -5) {
err_cb(err);
return dlret;
}
*ctx = fastrpc_create_context(fd, handle);
return ret;
}
static int remotectl_close(struct fastrpc_context *ctx, void (*err_cb)(const char *err))
{
uint32_t dlret;
char err[256];
int ret;
ret = fastrpc2(&remotectl_close_def, ctx->fd, REMOTECTL_HANDLE,
ctx->handle,
&dlret,
256, err);
if (ret == -1) {
err_cb(strerror(errno));
return ret;
}
fastrpc_destroy_context(ctx);
return ret;
}
static void remotectl_err(const char *err)
{
fprintf(stderr, "Could not remotectl: %s\n", err);
}
static int chre_slpi_start_thread(struct fastrpc_context *ctx)
{
return fastrpc(&chre_slpi_start_thread_def, ctx);
}
static int chre_slpi_wait_on_thread_exit(struct fastrpc_context *ctx)
{
return fastrpc(&chre_slpi_wait_on_thread_exit_def, ctx);
}
#include "interface/chre_slpi.h"
int main()
{
struct fastrpc_context *ctx;
uint32_t hdl;
char err[256];
int fd, ret;
fd = hexagonrpc_fd_from_env();
if (fd == -1)
return 1;
ret = remotectl_open(fd, "chre_slpi", &ctx, remotectl_err);
if (ret)
ret = hexagonrpc_open(fd, "chre_slpi", &hdl, 256, err);
if (ret) {
fprintf(stderr, "Could not open CHRE remote interface: %s\n", err);
return 1;
}
ret = chre_slpi_start_thread(ctx);
ret = chre_slpi_start_thread(fd, hdl);
if (ret) {
fprintf(stderr, "Could not start CHRE\n");
goto err;
}
ret = chre_slpi_wait_on_thread_exit(ctx);
ret = chre_slpi_wait_on_thread_exit(fd, hdl);
if (ret) {
fprintf(stderr, "Could not wait for CHRE thread\n");
goto err;
}
err:
remotectl_close(ctx, remotectl_err);
hexagonrpc_close(fd, hdl);
}
+1 -1
View File
@@ -1,5 +1,5 @@
executable('chrecd',
'interfaces.c',
'interface/chre_slpi.c',
'main.c',
c_args : cflags,
include_directories : include,
+20
View File
@@ -0,0 +1,20 @@
prebuilt_etc {
name: "hexagonrpcd-adsp-rootpd.rc",
src: "hexagonrpcd-adsp-rootpd.rc",
sub_dir: "init",
vendor: true,
}
prebuilt_etc {
name: "hexagonrpcd-adsp-sensorspd.rc",
src: "hexagonrpcd-adsp-sensorspd.rc",
sub_dir: "init",
vendor: true,
}
prebuilt_etc {
name: "hexagonrpcd-sdsp.rc",
src: "hexagonrpcd-sdsp.rc",
sub_dir: "init",
vendor: true,
}
+5
View File
@@ -0,0 +1,5 @@
service vendor.hexagonrpcd-adsp-rootpd /vendor/bin/hexagonrpcd -f /dev/fastrpc-adsp -d adsp -R /vendor/etc/hexagonrpcd-root
class core
user system
group system
stdio_to_kmsg
+18
View File
@@ -0,0 +1,18 @@
[Unit]
Description=Server for FastRPC remote procedure calls from Qualcomm ADSP - RootPD
Conflicts=suspend.target
Before=suspend.target
# FIXME: Remove this once hexagonrpcd can serve rootpd on the ADSP
# of the SDM845 devices
ConditionPathExists=!/dev/fastrpc-sdsp
ConditionPathExists=/dev/fastrpc-adsp
[Service]
ExecStart=@bindir@/hexagonrpcd -f /dev/fastrpc-adsp -d adsp
Restart=always
RestartSec=3
User=fastrpc
Group=fastrpc
[Install]
WantedBy=multi-user.target
+4
View File
@@ -0,0 +1,4 @@
service vendor.hexagonrpcd-adsp-sensorspd /vendor/bin/hexagonrpcd -f /dev/fastrpc-adsp -d adsp -s -R /vendor/etc/hexagonrpcd-root
class core
user system
group system
@@ -0,0 +1,17 @@
[Unit]
Description=Server for FastRPC remote procedure calls from Qualcomm ADSP - sensorspd
Conflicts=suspend.target
Before=suspend.target
# This service shouldn't be run on devices with an SDSP
ConditionPathExists=!/dev/fastrpc-sdsp
ConditionPathExists=/dev/fastrpc-adsp
[Service]
ExecStart=@bindir@/hexagonrpcd -f /dev/fastrpc-adsp -d adsp -s
Restart=always
RestartSec=3
User=fastrpc
Group=fastrpc
[Install]
WantedBy=multi-user.target
+4
View File
@@ -0,0 +1,4 @@
service vendor.hexagonrpcd-sdsp /vendor/bin/hexagonrpcd -f /dev/fastrpc-sdsp -d sdsp -s -R /vendor/etc/hexagonrpcd-root
class core
user system
group system
+13
View File
@@ -0,0 +1,13 @@
[Unit]
Description=Server for FastRPC remote procedure calls from Qualcomm SDSP
ConditionPathExists=/dev/fastrpc-sdsp
[Service]
ExecStart=@bindir@/hexagonrpcd -f /dev/fastrpc-sdsp -d sdsp -s
Restart=always
RestartSec=3
User=fastrpc
Group=fastrpc
[Install]
WantedBy=multi-user.target
+15
View File
@@ -0,0 +1,15 @@
systemd_units = [
'hexagonrpcd-adsp-rootpd.service',
'hexagonrpcd-adsp-sensorspd.service',
'hexagonrpcd-sdsp.service',
]
foreach unit : systemd_units
configure_file(
input: unit + '.in',
output: unit,
configuration: { 'bindir': get_option('prefix') / get_option('bindir') },
install: true,
install_dir: get_option('libdir') / 'systemd/system',
)
endforeach
+23
View File
@@ -0,0 +1,23 @@
cc_binary {
name: "hexagonrpcd",
defaults: ["hexagonrpc_defaults"],
srcs: [
"aee_error.c",
"apps_mem.c",
"apps_std.c",
"hexagonfs.c",
"hexagonfs_mapped.c",
"hexagonfs_plat_subtype_name.c",
"hexagonfs_virt_dir.c",
"interfaces.c",
"iobuffer.c",
"listener.c",
"localctl.c",
"rpcd.c",
"rpcd_builder.c",
],
shared_libs: [
"libhexagonrpc",
],
vendor: true,
}
+5 -7
View File
@@ -20,15 +20,15 @@
*/
#include <inttypes.h>
#include <libhexagonrpc/error.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <misc/fastrpc.h>
#include <sys/ioctl.h>
#include "aee_error.h"
#include "apps_mem.h"
#include "interfaces/apps_mem.def"
#include "interface/apps_mem.h"
#include "listener.h"
// See fastrpc.git/src/apps_mem_imp.c
@@ -71,11 +71,9 @@ static uint32_t apps_mem_request_map64(void *data,
mmap.size = first_in->len;
ret = ioctl(ctx->fd, FASTRPC_IOCTL_MMAP, &mmap);
if (ret == -1) {
perror("Memory map failed");
return AEE_EFAILED;
} else if (ret) {
fprintf(stderr, "Memory map failed: %s\n", aee_strerror[ret]);
if (ret) {
fprintf(stderr, "Memory map failed: %s\n",
hexagonrpc_strerror(ret));
return ret;
}
+6 -5
View File
@@ -20,15 +20,15 @@
*/
#include <errno.h>
#include <libhexagonrpc/error.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include "aee_error.h"
#include "interfaces/apps_std.def"
#include "hexagonfs.h"
#include "interface/apps_std.h"
#include "iobuffer.h"
#include "listener.h"
@@ -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;
Loaded 20 of 61 files, more files were not shown because too many files have changed in this diff. Show more