diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-07-06 09:14:01 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-07-09 11:11:21 +0200 |
commit | 2b59bf51a0fcd98f4bd56b8c47ce50357cf65c9a (patch) | |
tree | a3734788e349fa3032290c6a850b3eecd44fb4c1 /src/coredump | |
parent | 6c1abe880781b1e8145c53d5e959cd55c53ee245 (diff) | |
download | systemd-2b59bf51a0fcd98f4bd56b8c47ce50357cf65c9a.tar.gz |
tree-wide: add FORMAT_BYTES()
Diffstat (limited to 'src/coredump')
-rw-r--r-- | src/coredump/coredumpctl.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/coredump/coredumpctl.c b/src/coredump/coredumpctl.c index c1969d12f5..8261bff213 100644 --- a/src/coredump/coredumpctl.c +++ b/src/coredump/coredumpctl.c @@ -693,7 +693,6 @@ static int print_info(FILE *file, sd_journal *j, bool need_space) { if (filename) { const char *state = NULL, *color = NULL; uint64_t size = UINT64_MAX; - char buf[FORMAT_BYTES_MAX]; analyze_coredump_file(filename, &state, &color, &size); @@ -708,9 +707,8 @@ static int print_info(FILE *file, sd_journal *j, bool need_space) { ansi_normal()); if (size != UINT64_MAX) - fprintf(file, - " Disk Size: %s\n", - format_bytes(buf, sizeof(buf), size)); + fprintf(file, " Disk Size: %s\n", FORMAT_BYTES(size)); + } else if (coredump) fprintf(file, " Storage: journal\n"); else |