From da20d860b28d7b3c1085964b784f58772c7ba263 Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 20 May 2018 21:59:12 +0000 Subject: driver & output: error info vector, error strings: initial implementation. --- include/ntux/ntux.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'include/ntux/ntux.h') diff --git a/include/ntux/ntux.h b/include/ntux/ntux.h index 7e9ca52..12cba1e 100644 --- a/include/ntux/ntux.h +++ b/include/ntux/ntux.h @@ -32,6 +32,23 @@ extern "C" { #define NTUX_DRIVER_VERSION 0x0010 #define NTUX_DRIVER_DRY_RUN 0x0020 +#define NTUX_DRIVER_ANNOTATE_ALWAYS 0x10000000 +#define NTUX_DRIVER_ANNOTATE_NEVER 0x20000000 +#define NTUX_DRIVER_ANNOTATE_FULL 0x40000000 + +/* error flags */ +#define NTUX_ERROR_TOP_LEVEL 0x0001 +#define NTUX_ERROR_NESTED 0x0002 +#define NTUX_ERROR_CHILD 0x0004 +#define NTUX_ERROR_CUSTOM 0x0008 +#define NTUX_ERROR_NATIVE 0x0010 + +enum ntux_custom_error { + NTUX_ERR_FLOW_ERROR, + NTUX_ERR_FLEE_ERROR, + NTUX_ERR_LDSO_INIT, +}; + enum ntux_cmd { NTUX_CMD_DEFAULT, NTUX_CMD_STAT, @@ -72,6 +89,11 @@ struct ntux_driver_ctx { void * any; }; +struct ntux_unit_ctx { + const char * const * path; + void * any; +}; + /* package info */ ntux_api const struct ntux_source_version * ntux_source_version(void); @@ -82,6 +104,7 @@ ntux_api void ntux_free_driver_ctx (struct ntux_driver_ctx *); /* utility api */ ntux_api int ntux_main (int, char **, char **); +ntux_api int ntux_output_error_vector (const struct ntux_driver_ctx *); #ifdef __cplusplus } -- cgit v1.2.3