summaryrefslogtreecommitdiff
path: root/Assemble.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-12-23 10:49:07 +1100
committerNeilBrown <neilb@suse.de>2011-12-23 10:49:07 +1100
commit576d02800287e9d57d6f221cf418d07cdd7597a4 (patch)
tree26d49b29b266cd60771b388e72ed22c096975667 /Assemble.c
parenta408d66c4f4a658f62df547ea5e06b4a7afc5ec0 (diff)
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.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/Assemble.c b/Assemble.c
index 74fb6a32..c6ef736d 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -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;
}
}