]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fix error message when failing to detect filesystem
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 1 Nov 2011 14:34:02 +0000 (14:34 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 1 Nov 2011 18:40:37 +0000 (18:40 +0000)
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

index 1440a097b8b99e60f6a0b2593bfc484a9526ba4e..b2de49e748658609f76c1e9519ff98760c7af86b 100644 (file)
@@ -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: