lkml.org 
[lkml]   [2004]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectProblem reading /proc/acpi/battery/BAT0/info
Hello.

I'm writing some code to read battery status, but am having problems reading
/proc/acpi/battery/BAT0/info.
If I read that file, I can fill *one* and *only one* buffer before I get
EOF (read returns 0 bytes read on the next buffer). This is regardless
of buffer length--I can use 1 or 3 or 10 bytes. First read succeeds,
second read fails. Errno is 0.
With the *same code*, I can read the entire file without issue.
Any hints as to what's going on here?
Thanks!

Puzzled,
-Joseph
--
Joseph===============================================trelane@digitasaru.net
Graduate Student in Physics, Freelance Free Software Developer
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.025 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site