Commit bbf92828 authored by Ondrej Kozina's avatar Ondrej Kozina Committed by Milan Broz

Move buffered io implementation in new functions.

No functional changes yet. See later commits.
parent 2f83bf9f
......@@ -30,7 +30,7 @@
#include "utils_io.h"
ssize_t read_buffer(int fd, void *buf, size_t length)
static ssize_t _read_buffer(int fd, void *buf, size_t length)
{
size_t read_size = 0;
ssize_t r;
......@@ -53,7 +53,12 @@ ssize_t read_buffer(int fd, void *buf, size_t length)
return (ssize_t)length;
}
ssize_t write_buffer(int fd, const void *buf, size_t length)
ssize_t read_buffer(int fd, void *buf, size_t length)
{
return _read_buffer(fd, buf, length);
}
static ssize_t write_buffer(int fd, const void *buf, size_t length)
{
size_t write_size = 0;
ssize_t w;
......@@ -76,6 +81,11 @@ ssize_t write_buffer(int fd, const void *buf, size_t length)
return (ssize_t)write_size;
}
ssize_t write_buffer(int fd, const void *buf, size_t length)
{
return _write_buffer(fd, buf, length);
}
ssize_t write_blockwise(int fd, size_t bsize, size_t alignment,
void *orig_buf, size_t length)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment