diff options
author | Karel Zak | 2015-02-24 12:04:22 +0100 |
---|---|---|
committer | Karel Zak | 2015-02-24 12:04:22 +0100 |
commit | 30b294c491b4577d5f0e5c94f17cf9e36a8ecb72 (patch) | |
tree | 087407622ab14e28164f8f6447e036eadcc2fb43 /include/strutils.h | |
parent | lib/strutils: move parse_switch() from setterm(1) to library (diff) | |
download | kernel-qcow2-util-linux-30b294c491b4577d5f0e5c94f17cf9e36a8ecb72.tar.gz kernel-qcow2-util-linux-30b294c491b4577d5f0e5c94f17cf9e36a8ecb72.tar.xz kernel-qcow2-util-linux-30b294c491b4577d5f0e5c94f17cf9e36a8ecb72.zip |
lib/strutils: extend parse_switch() to accept more options
* allow to specify more 0|1 pairs
* allow to specify error message
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'include/strutils.h')
-rw-r--r-- | include/strutils.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/strutils.h b/include/strutils.h index ee8c7cbda..847a4219f 100644 --- a/include/strutils.h +++ b/include/strutils.h @@ -36,7 +36,7 @@ extern void strtotimeval_or_err(const char *str, struct timeval *tv, extern int isdigit_string(const char *str); -extern int parse_switch(const char *arg, const char *a, const char *b); +extern int parse_switch(const char *arg, const char *errmesg, ...); #ifndef HAVE_MEMPCPY extern void *mempcpy(void *restrict dest, const void *restrict src, size_t n); |