util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Noel Cragg <noel@squeezehead.com>
To: util-linux@vger.kernel.org
Subject: patch: page size warning message
Date: Tue, 27 Nov 2018 08:14:49 -0800	[thread overview]
Message-ID: <20181127161449.azz7fwn4elhh6wao@localhost> (raw)

[-- Attachment #1: Type: text/plain, Size: 483 bytes --]

I ran into this while experimenting with alternate page sizes:

  # mkswap -f --label swap -p 2048 swapfile 65536
  mkswap: Using user-specified page size 0, instead of the system value 4096
  mkswap: swapfile: warning: wiping old swap signature.
  Setting up swapspace version 1, size = 64 MiB (67106816 bytes)
  LABEL=swap, UUID=d0521a3a-8594-4d4b-a79b-5259aeac8d45

Note "user-specified page size 0" in the above output.  I've attached
a trival patch to fix that warning message.

[-- Attachment #2: pagesize-warning.diff --]
[-- Type: text/x-diff, Size: 520 bytes --]

diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c
index cbb99dccb..28a139d45 100644
--- a/disk-utils/mkswap.c
+++ b/disk-utils/mkswap.c
@@ -82,7 +82,7 @@ static void init_signature_page(struct mkswap_control *ctl)
 		if (ctl->user_pagesize != kernel_pagesize)
 			warnx(_("Using user-specified page size %d, "
 				"instead of the system value %d"),
-				ctl->pagesize, kernel_pagesize);
+				ctl->user_pagesize, kernel_pagesize);
 		ctl->pagesize = ctl->user_pagesize;
 	} else
 		ctl->pagesize = kernel_pagesize;

             reply	other threads:[~2018-11-27 16:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-27 16:14 Noel Cragg [this message]
2018-11-29 10:40 ` patch: page size warning message Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181127161449.azz7fwn4elhh6wao@localhost \
    --to=noel@squeezehead.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).