From b7188e932e86137cacdf1ac74847d100b561c302 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 7 Nov 2007 13:46:34 +0100 Subject: [PATCH] mkswap: cleanup kB vs. KiB usage in error messages mkswap(8) man page is talking about KiB (2^10), but the mkswap binary uses kB (10^3) in error messages. That's strange. Let's use KiB everywhere. Signed-off-by: Karel Zak --- disk-utils/mkswap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c index 850236f9..bb126726 100644 --- a/disk-utils/mkswap.c +++ b/disk-utils/mkswap.c @@ -562,7 +562,7 @@ main(int argc, char ** argv) { } else if (PAGES > sz && !force) { fprintf(stderr, _("%s: error: " - "size %lu is larger than device size %lu\n"), + "size %lu KiB is larger than device size %lu KiB\n"), program_name, PAGES*(pagesize/1024), sz*(pagesize/1024)); exit(1); @@ -589,8 +589,8 @@ main(int argc, char ** argv) { if (PAGES < 10) { fprintf(stderr, - _("%s: error: swap area needs to be at least %ldkB\n"), - program_name, (long)(10 * pagesize / 1000)); + _("%s: error: swap area needs to be at least %ld KiB\n"), + program_name, (long)(10 * pagesize/1024)); usage(); } @@ -606,8 +606,8 @@ main(int argc, char ** argv) { if (PAGES > maxpages) { PAGES = maxpages; fprintf(stderr, - _("%s: warning: truncating swap area to %ldkB\n"), - program_name, PAGES * pagesize / 1000); + _("%s: warning: truncating swap area to %ld KiB\n"), + program_name, PAGES * pagesize / 1024); } if (opt_label && version == 0) { @@ -686,8 +686,8 @@ use the -f option to force it.\n"), goodpages = PAGES - badpages - 1; if ((long) goodpages <= 0) die(_("Unable to set up swap-space: unreadable")); - printf(_("Setting up swapspace version %d, size = %llu kB\n"), - version, (unsigned long long)goodpages * pagesize / 1000); + printf(_("Setting up swapspace version %d, size = %llu KiB\n"), + version, (unsigned long long)goodpages * pagesize / 1024); write_signature((version == 0) ? "SWAP-SPACE" : "SWAPSPACE2"); if (version == 1) -- 2.39.5