tree-wide: add FORMAT_BYTES()

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-07-09 11:11:21 +02:00
parent 6c1abe8807
commit 2b59bf51a0
25 changed files with 170 additions and 258 deletions
+2 -4
View File
@@ -385,10 +385,8 @@ static int action_dissect(DissectedImage *m, LoopDevice *d) {
if (ioctl(d->fd, BLKGETSIZE64, &size) < 0)
log_debug_errno(errno, "Failed to query size of loopback device: %m");
else if (arg_json_format_flags & JSON_FORMAT_OFF) {
char s[FORMAT_BYTES_MAX];
printf(" Size: %s\n", format_bytes(s, sizeof(s), size));
}
else if (arg_json_format_flags & JSON_FORMAT_OFF)
printf(" Size: %s\n", FORMAT_BYTES(size));
if (arg_json_format_flags & JSON_FORMAT_OFF)
putc('\n', stdout);