]> git.sesse.net Git - bcachefs-tools-debian/blob - include/linux/string_helpers.h
rust: bump rpassword to v7.x
[bcachefs-tools-debian] / include / linux / string_helpers.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_STRING_HELPERS_H_
3 #define _LINUX_STRING_HELPERS_H_
4
5 #include <linux/ctype.h>
6 #include <linux/string.h>
7 #include <linux/types.h>
8
9
10 /* Descriptions of the types of units to
11  * print in */
12 enum string_size_units {
13         STRING_UNITS_10,        /* use powers of 10^3 (standard SI) */
14         STRING_UNITS_2,         /* use binary powers of 2^10 */
15 };
16
17 int string_get_size(u64 size, u64 blk_size, enum string_size_units units,
18                     char *buf, int len);
19
20 #endif