NetBSD Problem Report #50255
From www@NetBSD.org Fri Sep 18 10:28:29 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(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 B0CA9A6531
for <gnats-bugs@gnats.NetBSD.org>; Fri, 18 Sep 2015 10:28:29 +0000 (UTC)
Message-Id: <20150918102828.07A76A6558@mollari.NetBSD.org>
Date: Fri, 18 Sep 2015 10:28:28 +0000 (UTC)
From: henning.petersen@t-online.de
Reply-To: henning.petersen@t-online.de
To: gnats-bugs@NetBSD.org
Subject: Remove unused flag from acpidump.c and acpidump.8
X-Send-Pr-Version: www-1.0
>Number: 50255
>Category: bin
>Synopsis: Remove unused flag from acpidump.c and acpidump.8
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Sep 18 10:30:00 +0000 2015
>Closed-Date: Sun Sep 20 17:50:41 +0000 2015
>Last-Modified: Sun Sep 20 17:50:41 +0000 2015
>Originator: Henning Petersen
>Release: -current
>Organization:
>Environment:
>Description:
Flag sflag in not used in acpidup.
>How-To-Repeat:
>Fix:
diff -u -p -r1.7 acpidump.8
--- usr.sbin/acpitools/acpidump/acpidump.8 18 Mar 2014 18:20:46 -0000 1.7
+++ usr.sbin/acpitools/acpidump/acpidump.8 18 Sep 2015 10:20:03 -0000
@@ -38,7 +38,7 @@
.Nd dump ACPI tables and ASL
.Sh SYNOPSIS
.Nm
-.Op Fl cdhstv
+.Op Fl cdhtv
.Op Fl f Ar dsdt_input
.Op Fl o Ar dsdt_output
.Sh DESCRIPTION
@@ -152,8 +152,6 @@ flag may not be used with this option.
Displays usage and exit.
.It Fl o Ar dsdt_output
Store the DSDT data block from physical memory into the specified file.
-.It Fl s
-Skip tables with bad checksums.
.It Fl t
Dump the contents of the various fixed tables listed above.
.It Fl v
===================================================================
diff -u -p -r1.5 acpidump.c
--- usr.sbin/acpitools/acpidump/acpidump.c 29 Aug 2011 20:38:54 -0000 1.5
+++ usr.sbin/acpitools/acpidump/acpidump.c 18 Sep 2015 10:20:03 -0000
@@ -44,7 +44,6 @@ __RCSID("$NetBSD: acpidump.c,v 1.5 2011/
int cflag; /* Dump unknown table data as characters */
int dflag; /* Disassemble AML using iasl(8) */
-int sflag; /* Skip tables with bad checksums */
int tflag; /* Dump contents of SDT tables */
int vflag; /* Use verbose messages */
@@ -53,7 +52,7 @@ usage(void)
{
const char *progname = getprogname();
- fprintf(stderr, "usage: %s [-c] [-d] [-s] [-t] [-h] [-v] "
+ fprintf(stderr, "usage: %s [-c] [-d] [-t] [-h] [-v] "
"[-f dsdt_input] [-o dsdt_output]\n", progname);
fprintf(stderr, "To send ASL:\n\t%s -dt | gzip -c9 > foo.asl.gz\n",
progname);
@@ -80,9 +79,6 @@ main(int argc, char *argv[])
case 'd':
dflag = 1;
break;
- case 's':
- sflag = 1;
- break;
case 't':
tflag = 1;
break;
>Release-Note:
>Audit-Trail:
From: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/50255: Remove unused flag from acpidump.c and acpidump.8
Date: Sat, 19 Sep 2015 09:12:14 +0200
On Fri, Sep 18, 2015 at 10:30:00AM +0000, henning.petersen@t-online.de wrote:
> >Number: 50255
> >Category: bin
> >Synopsis: Remove unused flag from acpidump.c and acpidump.8
Why do you think it's unused?
# link acpidump/acpidump
gcc -o acpidump acpi.o acpi_user.o acpidump.o -Wl,-rpath-link,/lib -L=/lib
acpi.o: In function `sdt_print_all':
acpi.c:(.text+0x1a99): undefined reference to `sflag'
*** Error code 1
Thomas
State-Changed-From-To: open->feedback
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Sat, 19 Sep 2015 20:02:58 +0000
State-Changed-Why:
A question was asked.
From: henning petersen <henning.petersen@t-online.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/50255 (Remove unused flag from acpidump.c and acpidump.8)
Date: Sat, 19 Sep 2015 22:14:17 +0200
Am 19.09.2015 um 22:02 schrieb wiz@NetBSD.org:
> Synopsis: Remove unused flag from acpidump.c and acpidump.8
>
> State-Changed-From-To: open->feedback
> State-Changed-By: wiz@NetBSD.org
> State-Changed-When: Sat, 19 Sep 2015 20:02:58 +0000
> State-Changed-Why:
> A question was asked.
>
>
>
>
yes, sflag should also be removed in acpi.c and acpidump.h.
Try to start acpidump with -s.
From: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/50255 (Remove unused flag from acpidump.c and acpidump.8)
Date: Sat, 19 Sep 2015 23:49:37 +0200
On Sat, Sep 19, 2015 at 09:35:01PM +0000, henning petersen wrote:
> yes, sflag should also be removed in acpi.c and acpidump.h.
> Try to start acpidump with -s.
It gives me an error that it doesn't know an 's' option. But perhaps
the proper fix is to add '-s' to the getopt string instead?
Thomas
From: henning petersen <henning.petersen@t-online.de>
To: gnats-bugs@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Cc:
Subject: Re: bin/50255 (Remove unused flag from acpidump.c and acpidump.8)
Date: Sun, 20 Sep 2015 08:12:28 +0200
This is a multi-part message in MIME format.
--------------080405070107070400090700
Content-Type: text/plain; charset=iso-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Am 19.09.2015 um 23:50 schrieb Thomas Klausner:
> The following reply was made to PR bin/50255; it has been noted by GNATS.
>
> From: Thomas Klausner <wiz@NetBSD.org>
> To: gnats-bugs@NetBSD.org
> Cc:
> Subject: Re: bin/50255 (Remove unused flag from acpidump.c and acpidump.8)
> Date: Sat, 19 Sep 2015 23:49:37 +0200
>
> On Sat, Sep 19, 2015 at 09:35:01PM +0000, henning petersen wrote:
> > yes, sflag should also be removed in acpi.c and acpidump.h.
> > Try to start acpidump with -s.
>
> It gives me an error that it doesn't know an 's' option. But perhaps
> the proper fix is to add '-s' to the getopt string instead?
> Thomas
>
>
You are right in version 1.4 acpidump.c sflag is added, but s is missing
in getopt.
--------------080405070107070400090700
Content-Type: text/plain; charset=UTF-8;
name="acpidump.c.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="acpidump.c.diff"
diff -u -p -r1.5 acpidump.c
--- usr.sbin/acpitools/acpidump/acpidump.c 29 Aug 2011 20:38:54 -0000 1.5
+++ usr.sbin/acpitools/acpidump/acpidump.c 20 Sep 2015 06:01:38 -0000
@@ -72,7 +72,7 @@ main(int argc, char *argv[])
if (argc < 2)
usage();
- while ((c = getopt(argc, argv, "cdhtvf:o:")) != -1) {
+ while ((c = getopt(argc, argv, "cdhstvf:o:")) != -1) {
switch (c) {
case 'c':
cflag = 1;
--------------080405070107070400090700--
From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/50255 CVS commit: src/usr.sbin/acpitools/acpidump
Date: Sun, 20 Sep 2015 17:45:25 +0000
Module Name: src
Committed By: wiz
Date: Sun Sep 20 17:45:25 UTC 2015
Modified Files:
src/usr.sbin/acpitools/acpidump: acpidump.c
Log Message:
Add -s to getopt(3)-string.
Noted missing by Henning Petersen in PR 50255.
While here, clean up usage.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/acpitools/acpidump/acpidump.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: feedback->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Sun, 20 Sep 2015 17:50:41 +0000
State-Changed-Why:
Fixed, thanks!
>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.