diff options
author | Peter Korsgaard <jacmet@sunsite.dk> | 2010-02-03 20:57:30 +0100 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2010-02-03 20:57:30 +0100 |
commit | 67a284d82040d03647fc0e09134cb9e6f367dacd (patch) | |
tree | f27d6df69d665982beb3a6e2e162286b0f3c8e3d /package/nbd/nbd-server-fix-read-eagain.patch | |
parent | c317439d4d9e5da8c22371b33a34260b8ec0d5ac (diff) | |
download | buildroot-novena-67a284d82040d03647fc0e09134cb9e6f367dacd.tar.gz buildroot-novena-67a284d82040d03647fc0e09134cb9e6f367dacd.zip |
nbd: add server patches missing from 6aac003
Somehow these patches never got added.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/nbd/nbd-server-fix-read-eagain.patch')
-rw-r--r-- | package/nbd/nbd-server-fix-read-eagain.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/package/nbd/nbd-server-fix-read-eagain.patch b/package/nbd/nbd-server-fix-read-eagain.patch new file mode 100644 index 000000000..b1f966c77 --- /dev/null +++ b/package/nbd/nbd-server-fix-read-eagain.patch @@ -0,0 +1,21 @@ +--- nbd-2.9.11.orig/nbd-server.c ++++ nbd-2.9.11/nbd-server.c +@@ -304,10 +304,14 @@ + ssize_t res; + while (len > 0) { + DEBUG("*"); +- if ((res = read(f, buf, len)) <= 0) +- err("Read failed: %m"); +- len -= res; +- buf += res; ++ if ((res = read(f, buf, len)) <= 0) { ++ if(errno != EAGAIN) { ++ err("Read failed: %m"); ++ } ++ } else { ++ len -= res; ++ buf += res; ++ } + } + } + |