aboutsummaryrefslogtreecommitdiff
path: root/qemu-img.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2010-03-31 14:40:27 +0200
committerKevin Wolf <kwolf@redhat.com>2010-04-23 16:08:46 +0200
commitd6e9098e10e82feeddb824d7c3d0cf61aff96c29 (patch)
tree29a16b6152876e8ea74703052c94675bfdeb51ea /qemu-img.c
parent4768fa902c3860f2fe34403e6e1c83bfca6da034 (diff)
downloadqemu-d6e9098e10e82feeddb824d7c3d0cf61aff96c29.zip
qemu-d6e9098e10e82feeddb824d7c3d0cf61aff96c29.tar.gz
qemu-d6e9098e10e82feeddb824d7c3d0cf61aff96c29.tar.bz2
Replace calls of old bdrv_open
What is known today as bdrv_open2 becomes the new bdrv_open. All remaining callers of the old function are converted to the new one. In some places they even know the right format, so they should have used bdrv_open2 from the beginning. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-img.c')
-rw-r--r--qemu-img.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/qemu-img.c b/qemu-img.c
index 9b28664..18e43a0 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -210,7 +210,7 @@ static BlockDriverState *bdrv_new_open(const char *filename,
if (!readonly) {
flags |= BDRV_O_RDWR;
}
- if (bdrv_open2(bs, filename, flags, drv) < 0) {
+ if (bdrv_open(bs, filename, flags, drv) < 0) {
error("Could not open '%s'", filename);
}
if (bdrv_is_encrypted(bs)) {
@@ -415,7 +415,7 @@ static int img_check(int argc, char **argv)
} else {
drv = NULL;
}
- if (bdrv_open2(bs, filename, BRDV_O_FLAGS, drv) < 0) {
+ if (bdrv_open(bs, filename, BRDV_O_FLAGS, drv) < 0) {
error("Could not open '%s'", filename);
}
ret = bdrv_check(bs);
@@ -474,7 +474,7 @@ static int img_commit(int argc, char **argv)
} else {
drv = NULL;
}
- if (bdrv_open2(bs, filename, BRDV_O_FLAGS | BDRV_O_RDWR, drv) < 0) {
+ if (bdrv_open(bs, filename, BRDV_O_FLAGS | BDRV_O_RDWR, drv) < 0) {
error("Could not open '%s'", filename);
}
ret = bdrv_commit(bs);
@@ -926,7 +926,7 @@ static int img_info(int argc, char **argv)
} else {
drv = NULL;
}
- if (bdrv_open2(bs, filename, BRDV_O_FLAGS | BDRV_O_NO_BACKING, drv) < 0) {
+ if (bdrv_open(bs, filename, BRDV_O_FLAGS | BDRV_O_NO_BACKING, drv) < 0) {
error("Could not open '%s'", filename);
}
bdrv_get_format(bs, fmt_name, sizeof(fmt_name));
@@ -1032,7 +1032,7 @@ static int img_snapshot(int argc, char **argv)
if (!bs)
error("Not enough memory");
- if (bdrv_open2(bs, filename, bdrv_oflags, NULL) < 0) {
+ if (bdrv_open(bs, filename, bdrv_oflags, NULL) < 0) {
error("Could not open '%s'", filename);
}
@@ -1137,7 +1137,7 @@ static int img_rebase(int argc, char **argv)
}
flags = BRDV_O_FLAGS | BDRV_O_RDWR | (unsafe ? BDRV_O_NO_BACKING : 0);
- if (bdrv_open2(bs, filename, flags, drv) < 0) {
+ if (bdrv_open(bs, filename, flags, drv) < 0) {
error("Could not open '%s'", filename);
}
@@ -1169,7 +1169,7 @@ static int img_rebase(int argc, char **argv)
bs_old_backing = bdrv_new("old_backing");
bdrv_get_backing_filename(bs, backing_name, sizeof(backing_name));
- if (bdrv_open2(bs_old_backing, backing_name, BRDV_O_FLAGS,
+ if (bdrv_open(bs_old_backing, backing_name, BRDV_O_FLAGS,
old_backing_drv))
{
error("Could not open old backing file '%s'", backing_name);
@@ -1177,7 +1177,7 @@ static int img_rebase(int argc, char **argv)
}
bs_new_backing = bdrv_new("new_backing");
- if (bdrv_open2(bs_new_backing, out_baseimg, BRDV_O_FLAGS | BDRV_O_RDWR,
+ if (bdrv_open(bs_new_backing, out_baseimg, BRDV_O_FLAGS | BDRV_O_RDWR,
new_backing_drv))
{
error("Could not open new backing file '%s'", out_baseimg);