summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRuediger Meier2017-06-22 22:15:14 +0200
committerRuediger Meier2017-06-22 22:40:12 +0200
commit9c8b9fbacc043164c5ac8adc2b5bdc25402e912c (patch)
treef429c5d472c668b3e4fea28f7ac6ad8eae8b71a5 /include
parentmisc: fix some broken exit codes (diff)
downloadkernel-qcow2-util-linux-9c8b9fbacc043164c5ac8adc2b5bdc25402e912c.tar.gz
kernel-qcow2-util-linux-9c8b9fbacc043164c5ac8adc2b5bdc25402e912c.tar.xz
kernel-qcow2-util-linux-9c8b9fbacc043164c5ac8adc2b5bdc25402e912c.zip
lib: fix strutils.h, remove STRTOXX_EXIT_CODE
As discussed on the mailing list. We fix all places where the non-working define STRTOXX_EXIT_CODE was used. Regarding tunelp, also see 7e3c80a7. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'include')
-rw-r--r--include/strutils.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/include/strutils.h b/include/strutils.h
index 28c1b5e5d..be1ba6737 100644
--- a/include/strutils.h
+++ b/include/strutils.h
@@ -9,11 +9,8 @@
#include <stdio.h>
#include <errno.h>
-/* default strtoxx_or_err() exit code */
-#ifndef STRTOXX_EXIT_CODE
-# define STRTOXX_EXIT_CODE EXIT_FAILURE
-#endif
-
+/* initialize a custom exit code for all *_or_err functions */
+extern void strutils_set_exitcode(int exit_code);
extern int parse_size(const char *str, uintmax_t *res, int *power);
extern int strtosize(const char *str, uintmax_t *res);