NetBSD Problem Report #51155
From paul@whooppee.com Fri May 20 13:10:14 2016
Return-Path: <paul@whooppee.com>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 3DCC67A227
for <gnats-bugs@gnats.NetBSD.org>; Fri, 20 May 2016 13:10:14 +0000 (UTC)
Message-Id: <20160520130938.BBF7C16E5F@pokey.whooppee.com>
Date: Fri, 20 May 2016 21:09:33 +0800 (PHT)
From: paul@whooppee.com
To: gnats-bugs@NetBSD.org
Subject: Formatting issue with 'swapctl -s'
X-Send-Pr-Version: 3.95
>Number: 51155
>Category: bin
>Synopsis: Formatting issue with 'swapctl -s'
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pgoyette
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri May 20 13:15:00 +0000 2016
>Closed-Date: Tue May 31 09:35:42 +0000 2016
>Last-Modified: Tue May 31 09:35:42 +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:/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,
>Release-Note:
>Audit-Trail:
From: "Paul Goyette" <pgoyette@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51155 CVS commit: src/sbin/swapctl
Date: Tue, 31 May 2016 09:34:25 +0000
Module Name: src
Committed By: pgoyette
Date: Tue May 31 09:34:25 UTC 2016
Modified Files:
src/sbin/swapctl: swaplist.c
Log Message:
Minor formatting change in swapctl -l as noted in my PR bin/51155
To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sbin/swapctl/swaplist.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Responsible-Changed-From-To: bin-bug-people->pgoyette
Responsible-Changed-By: pgoyette@NetBSD.org
Responsible-Changed-When: Tue, 31 May 2016 09:35:42 +0000
Responsible-Changed-Why:
It's mine.
State-Changed-From-To: open->closed
State-Changed-By: pgoyette@NetBSD.org
State-Changed-When: Tue, 31 May 2016 09:35:42 +0000
State-Changed-Why:
Fix committed.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.