From: Roger Pau Monne Date: Thu, 26 Jul 2012 09:55:09 +0000 (+0100) Subject: libxl: libxl__xs_path_cleanup don't print error if ENOENT X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~8136 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=47ce0e3550a2d1ce8407e3643ceb595657ac4d79;p=xen.git libxl: libxl__xs_path_cleanup don't print error if ENOENT Signed-off-by: Roger Pau Monne Acked-by: Ian Campbell Committed-by: Ian Campbell --- diff --git a/tools/libxl/libxl_xshelp.c b/tools/libxl/libxl_xshelp.c index 7ca17328f9..855ac85611 100644 --- a/tools/libxl/libxl_xshelp.c +++ b/tools/libxl/libxl_xshelp.c @@ -219,7 +219,8 @@ int libxl__xs_path_cleanup(libxl__gc *gc, xs_transaction_t t, char *user_path) path = libxl__strdup(gc, user_path); if (!xs_rm(CTX->xsh, t, path)) { - LOGE(DEBUG, "unable to remove path %s", path); + if (errno != ENOENT) + LOGE(DEBUG, "unable to remove path %s", path); rc = ERROR_FAIL; goto out; } @@ -235,7 +236,8 @@ int libxl__xs_path_cleanup(libxl__gc *gc, xs_transaction_t t, char *user_path) if (!libxl__xs_directory(gc, t, path, &nb) || nb != 0) break; if (!xs_rm(CTX->xsh, t, path)) { - LOGE(DEBUG, "unable to remove path %s", path); + if (errno != ENOENT) + LOGE(DEBUG, "unable to remove path %s", path); rc = ERROR_FAIL; goto out; }