diff options
author | NeilBrown <neilb@suse.de> | 2011-12-23 00:49:07 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-12-23 00:49:07 +0100 |
commit | 576d02800287e9d57d6f221cf418d07cdd7597a4 (patch) | |
tree | 26d49b29b266cd60771b388e72ed22c096975667 /Assemble.c | |
parent | Incremental: make sure container name appears in /dev (diff) | |
download | mdadm-576d02800287e9d57d6f221cf418d07cdd7597a4.tar.xz mdadm-576d02800287e9d57d6f221cf418d07cdd7597a4.zip |
Assemble: make some plurals conditional.
"1 devices" is ugly. Fix it.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Assemble.c')
-rw-r--r-- | Assemble.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -1614,12 +1614,14 @@ int assemble_container_content(struct supertype *st, int mdfd, if (verbose >= 0) { if (err) fprintf(stderr, Name - ": array %s now has %d devices", - chosen_name, working + preexist); + ": array %s now has %d device%s", + chosen_name, working + preexist, + working + preexist == 1 ? "":"s"); else fprintf(stderr, Name - ": Started %s with %d devices", - chosen_name, working + preexist); + ": Started %s with %d device%s", + chosen_name, working + preexist, + working + preexist == 1 ? "":"s"); if (preexist) fprintf(stderr, " (%d new)", working); if (expansion) @@ -1634,9 +1636,9 @@ int assemble_container_content(struct supertype *st, int mdfd, } else { if (verbose >= 0) fprintf(stderr, Name - ": %s assembled with %d devices but " + ": %s assembled with %d device%s but " "not started\n", - chosen_name, working); + chosen_name, working, working == 1 ? "":"s"); return 1; } } |