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 +++++++++++++++++++++ package/nbd/nbd-server-susv3-legacy.patch | 11 +++++++++++ 2 files changed, 32 insertions(+) create mode 100644 package/nbd/nbd-server-fix-read-eagain.patch create mode 100644 package/nbd/nbd-server-susv3-legacy.patch (limited to 'package') 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; ++ } + } + } + diff --git a/package/nbd/nbd-server-susv3-legacy.patch b/package/nbd/nbd-server-susv3-legacy.patch new file mode 100644 index 000000000..58d38e150 --- /dev/null +++ b/package/nbd/nbd-server-susv3-legacy.patch @@ -0,0 +1,11 @@ +--- nbd-2.9.11/nbd-server.c 2009-10-01 16:10:15.000000000 +0200 ++++ nbd-2.9.11/nbd-server.c 2009-10-01 16:10:32.000000000 +0200 +@@ -264,7 +264,7 @@ + + inet_aton(opts->clientname, &client); + while (fgets(line,LINELEN,f)!=NULL) { +- if((tmp=index(line, '/'))) { ++ if((tmp=strchr(line, '/'))) { + if(strlen(line)<=tmp-line) { + msg4(LOG_CRIT, ERRMSG, line, opts->server->authname); + return 0; -- cgit v1.2.3