[lkml]   [2010]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] ACPI / Battery: Return -ENODATA for unknown values in get_property()
On Monday, October 25, 2010, Pavel Machek wrote:
> Hi!
> > That's why I suggested to use -ENODATA. :-)
> >
> > Still, if user space has problems with failing reads from the sysfs attributes,
> > it may be better to simply put -1 in there. Patch is appended, please test.
> I'd say that reporting -1 for unknown is ugly. You can have -1A
> current easily (charging at 1A), and I've seen machines reporting <0
> current -- when charging. Logical and well-defined.

I posted a patch fixing that in a different way (makng the battery driver return
-ENODEV instead of -ENODATA) in the meantime, which has been confirmed to work.


 \ /
  Last update: 2010-10-25 22:39    [W:0.045 / U:7.140 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site