mount: No longer implicitly add -o sync,noatime options.
[libguestfs.git] / daemon / ext2.c
index 725352e..01a4628 100644 (file)
@@ -39,7 +39,7 @@
  * We specify e4fsprogs in the package list to ensure it is loaded
  * if it exists.
  */
-static int
+int
 e2prog (char *name)
 {
   char *p = strstr (name, "e2");
@@ -266,6 +266,27 @@ do_resize2fs_size (const char *device, int64_t size)
 }
 
 int
+do_resize2fs_M (const char *device)
+{
+  char *err;
+  int r;
+
+  char prog[] = "resize2fs";
+  if (e2prog (prog) == -1)
+    return -1;
+
+  r = command (NULL, &err, prog, "-M" , device, NULL);
+  if (r == -1) {
+    reply_with_error ("%s", err);
+    free (err);
+    return -1;
+  }
+
+  free (err);
+  return 0;
+}
+
+int
 do_e2fsck_f (const char *device)
 {
   char *err;