From 67a284d82040d03647fc0e09134cb9e6f367dacd Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Wed, 3 Feb 2010 20:57:30 +0100 Subject: nbd: add server patches missing from 6aac003 Somehow these patches never got added. Signed-off-by: Peter Korsgaard --- package/nbd/nbd-server-fix-read-eagain.patch | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 package/nbd/nbd-server-fix-read-eagain.patch (limited to 'package/nbd/nbd-server-fix-read-eagain.patch') 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; ++ } + } + } + -- cgit v1.2.3