From: Paul Ionescu <paul-f7LjuT9/YZU@public.gmane.org>
To: Alex Williamson <alex.williamson-VXdhtT5mjnY@public.gmane.org>,
acpi
<acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: Re: [PATCH] filling in ACPI method access via sysfs
Date: Wed, 14 Apr 2004 01:15:01 +0300 [thread overview]
Message-ID: <1081894500.6859.120.camel@t40> (raw)
Hi Alex,
I tried to play with your new patch. I am able now to run arbitrary
parameterless methods. I have some problems accessing the methods
requiring parameters, or giving results.
I did an "echo 1 > /sys/.../DOCK/_DCK " but nothing happened, and I have
tried also to cat it but I got "cat: Read error: No such device"
And I did an "cat /sys/.../_STA" and I receive
cat: Read error: No such device
Do I miss something ?
Thanks,
Paul
On Sun, 2004-04-11 at 16:29, Alex Williamson wrote:
>>
>> It seems unintuitive that you have to read the file for the method to
>> take effect. How about having the write function invoke the method and
>> (if there is a result) store it for later read-back via the read function?
>> It should be discarded on close, of course. A read() on a file with
>> no stored result should invoke the ACPI method (on the assumption this
>> is a parameter-less method) and return the result directly. Closing a
>> file should discard any result from the method.
>
> How's this? It behaves the way you described, but might be doing
> some questionable things with the buffer to get there. Is there a
> better place to store the return data than back into the buf passed to
> write() (aka file->private_data)? Without adding callbacks to
> open/close, I'm not sure how else we can dispose of the results on
> close. Thanks,
>
> Alex
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
next reply other threads:[~2004-04-13 22:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-13 22:15 Paul Ionescu [this message]
[not found] ` <1081894500.6859.120.camel-LjAuIDrFwz0@public.gmane.org>
2004-04-13 22:25 ` Re: [PATCH] filling in ACPI method access via sysfs Alex Williamson
-- strict thread matches above, loose matches on Subject: below --
2004-04-13 22:30 Paul Ionescu
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=1081894500.6859.120.camel@t40 \
--to=paul-f7ljut9/yzu@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=alex.williamson-VXdhtT5mjnY@public.gmane.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