diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/common.h | 3 | ||||
| -rw-r--r-- | include/vsprintf.h | 10 |
2 files changed, 10 insertions, 3 deletions
diff --git a/include/common.h b/include/common.h index d17a2b2642..f993e4bef3 100644 --- a/include/common.h +++ b/include/common.h @@ -310,9 +310,6 @@ int ulz4fn(const void *src, size_t srcn, void *dst, size_t *dstn); /* lib/vsprintf.c */ #include <vsprintf.h> -/* lib/strmhz.c */ -char * strmhz(char *buf, unsigned long hz); - /* * STDIO based functions (can always be used) */ diff --git a/include/vsprintf.h b/include/vsprintf.h index d1740a378e..56844dd2de 100644 --- a/include/vsprintf.h +++ b/include/vsprintf.h @@ -212,4 +212,14 @@ void print_grouped_ull(unsigned long long int_val, int digits); bool str2off(const char *p, loff_t *num); bool str2long(const char *p, ulong *num); + +/** + * strmhz() - Convert a value to a Hz string + * + * This creates a string indicating the number of MHz of a value. For example, + * 2700000 produces "2.7". + * @buf: Buffer to hold output string, which must be large enough + * @hz: Value to convert + */ +char *strmhz(char *buf, unsigned long hz); #endif |
