summaryrefslogtreecommitdiff
path: root/src/basic/parse-util.h
diff options
context:
space:
mode:
authorFilipe Brandenburger <filbranden@google.com>2015-10-12 23:55:31 -0700
committerFilipe Brandenburger <filbranden@google.com>2015-10-27 17:56:26 -0700
commit28cb17ef0281efc3a46e5d0e702b0b0ddeaafaa4 (patch)
tree0507db70ef6d0dc882718121ed334103f43c148b /src/basic/parse-util.h
parent4fc66acb93d6f0002263e2dfaefa46e272ae0c9c (diff)
parse-util: Introduce new parse_range function
This function will be useful for CPUAffinity settings that involve ranges of CPUs. Make it generic and include test coverage to prevent regressions.
Diffstat (limited to 'src/basic/parse-util.h')
-rw-r--r--src/basic/parse-util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/basic/parse-util.h b/src/basic/parse-util.h
index 72a619c38f..0e56848e26 100644
--- a/src/basic/parse-util.h
+++ b/src/basic/parse-util.h
@@ -33,6 +33,7 @@ int parse_pid(const char *s, pid_t* ret_pid);
int parse_mode(const char *s, mode_t *ret);
int parse_size(const char *t, uint64_t base, uint64_t *size);
+int parse_range(const char *t, unsigned *lower, unsigned *upper);
#define FORMAT_BYTES_MAX 8
char *format_bytes(char *buf, size_t l, uint64_t t);