diff options
| author | Stephen Hemminger <shemminger@vyatta.com> | 2010-01-13 00:32:43 +0000 |
|---|---|---|
| committer | Daniel Walton <dwalton@cumulusnetworks.com> | 2016-05-26 01:15:03 +0000 |
| commit | 2ed9b70316ede07ccfcf25153cd3406ba55e890a (patch) | |
| tree | bdb4e13457f00e5592794f78d303d36dc311b577 /lib/stream.c | |
| parent | 52cf4a5181d11481743f685c38c5711641c52e52 (diff) | |
stream: remove unused stream_read_unblock
The one place this was being used in BGP is now gone,
can remove deprecated interface.
Acked-by: Feng Lu <lu.feng@6wind.com>
(cherry picked from commit 3790eb0d3f0bbb24b9c6be97f547cec144ee05d1)
Diffstat (limited to 'lib/stream.c')
| -rw-r--r-- | lib/stream.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/lib/stream.c b/lib/stream.c index 11f35d884e..b0838e7934 100644 --- a/lib/stream.c +++ b/lib/stream.c @@ -817,32 +817,6 @@ stream_read (struct stream *s, int fd, size_t size) return nbytes; } -/* Read size from fd. */ -int -stream_read_unblock (struct stream *s, int fd, size_t size) -{ - int nbytes; - int val; - - STREAM_VERIFY_SANE(s); - - if (STREAM_WRITEABLE (s) < size) - { - STREAM_BOUND_WARN (s, "put"); - return 0; - } - - val = fcntl (fd, F_GETFL, 0); - fcntl (fd, F_SETFL, val|O_NONBLOCK); - nbytes = read (fd, s->data + s->endp, size); - fcntl (fd, F_SETFL, val); - - if (nbytes > 0) - s->endp += nbytes; - - return nbytes; -} - ssize_t stream_read_try(struct stream *s, int fd, size_t size) { |
