Skip to contentSkip to conversation

patch: page size warning message

PATCH Applied Noel Cragg 2 participants 2 messages Nov 27, 2018 – Nov 29, 2018 Util-Linux package

lore
Share & tools
lore

Noel Cragg

author
#0 lore raw

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.

disk-utils/mkswap.c +1 -1
index cbb99dccb..28a139d45 100644
@@ -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;
maintainer Applied
#1 lore raw
Quoted 10 lines · Noel Cragg

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.

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com