[glick2] helper: check error code from mount



commit 3a634317fd0787ec6f5a4555ee3b516ff5c23fa6
Author: Stefan Sauer <ensonic users sf net>
Date:   Thu Oct 20 13:34:18 2011 +0200

    helper: check error code from mount

 helper.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/helper.c b/helper.c
index 4d86e18..70e3dc1 100644
--- a/helper.c
+++ b/helper.c
@@ -144,8 +144,12 @@ main (int argc,
   if (extra_mount_source != NULL)
     {
       __debug__(("mount extra source (private)\n"));
-      mount (extra_mount_source, extra_mount_source,
+      res = mount (extra_mount_source, extra_mount_source,
 	     NULL, MS_PRIVATE, NULL);
+      if (res != 0) {
+	perror ("Failed to bind the extra source directory");
+	goto error_out;
+      }
 
       __debug__(("mount extra source (bind)\n"));
       res = mount (extra_mount_source, extra_mount_source,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]