diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-04-12 17:42:29 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-04-12 17:42:29 +0100 |
commit | 1d95423e86a664f2c9488d8ffc29a0a83eed68b8 (patch) | |
tree | 600fb2eef74fae8f61d3abe6705224129c243a12 /tools/libxl/libxl_utils.h | |
parent | aa8978e2d94470c0563f91df4c504446df82b9c6 (diff) | |
download | xen-1d95423e86a664f2c9488d8ffc29a0a83eed68b8.tar.gz xen-1d95423e86a664f2c9488d8ffc29a0a83eed68b8.tar.bz2 xen-1d95423e86a664f2c9488d8ffc29a0a83eed68b8.zip |
libxl: Expose libxl_report_exitstatus
xl would like to use libxl_report_exitstatus, so expose it in
libxl_utils.h to avoid having to write it twice. Also, give it a
"level" argument to set the loglevel of the resulting message.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_utils.h')
-rw-r--r-- | tools/libxl/libxl_utils.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/libxl/libxl_utils.h b/tools/libxl/libxl_utils.h index fe8b975fcd..4c04c46dea 100644 --- a/tools/libxl/libxl_utils.h +++ b/tools/libxl/libxl_utils.h @@ -48,5 +48,16 @@ pid_t libxl_fork(struct libxl_ctx *ctx); int libxl_pipe(struct libxl_ctx *ctx, int pipes[2]); /* Just like fork(2), pipe(2), but log errors. */ +void libxl_report_child_exitstatus(struct libxl_ctx *ctx, int level, + const char *what, pid_t pid, int status); + /* treats all exit statuses as errors; if that's not what you want, + * check status yourself first */ + +/* log levels: */ +#define XL_LOG_DEBUG 3 +#define XL_LOG_INFO 2 +#define XL_LOG_WARNING 1 +#define XL_LOG_ERROR 0 + #endif |