提交 7954c734 编写于 作者: B bellard

commit to specific devices


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2074 c046a42c-6fe2-441c-8c8c-71466251a162
上级 93b6b2a3
......@@ -167,12 +167,15 @@ static void do_help(const char *name)
help_cmd(name);
}
static void do_commit(void)
static void do_commit(const char *device)
{
int i;
int i, all_devices;
all_devices = !strcmp(device, "all");
for (i = 0; i < MAX_DISKS; i++) {
if (bs_table[i]) {
if (all_devices ||
!strcmp(bdrv_get_device_name(bs_table[i]), device))
bdrv_commit(bs_table[i]);
}
}
......@@ -1138,8 +1141,8 @@ static void do_wav_capture (const char *path,
static term_cmd_t term_cmds[] = {
{ "help|?", "s?", do_help,
"[cmd]", "show the help" },
{ "commit", "", do_commit,
"", "commit changes to the disk images (if -snapshot is used)" },
{ "commit", "s", do_commit,
"device|all", "commit changes to the disk images (if -snapshot is used) or backing files" },
{ "info", "s?", do_info,
"subcommand", "show various information about the system state" },
{ "q|quit", "", do_quit,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册