(fillcache, do_write): Revert the previous revision. The portability
issue applies only to sockets, and EWOULDBLOCK isn't defined on all systems.
This commit is contained in:
parent
9a296c4be3
commit
803009d0ce
1 changed files with 2 additions and 2 deletions
|
@ -276,7 +276,7 @@ fillcache(struct empfile *ep, int start)
|
||||||
while (n > 0) {
|
while (n > 0) {
|
||||||
ret = read(ep->fd, p, n);
|
ret = read(ep->fd, p, n);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
if (errno != EAGAIN && errno != EWOULDBLOCK) {
|
if (errno != EAGAIN) {
|
||||||
logerror("Error reading %s (%s)", ep->file, strerror(errno));
|
logerror("Error reading %s (%s)", ep->file, strerror(errno));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -319,7 +319,7 @@ do_write(struct empfile *ep, void *buf, int id, int count)
|
||||||
while (n > 0) {
|
while (n > 0) {
|
||||||
ret = write(ep->fd, p, n);
|
ret = write(ep->fd, p, n);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
if (errno != EAGAIN && errno != EWOULDBLOCK) {
|
if (errno != EAGAIN) {
|
||||||
logerror("Error writing %s (%s)", ep->file, strerror(errno));
|
logerror("Error writing %s (%s)", ep->file, strerror(errno));
|
||||||
/* FIXME if this extended file, truncate back to old size */
|
/* FIXME if this extended file, truncate back to old size */
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue