From 68285356690acf768896eb07bf938c73db3d3232 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Tue, 1 Nov 2011 14:34:02 +0000 Subject: [PATCH] Fix error message when failing to detect filesystem If we looped through /etc/filesystems trying to mount with each type and failed all options, we forget to actually raise an error message. * src/lxc/lxc_container.c: Raise error if unable to detect the filesystems. Also fix existing error message --- src/lxc/lxc_container.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index 1440a097b8..b2de49e748 100644 --- a/src/lxc/lxc_container.c +++ b/src/lxc/lxc_container.c @@ -725,7 +725,7 @@ retry: continue; virReportSystemError(errno, - _("Failed to bind mount directory %s to %s"), + _("Failed to mount device %s to %s"), src, fs->dst); goto cleanup; } @@ -746,6 +746,12 @@ retry: goto retry; } + if (ret != 0) { + virReportSystemError(ENODEV, + _("Failed to mount device %s to %s, unable to detect filesystem"), + src, fs->dst); + } + VIR_DEBUG("Done mounting filesystem ret=%d tryProc=%d", ret, tryProc); cleanup: -- 2.39.5