summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKarel Zak2017-06-26 13:47:04 +0200
committerKarel Zak2017-06-26 13:47:04 +0200
commitdfdb1ca8186cfc84ad95d5e356334ce8633a28f7 (patch)
tree37b568d27fa12194ec63f8122901fc8b2fd7bf1d /include
parentMerge branch 'usage-part1' of https://github.com/rudimeier/util-linux (diff)
parentmisc: fix optutils.h related exit codes (diff)
downloadkernel-qcow2-util-linux-dfdb1ca8186cfc84ad95d5e356334ce8633a28f7.tar.gz
kernel-qcow2-util-linux-dfdb1ca8186cfc84ad95d5e356334ce8633a28f7.tar.xz
kernel-qcow2-util-linux-dfdb1ca8186cfc84ad95d5e356334ce8633a28f7.zip
Merge branch 'fix-exit-codes' of https://github.com/rudimeier/util-linux
* 'fix-exit-codes' of https://github.com/rudimeier/util-linux: misc: fix optutils.h related exit codes misc: fix xalloc.h related exit codes misc: fix more strutils related exit codes lib: fix strutils.h, remove STRTOXX_EXIT_CODE misc: fix some broken exit codes
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);