343 |
|
|
344 |
|
/* |
345 |
|
* Read "length" bytes from file to "buffer", |
346 |
< |
* returns number of bytes read (or 0) |
346 |
> |
* returns number of bytes read (or -1 on error) |
347 |
|
*/ |
348 |
|
|
349 |
< |
size_t extfs_read(int fd, void *buffer, size_t length) |
349 |
> |
ssize_t extfs_read(int fd, void *buffer, size_t length) |
350 |
|
{ |
351 |
– |
errno = 0; |
351 |
|
return read(fd, buffer, length); |
352 |
|
} |
353 |
|
|
354 |
|
|
355 |
|
/* |
356 |
|
* Write "length" bytes from "buffer" to file, |
357 |
< |
* returns number of bytes written (or 0) |
357 |
> |
* returns number of bytes written (or -1 on error) |
358 |
|
*/ |
359 |
|
|
360 |
< |
size_t extfs_write(int fd, void *buffer, size_t length) |
360 |
> |
ssize_t extfs_write(int fd, void *buffer, size_t length) |
361 |
|
{ |
363 |
– |
errno = 0; |
362 |
|
return write(fd, buffer, length); |
363 |
|
} |
364 |
|
|