|
root / utils / contract_probe / src / probe_helpers.c
probe_helpers.c C 18 lines 341 B
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
/*
 * probe_helpers.c — tiny helpers for the FFI probe
 *
 * Exposes errno readout and a strerror bridge so the Reef probe can report
 * the real kernel error when an FFI call fails.
 */

#include <errno.h>
#include <string.h>

int probe_errno(void) {
    return errno;
}

const char *probe_strerror(int err) {
    return strerror(err);
}