NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/51155: Formatting issue with 'swapctl -s'



>Number:         51155
>Category:       bin
>Synopsis:       Formatting issue with 'swapctl -s'
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 20 13:15:00 +0000 2016
>Originator:     Paul Goyette
>Release:        NetBSD 7.99.29
>Organization:
+------------------+--------------------------+------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:      |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org |
+------------------+--------------------------+------------------------+
>Environment:
	
	
System: NetBSD pokey.whooppee.com 7.99.29 NetBSD 7.99.29 (POKEY 2016-05-02 22:46:42) #1: Tue May 3 10:00:39 PHT 2016 paul%pokey.whooppee.com@localhost:/build/netbsd-local/obj/amd64/sys/arch/amd64/compile/POKEY amd64
Architecture: x86_64
Machine: amd64
>Description:
	'swapctl -s' output uses an equal-sign '=' to separate the 'blocks
	allocated' field from the 'blocks used' field, but it uses a comma
	',' between the 'blocks used' and 'blocks available' fields.
	
>How-To-Repeat:
	#  swapctl -s
	total: 83886264 blocks allocated = 0 blocks used, 83886264 blocks available
	
>Fix:
	
	Apply following patch (modulo tabs vs spaces)

Index: swaplist.c
===================================================================
RCS file: /cvsroot/src/sbin/swapctl/swaplist.c,v
retrieving revision 1.17
diff -u -p -r1.17 swaplist.c
--- swaplist.c  6 Apr 2009 12:38:35 -0000       1.17
+++ swaplist.c  20 May 2016 13:07:26 -0000
@@ -187,7 +187,7 @@ list_swap(int pri, int kflag, int pflag,
                        (void)printf("total: %s allocated = %s used, %s available.\n",
                                szbuf, usbuf, avbuf);
                } else {
-                   printf("total: %ld %s allocated = %ld %s used, "
+                   printf("total: %ld %s allocated, %ld %s used, "
                           "%ld %s available\n",
                    (long)(dbtoqb(totalsize) / blocksize), suff,
                    (long)(dbtoqb(totalinuse) / blocksize), suff,

>Unformatted:
 	
 	


Home | Main Index | Thread Index | Old Index