mirror of
https://github.com/systemd/systemd.git
synced 2026-08-02 22:20:20 +00:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user