Util-Linux Archive on lore.kernel.org
 help / Atom feed
* patch: page size warning message
@ 2018-11-27 16:14 Noel Cragg
  2018-11-29 10:40 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: Noel Cragg @ 2018-11-27 16:14 UTC (permalink / raw)
  To: util-linux

[-- 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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: patch: page size warning message
  2018-11-27 16:14 patch: page size warning message Noel Cragg
@ 2018-11-29 10:40 ` Karel Zak
  0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2018-11-29 10:40 UTC (permalink / raw)
  To: Noel Cragg; +Cc: util-linux

On Tue, Nov 27, 2018 at 08:14:49AM -0800, Noel Cragg wrote:
> 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.


 Applied, thanks.


-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-27 16:14 patch: page size warning message Noel Cragg
2018-11-29 10:40 ` Karel Zak

Util-Linux Archive on lore.kernel.org

Archives are clonable: git clone --mirror https://lore.kernel.org/util-linux/0 util-linux/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 util-linux util-linux/ https://lore.kernel.org/util-linux \
		util-linux@vger.kernel.org util-linux@archiver.kernel.org
	public-inbox-index util-linux


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.util-linux


AGPL code for this site: git clone https://public-inbox.org/ public-inbox