Re: [PATCH 4/4] ACPI: Battery: Add support for _BIX extended info method

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

 



On Mon, 15 Mar 2010, Alexey Starikovskiy wrote:
> Henrique de Moraes Holschuh ??????????:
> > That just means the ACPI sysfs conversion on that area was not as good as it
> > should have been.  It is hardly the only place where the sysfs ABI is not
> > well implemented, but that doesn't mean the breakage should remain, or that
> > it should be made worse.
> > What is the technical case to returning invalid values for something that is
> > not supported when you could return a proper error on open() instead (since

> Power Class interface does not give me control over open() as far as I know.

Hmm, you're correct.  We can return errors, but they'll be on
read()/write(), not open().

> > you're not going to do the Right Thing and not register that attribute it in
> > the first place)?  Not only the "-1" way wastes more system resources (all
> > clients have to do open+read+close), it also needs userspace to special case
> > something, and that is always a Bad Idea for *many* reasons.
> If you know how this could be done, please show the patch...

Let me look at that code, and I will get back to you.  Might have to use the
recently introduced sysfs helpers or some somewhat ugly crap I had to add to
thinkpad-acpi to do just that, though.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux