mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Problem reading /proc/acpi/battery/BAT0/info
@ 2004-08-29  4:20 Joseph Pingenot
  0 siblings, 0 replies; only message in thread
From: Joseph Pingenot @ 2004-08-29  4:20 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-08-29  4:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-29  4:20 Problem reading /proc/acpi/battery/BAT0/info Joseph Pingenot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®