From dee88aa2e0ce67bb595c4012eb530240a39892f0 Mon Sep 17 00:00:00 2001 From: Roger Pau Monne Date: Thu, 31 Mar 2016 14:50:07 +0200 Subject: [PATCH] libxl: fix POLLHUP handling MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- tools/libxl/libxl_bootloader.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; } -- 2.30.2