mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joseph Pingenot <trelane@digitasaru.net>
To: linux-kernel@vger.kernel.org
Subject: Problem reading /proc/acpi/battery/BAT0/info
Date: Sat, 28 Aug 2004 23:20:38 -0500	[thread overview]
Message-ID: <20040829042038.GA8073@digitasaru.net> (raw)

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

                 reply	other threads:[~2004-08-29  4:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20040829042038.GA8073@digitasaru.net \
    --to=trelane@digitasaru.net \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®