Revision d6e9098e qemu-img.c

b/qemu-img.c
210 210
    if (!readonly) {
211 211
        flags |= BDRV_O_RDWR;
212 212
    }
213
    if (bdrv_open2(bs, filename, flags, drv) < 0) {
213
    if (bdrv_open(bs, filename, flags, drv) < 0) {
214 214
        error("Could not open '%s'", filename);
215 215
    }
216 216
    if (bdrv_is_encrypted(bs)) {
......
415 415
    } else {
416 416
        drv = NULL;
417 417
    }
418
    if (bdrv_open2(bs, filename, BRDV_O_FLAGS, drv) < 0) {
418
    if (bdrv_open(bs, filename, BRDV_O_FLAGS, drv) < 0) {
419 419
        error("Could not open '%s'", filename);
420 420
    }
421 421
    ret = bdrv_check(bs);
......
474 474
    } else {
475 475
        drv = NULL;
476 476
    }
477
    if (bdrv_open2(bs, filename, BRDV_O_FLAGS | BDRV_O_RDWR, drv) < 0) {
477
    if (bdrv_open(bs, filename, BRDV_O_FLAGS | BDRV_O_RDWR, drv) < 0) {
478 478
        error("Could not open '%s'", filename);
479 479
    }
480 480
    ret = bdrv_commit(bs);
......
926 926
    } else {
927 927
        drv = NULL;
928 928
    }
929
    if (bdrv_open2(bs, filename, BRDV_O_FLAGS | BDRV_O_NO_BACKING, drv) < 0) {
929
    if (bdrv_open(bs, filename, BRDV_O_FLAGS | BDRV_O_NO_BACKING, drv) < 0) {
930 930
        error("Could not open '%s'", filename);
931 931
    }
932 932
    bdrv_get_format(bs, fmt_name, sizeof(fmt_name));
......
1032 1032
    if (!bs)
1033 1033
        error("Not enough memory");
1034 1034

  
1035
    if (bdrv_open2(bs, filename, bdrv_oflags, NULL) < 0) {
1035
    if (bdrv_open(bs, filename, bdrv_oflags, NULL) < 0) {
1036 1036
        error("Could not open '%s'", filename);
1037 1037
    }
1038 1038

  
......
1137 1137
    }
1138 1138

  
1139 1139
    flags = BRDV_O_FLAGS | BDRV_O_RDWR | (unsafe ? BDRV_O_NO_BACKING : 0);
1140
    if (bdrv_open2(bs, filename, flags, drv) < 0) {
1140
    if (bdrv_open(bs, filename, flags, drv) < 0) {
1141 1141
        error("Could not open '%s'", filename);
1142 1142
    }
1143 1143

  
......
1169 1169

  
1170 1170
        bs_old_backing = bdrv_new("old_backing");
1171 1171
        bdrv_get_backing_filename(bs, backing_name, sizeof(backing_name));
1172
        if (bdrv_open2(bs_old_backing, backing_name, BRDV_O_FLAGS,
1172
        if (bdrv_open(bs_old_backing, backing_name, BRDV_O_FLAGS,
1173 1173
            old_backing_drv))
1174 1174
        {
1175 1175
            error("Could not open old backing file '%s'", backing_name);
......
1177 1177
        }
1178 1178

  
1179 1179
        bs_new_backing = bdrv_new("new_backing");
1180
        if (bdrv_open2(bs_new_backing, out_baseimg, BRDV_O_FLAGS | BDRV_O_RDWR,
1180
        if (bdrv_open(bs_new_backing, out_baseimg, BRDV_O_FLAGS | BDRV_O_RDWR,
1181 1181
            new_backing_drv))
1182 1182
        {
1183 1183
            error("Could not open new backing file '%s'", out_baseimg);

Also available in: Unified diff