7 #include <linux/kernel.h> 8 #include <linux/time64.h> 15 char *s = strchr(str, i->
tag);
18 unsigned long int value;
21 value = strtoul(str, &endptr, 10);
25 if (value > ULONG_MAX / i->
mult)
33 return (
unsigned long) -1;
60 char unit[4] =
"BKMG";
63 while (((n / 1024) > 1) && (i < 3)) {
68 return scnprintf(buf, size,
"%" PRIu64
"%c", n, unit[i]);
unsigned long convert_unit(unsigned long value, char *unit)
static int str(yyscan_t scanner, int token)
int unit_number__scnprintf(char *buf, size_t size, u64 n)
unsigned long parse_tag_value(const char *str, struct parse_tag *tags)