From: Chuck Ebbert <cebbert.lkml@gmail.com>
To: Frans Klaver <fransklaver@gmail.com>
Cc: Marc Burkhardt <marc@osknowledge.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: acpitool - /proc/acpi/wakeup
Date: Thu, 9 Oct 2014 15:27:28 -0500 [thread overview]
Message-ID: <20141009152728.4114ab8c@as> (raw)
In-Reply-To: <CAH6sp9Mgyu8xFSM4Morux7YUDToYA2DHJs5hcE-hPVygGWFqpA@mail.gmail.com>
On Thu, 9 Oct 2014 22:16:11 +0200
Frans Klaver <fransklaver@gmail.com> wrote:
> On Thu, Oct 9, 2014 at 9:58 PM, Marc Burkhardt <marc@osknowledge.org> wrote:
> >
> >
> >>On Thu, Oct 9, 2014 at 9:42 PM, Marc Burkhardt <marc@osknowledge.org>
> >>wrote:
> >>> I upgraded from 3.10 on that machine. 3.12 didn't work for me due to
> >>a hibernation bug. The rest was left out... :/
> >>
> >>If you still have the 3.12 kernel around, could you test if acpitool
> >>-e worked there?
> >
> > Let me ask you a question: does it make sense to test 3.12 again because you know there's something changed regarding /proc/acpi/... or because it's the kernel I broke up on upgrading?
>
> Never mind. It broke after 3.14. I'll bisect.
>
The below patch fixes it for me. Looks like the line sizes changed
and some are now exactly the right length to make it loop forever
reading /proc/acpi/wakeup:
--- a/src/acpitool.cpp
+++ b/src/acpitool.cpp
@@ -417,7 +417,7 @@ int Do_Fan_Info(int verbose)
int Show_WakeUp_Devices(int verbose)
{
ifstream file_in;
- char *filename, str[40];
+ char *filename, str[80];
filename = "/proc/acpi/wakeup";
@@ -438,13 +438,13 @@ int Show_WakeUp_Devices(int verbose)
}
else
{
- file_in.getline(str, 40); // first line are just headers //
+ file_in.getline(str, 80); // first line are just headers //
cout<<" "<<str<<endl;
cout<<" ---------------------------------------"<<endl;
int t = 1;
while(!file_in.eof())
{
- file_in.getline(str, 40);
+ file_in.getline(str, 80);
if (strlen(str)!=0) // avoid printing last empty line //
{
cout<<" "<<t<<". "<<str<<endl;
next prev parent reply other threads:[~2014-10-09 20:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-09 19:04 acpitool - /proc/acpi/wakeup Marc Burkhardt
2014-10-09 19:13 ` Marc Burkhardt
2014-10-09 19:25 ` Frans Klaver
2014-10-09 19:31 ` Frans Klaver
2014-10-09 19:42 ` Marc Burkhardt
2014-10-09 19:48 ` Frans Klaver
2014-10-09 19:58 ` Marc Burkhardt
2014-10-09 20:16 ` Frans Klaver
2014-10-09 20:27 ` Chuck Ebbert [this message]
2014-10-09 21:28 ` Frans Klaver
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141009152728.4114ab8c@as \
--to=cebbert.lkml@gmail.com \
--cc=fransklaver@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marc@osknowledge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox