[Pkg-libvirt-commits] [SCM] Libguestfs Debian packaging branch, experimental, updated. debian/1%1.21.40-1

Richard W.M. Jones rjones at redhat.com
Sat Jun 1 11:04:34 UTC 2013


The following commit has been merged in the experimental branch:
commit f83df69bec28fe5414da3896af0ec3b0986beaa4
Author: Dave Vasilevsky <dave at vasilevsky.ca>
Date:   Wed May 8 21:02:21 2013 -0400

    fuse: Allow specifying the fstype of a mount

diff --git a/fish/options.c b/fish/options.c
index 94a4cb4..db30772 100644
--- a/fish/options.c
+++ b/fish/options.c
@@ -406,7 +406,13 @@ mount_mps (struct mp *mp)
     else
       options = "";
 
-    r = guestfs_mount_options (g, options, mp->device, mp->mountpoint);
+    if (mp->fstype) {
+	    r = guestfs_mount_vfs (g, options, mp->fstype, mp->device,
+	                           mp->mountpoint);
+	  } else {
+	    r = guestfs_mount_options (g, options, mp->device,
+                                 mp->mountpoint);
+    }
     if (r == -1) {
       display_mountpoints_on_failure (mp->device, mp->options);
       exit (EXIT_FAILURE);
diff --git a/fish/options.h b/fish/options.h
index ed1325c..bdfabb2 100644
--- a/fish/options.h
+++ b/fish/options.h
@@ -89,6 +89,7 @@ struct mp {
   char *device;
   char *mountpoint;
   char *options;
+  char *fstype;
 };
 
 /* in config.c */
@@ -142,6 +143,7 @@ extern int add_libvirt_drives (const char *guest);
     perror ("malloc");                          \
     exit (EXIT_FAILURE);                        \
   }                                             \
+  mp->fstype = NULL;                            \
   mp->options = NULL;                           \
   mp->mountpoint = (char *) "/";                \
   p = strchr (optarg, ':');                     \
@@ -154,6 +156,12 @@ extern int add_libvirt_drives (const char *guest);
       *p = '\0';                                \
       p++;                                      \
       mp->options = p;                          \
+      p = strchr (p, ':');                      \
+      if (p) {                                  \
+        *p = '\0';                              \
+        p++;                                    \
+        mp->fstype = p;                         \
+      }                                         \
     }                                           \
   }                                             \
   mp->device = optarg;                          \

-- 
Libguestfs Debian packaging



More information about the Pkg-libvirt-commits mailing list