From: "David S. Miller" <davem@redhat.com>
To: thockin@sun.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: read() called twice for /proc files
Date: Mon, 24 Sep 2001 18:35:55 -0700 (PDT) [thread overview]
Message-ID: <20010924.183555.15266457.davem@redhat.com> (raw)
In-Reply-To: <3BAFDE0D.8A69A993@sun.com>
In-Reply-To: <3BAFDE0D.8A69A993@sun.com>
From: Tim Hockin <thockin@sun.com>
Date: Mon, 24 Sep 2001 18:29:49 -0700
This results in the actual read taking twice as long. Perhaps I am missing
something...
EOF isn't known until you return the zero. You can watch the loff_t
arg to the read operation to see if it is at the end, and if so just
avoid retouching the device or whatever and go straight to returning
0.
Franks a lot,
David S. Miller
davem@redhat.com
next prev parent reply other threads:[~2001-09-25 1:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-25 1:29 Tim Hockin
2001-09-25 1:35 ` David S. Miller [this message]
2001-09-25 1:34 Tim Hockin
2001-09-25 2:16 ` Jonathan Lundell
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=20010924.183555.15266457.davem@redhat.com \
--to=davem@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=thockin@sun.com \
/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®