3 #include <linux/kernel.h>
4 #include <linux/time64.h>
6 unsigned long convert_unit(unsigned long value, char *unit)
28 int unit_number__scnprintf(char *buf, size_t size, u64 n)
30 char unit[4] = "BKMG";
33 while (((n / 1024) > 1) && (i < 3)) {
38 return scnprintf(buf, size, "%" PRIu64 "%c", n, unit[i]);