lvmdiskscan: improve the output of this command
PATCH 1/1 lvmdiskscan: improve the output of this command
Signed-off-by Lidong Zhong <[email protected]>
--- tools/lvmdiskscan.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
tools/lvmdiskscan.c +4 -4
@@ -144,14 +144,14 @@ int lvmdiskscan(struct cmd_context *cmd, int argc __attribute__((unused)),/* Display totals */ if (!arg_count (cmd, lvmpartition_ARG)) {log_print ("%d disk%s" , - disks_found, disks_found ==1 ?"" :"s" ); + disks_found, disks_found <=1 ?"" :"s" );log_print ("%d partition%s" , - parts_found, parts_found ==1 ?"" :"s" ); + parts_found, parts_found <=1 ?"" :"s" ); }log_print ("%d LVM physical volume whole disk%s" , - pv_disks_found, pv_disks_found ==1 ?"" :"s" ); + pv_disks_found, pv_disks_found <=1 ?"" :"s" );log_print ("%d LVM physical volume%s" , - pv_parts_found, pv_parts_found ==1 ?"" :"s" ); + pv_parts_found, pv_parts_found <=1 ?"" :"s" );return ECMD_PROCESSED ; }
Signature · 1 line
2.1.2
PATCH 1/1 lvmdiskscan: improve the output of this command
tools/lvmdiskscan.c int lvmdiskscan(struct cmd_context *cmd, int argc __attribute__((unused)), · line 147
Quoted 3 lines · Lidong Zhong
tools/lvmdiskscan.c +1
-1log_print ("%d disk%s" , - disks_found, disks_found ==1 ?"" :"s" ); + disks_found, disks_found <=1 ?"" :"s" );
"No disks" is best. "0 disks" is a lazy alternative. "No disk" is also OK, but "0 disk" is wrong.
Alasdair