Commit 2dc7b602df142a470cbf82b5d7ef1ea99f761785

Authored by balrog
1 parent aa941b94

Commit NAND image changes on "commit all" or "commit mtd".


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2858 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 2 changed files with 6 additions and 1 deletions
monitor.c
@@ -202,7 +202,7 @@ static void do_help(const char *name) @@ -202,7 +202,7 @@ static void do_help(const char *name)
202 static void do_commit(const char *device) 202 static void do_commit(const char *device)
203 { 203 {
204 int i, all_devices; 204 int i, all_devices;
205 - 205 +
206 all_devices = !strcmp(device, "all"); 206 all_devices = !strcmp(device, "all");
207 for (i = 0; i < MAX_DISKS; i++) { 207 for (i = 0; i < MAX_DISKS; i++) {
208 if (bs_table[i]) { 208 if (bs_table[i]) {
@@ -211,6 +211,9 @@ static void do_commit(const char *device) @@ -211,6 +211,9 @@ static void do_commit(const char *device)
211 bdrv_commit(bs_table[i]); 211 bdrv_commit(bs_table[i]);
212 } 212 }
213 } 213 }
  214 + if (mtd_bdrv)
  215 + if (all_devices || !strcmp(bdrv_get_device_name(mtd_bdrv), device))
  216 + bdrv_commit(mtd_bdrv);
214 } 217 }
215 218
216 static void do_info(const char *item) 219 static void do_info(const char *item)
@@ -1362,6 +1362,8 @@ static int mux_proc_byte(CharDriverState *chr, MuxDriver *d, int ch) @@ -1362,6 +1362,8 @@ static int mux_proc_byte(CharDriverState *chr, MuxDriver *d, int ch)
1362 if (bs_table[i]) 1362 if (bs_table[i])
1363 bdrv_commit(bs_table[i]); 1363 bdrv_commit(bs_table[i]);
1364 } 1364 }
  1365 + if (mtd_bdrv)
  1366 + bdrv_commit(mtd_bdrv);
1365 } 1367 }
1366 break; 1368 break;
1367 case 'b': 1369 case 'b':