From: Roger Pau Monne Date: Thu, 31 Mar 2016 12:50:07 +0000 (+0200) Subject: libxl: fix POLLHUP handling X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~1383 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=dee88aa2e0ce67bb595c4012eb530240a39892f0;p=xen.git libxl: fix POLLHUP handling The current code in bootloader_copyfail will error out on expected POLLHUPs because of a missing "else" in the if clause. The behaviour that triggers this bug has only been seen on FreeBSD so far. Signed-off-by: Roger Pau Monné Suggested-by: Ian Jackson Acked-by: Wei Liu --- diff --git a/tools/libxl/libxl_bootloader.c b/tools/libxl/libxl_bootloader.c index 0ae074a45a..2cfc8cfaf2 100644 --- a/tools/libxl/libxl_bootloader.c +++ b/tools/libxl/libxl_bootloader.c @@ -591,8 +591,7 @@ static void bootloader_copyfail(libxl__egc *egc, const char *which, } else { LOG(ERROR, "unexpected POLLHUP on %s", which); } - } - if (!rc) { + } else if (!rc) { LOG(ERROR, "unexpected eof copying %s", which); rc = ERROR_FAIL; }