Use size_t as return value from read()
This commit is contained in:
parent
afd900944a
commit
3943862f0e
@ -14,7 +14,7 @@ public:
|
||||
|
||||
virtual void stat(struct ::stat *result) const = 0;
|
||||
virtual void truncate(off_t size) const = 0;
|
||||
virtual ssize_t read(void *buf, size_t count, off_t offset) const = 0;
|
||||
virtual size_t read(void *buf, size_t count, off_t offset) const = 0;
|
||||
virtual void write(const void *buf, size_t count, off_t offset) = 0;
|
||||
virtual void flush() = 0;
|
||||
virtual void fsync() = 0;
|
||||
|
@ -27,7 +27,7 @@ public:
|
||||
virtual void chown(const boost::filesystem::path &path, uid_t uid, gid_t gid) = 0;
|
||||
virtual void truncate(const boost::filesystem::path &path, off_t size) = 0;
|
||||
virtual void ftruncate(int descriptor, off_t size) = 0;
|
||||
virtual int read(int descriptor, void *buf, size_t count, off_t offset) = 0;
|
||||
virtual size_t read(int descriptor, void *buf, size_t count, off_t offset) = 0;
|
||||
virtual void write(int descriptor, const void *buf, size_t count, off_t offset) = 0;
|
||||
virtual void fsync(int descriptor) = 0;
|
||||
virtual void fdatasync(int descriptor) = 0;
|
||||
|
@ -195,7 +195,7 @@ void FilesystemImpl::ftruncate(int descriptor, off_t size) {
|
||||
_open_files.get(descriptor)->truncate(size);
|
||||
}
|
||||
|
||||
int FilesystemImpl::read(int descriptor, void *buf, size_t count, off_t offset) {
|
||||
size_t FilesystemImpl::read(int descriptor, void *buf, size_t count, off_t offset) {
|
||||
PROFILE(_readNanosec);
|
||||
return _open_files.get(descriptor)->read(buf, count, offset);
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ public:
|
||||
void chown(const boost::filesystem::path &path, uid_t uid, gid_t gid) override;
|
||||
void truncate(const boost::filesystem::path &path, off_t size) override;
|
||||
void ftruncate(int descriptor, off_t size) override;
|
||||
int read(int descriptor, void *buf, size_t count, off_t offset) override;
|
||||
size_t read(int descriptor, void *buf, size_t count, off_t offset) override;
|
||||
void write(int descriptor, const void *buf, size_t count, off_t offset) override;
|
||||
void fsync(int descriptor) override;
|
||||
void fdatasync(int descriptor) override;
|
||||
|
Loading…
Reference in New Issue
Block a user