mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 10:51:54 -04:00
Don't print free space in "status" if the info is not available
This commit is contained in:
parent
327bae506d
commit
966abd6f16
1 changed files with 9 additions and 2 deletions
|
|
@ -205,8 +205,15 @@ int state_status(struct snapraid_state* state)
|
|||
printf("%8.1f", (double)wasted / GIGA);
|
||||
}
|
||||
printf("%8" PRIu64, disk_file_size / GIGA);
|
||||
printf("%8" PRIu64, (disk_block_max - disk_block_count) * (uint64_t)state->block_size / GIGA);
|
||||
printf(" %3u%%", perc(disk_block_count, disk_block_max));
|
||||
|
||||
if (disk_block_max == 0 && disk_block_count == 0) {
|
||||
/* if the disk is empty and we don't have the free space info */
|
||||
printf(" -");
|
||||
printf(" - ");
|
||||
} else {
|
||||
printf("%8" PRIu64, (disk_block_max - disk_block_count) * (uint64_t)state->block_size / GIGA);
|
||||
printf(" %3u%%", perc(disk_block_count, disk_block_max));
|
||||
}
|
||||
printf(" %s\n", disk->name);
|
||||
|
||||
msg_tag("summary:disk_file_count:%s:%u\n", disk->name, disk_file_count);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue