]> Git Repo - qemu.git/commitdiff
Commit NAND image changes on "commit all" or "commit mtd".
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 24 May 2007 18:53:22 +0000 (18:53 +0000)
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 24 May 2007 18:53:22 +0000 (18:53 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2858 c046a42c-6fe2-441c-8c8c-71466251a162

monitor.c
vl.c

index 9f76c0976ef039874edd3c557e0a115e1352dfb3..370bdfe981655ad4359aac5f1da33839283b6ace 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -202,7 +202,7 @@ static void do_help(const char *name)
 static void do_commit(const char *device)
 {
     int i, all_devices;
-    
+
     all_devices = !strcmp(device, "all");
     for (i = 0; i < MAX_DISKS; i++) {
         if (bs_table[i]) {
@@ -211,6 +211,9 @@ static void do_commit(const char *device)
                 bdrv_commit(bs_table[i]);
         }
     }
+    if (mtd_bdrv)
+        if (all_devices || !strcmp(bdrv_get_device_name(mtd_bdrv), device))
+            bdrv_commit(mtd_bdrv);
 }
 
 static void do_info(const char *item)
diff --git a/vl.c b/vl.c
index 7277165c7199f42ccc42bfdbffd9188083111bac..24aef572f9e807af7dcc9628d2f6286c085da09e 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -1362,6 +1362,8 @@ static int mux_proc_byte(CharDriverState *chr, MuxDriver *d, int ch)
                     if (bs_table[i])
                         bdrv_commit(bs_table[i]);
                 }
+                if (mtd_bdrv)
+                    bdrv_commit(mtd_bdrv);
             }
             break;
         case 'b':
This page took 0.044943 seconds and 4 git commands to generate.