Revision 6ab4b5ab blockdev.c
b/blockdev.c | ||
---|---|---|
486 | 486 |
|
487 | 487 |
void do_commit(Monitor *mon, const QDict *qdict) |
488 | 488 |
{ |
489 |
int all_devices; |
|
490 |
DriveInfo *dinfo; |
|
491 | 489 |
const char *device = qdict_get_str(qdict, "device"); |
490 |
BlockDriverState *bs; |
|
492 | 491 |
|
493 |
all_devices = !strcmp(device, "all"); |
|
494 |
QTAILQ_FOREACH(dinfo, &drives, next) { |
|
495 |
if (!all_devices) |
|
496 |
if (strcmp(bdrv_get_device_name(dinfo->bdrv), device)) |
|
497 |
continue; |
|
498 |
bdrv_commit(dinfo->bdrv); |
|
492 |
if (!strcmp(device, "all")) { |
|
493 |
bdrv_commit_all(); |
|
494 |
} else { |
|
495 |
bs = bdrv_find(device); |
|
496 |
if (bs) { |
|
497 |
bdrv_commit(bs); |
|
498 |
} |
|
499 | 499 |
} |
500 | 500 |
} |
501 | 501 |
|
Also available in: Unified diff