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