From c2fcffd5adb52cba8fa0ac96f636bf2a25167142 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Fri, 4 Oct 2013 22:44:28 +0200 Subject: [PATCH] mkfs.minix: properly pluralize four messages MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reported-by: Petr Písař Signed-off-by: Benno Schulenberg --- disk-utils/mkfs.minix.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/disk-utils/mkfs.minix.c b/disk-utils/mkfs.minix.c index 639ace7bc5..dd2cf43caa 100644 --- a/disk-utils/mkfs.minix.c +++ b/disk-utils/mkfs.minix.c @@ -541,8 +541,8 @@ static void setup_tables(void) { err(MKFS_EX_ERROR, _("%s: unable to allocate buffer for inodes"), device_name); memset(inode_buffer,0, get_inode_buffer_size()); - printf(_("%lu inodes\n"), inodes); - printf(_("%lu blocks\n"), zones); + printf(P_("%lu inode\n", "%lu inodes\n", inodes), inodes); + printf(P_("%lu block\n", "%lu blocks\n", zones), zones); printf(_("Firstdatazone=%jd (%jd)\n"), get_first_zone(), first_zone_data()); printf(_("Zonesize=%zu\n"), (size_t) MINIX_BLOCK_SIZE << get_zone_size()); printf(_("Maxsize=%zu\n\n"),get_max_size()); @@ -614,10 +614,8 @@ static void check_blocks(void) { badblocks++; currently_testing++; } - if (badblocks > 1) - printf(_("%d bad blocks\n"), badblocks); - else if (badblocks == 1) - printf(_("one bad block\n")); + if (badblocks > 0) + printf(P_("%d bad block\n", "%d bad blocks\n", badblocks), badblocks); } static void get_list_blocks(char *filename) { @@ -640,10 +638,8 @@ static void get_list_blocks(char *filename) { } fclose(listfile); - if(badblocks > 1) - printf(_("%d bad blocks\n"), badblocks); - else if (badblocks == 1) - printf(_("one bad block\n")); + if (badblocks > 0) + printf(P_("%d bad block\n", "%d bad blocks\n", badblocks), badblocks); } int main(int argc, char ** argv) { -- 2.47.3