mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
libutil: add util_exit_code
zdev uses a particular set of exit codes -- In preparation for sharing some zdev udev code with other libraries, let's also create a libutil include to specify reusable exit codes. For now, let's just initialize it with the codes from zdev we care about. Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com> Reviewed-by: Jason J. Herne <jjherne@linux.ibm.com> Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
cce5f510c3
commit
a739584d6f
21
include/lib/util_exit_code.h
Normal file
21
include/lib/util_exit_code.h
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* @defgroup util_exit_code_h util_exit_code: General purpose exit codes
|
||||
* @{
|
||||
* @brief General purpose exit codes
|
||||
*
|
||||
* Copyright IBM Corp. 2022
|
||||
*
|
||||
* s390-tools is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the MIT license. See LICENSE for details.
|
||||
*/
|
||||
|
||||
#ifndef LIB_UTIL_EXIT_CODE_H
|
||||
#define LIB_UTIL_EXIT_CODE_H
|
||||
|
||||
typedef enum {
|
||||
UTIL_EXIT_OK = 0, /* Program finished successfully */
|
||||
UTIL_EXIT_RUNTIME_ERROR = 15, /* A run-time error occurred */
|
||||
UTIL_EXIT_OUT_OF_MEMORY = 22, /* Not enough available memory */
|
||||
} util_exit_code_t;
|
||||
|
||||
#endif /** LIB_UTIL_EXIT_CODE_H @} */
|
||||
Reference in New Issue
Block a user