diff options
author | Jason King <[email protected]> | 2017-06-13 04:16:45 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-10-30 14:47:20 -0700 |
commit | f3c8c9e6f0e5e2ce6a1cba31db0422d8585e8c7c (patch) | |
tree | aa1c8b5ff93e1329ebf58139527a6546902a1e92 /include | |
parent | 47c8e7fd97d8406f3fe51882a4a2787103012a82 (diff) |
OpenZFS 640 - number_to_scaled_string is duplicated in several commands
Porting Notes:
- The OpenZFS patch added nicenum_scale() and nicenum() to a
library not used by ZFS. Rather than pull in a new dependency
the version of nicenum in lib/libzpool/util.c was simply
replaced with the new one.
Reviewed by: Sebastian Wiedenroth <[email protected]>
Reviewed by: Robert Mustacchi <[email protected]>
Reviewed by: Yuri Pankov <[email protected]>
Approved by: Dan McDonald <[email protected]>
Authored by: Jason King <[email protected]>
Ported-by: Brian Behlendorf <[email protected]>
OpenZFS-issue: https://www.illumos.org/issues/640
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/0a055120
Closes #6796
Diffstat (limited to 'include')
-rw-r--r-- | include/sys/zfs_context.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h index 90e7954a1..9da8ab561 100644 --- a/include/sys/zfs_context.h +++ b/include/sys/zfs_context.h @@ -626,6 +626,9 @@ extern void delay(clock_t ticks); #define ptob(x) ((x) * PAGESIZE) +#define NN_DIVISOR_1000 (1U << 0) +#define NN_NUMBUF_SZ (6) + extern uint64_t physmem; extern int highbit64(uint64_t i); @@ -639,7 +642,7 @@ extern void random_init(void); extern void random_fini(void); struct spa; -extern void nicenum(uint64_t num, char *buf); +extern void nicenum(uint64_t num, char *buf, size_t); extern void show_pool_stats(struct spa *); extern int set_global_var(char *arg); |