qcow.c (16d12159e207a167bd4f417fbd199736ad2da2d0) | qcow.c (c282e1fdf7ec9659c7f320123be397477a359d01) |
---|---|
1/* 2 * Block driver for the QCOW format 3 * 4 * Copyright (c) 2004-2006 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 698 unchanged lines hidden (view full) --- 707 708 /* Read out options */ 709 total_size = qemu_opt_get_size_del(opts, BLOCK_OPT_SIZE, 0) / 512; 710 backing_file = qemu_opt_get_del(opts, BLOCK_OPT_BACKING_FILE); 711 if (qemu_opt_get_bool_del(opts, BLOCK_OPT_ENCRYPT, false)) { 712 flags |= BLOCK_FLAG_ENCRYPT; 713 } 714 | 1/* 2 * Block driver for the QCOW format 3 * 4 * Copyright (c) 2004-2006 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 698 unchanged lines hidden (view full) --- 707 708 /* Read out options */ 709 total_size = qemu_opt_get_size_del(opts, BLOCK_OPT_SIZE, 0) / 512; 710 backing_file = qemu_opt_get_del(opts, BLOCK_OPT_BACKING_FILE); 711 if (qemu_opt_get_bool_del(opts, BLOCK_OPT_ENCRYPT, false)) { 712 flags |= BLOCK_FLAG_ENCRYPT; 713 } 714 |
715 ret = bdrv_create_file(filename, NULL, opts, &local_err); | 715 ret = bdrv_create_file(filename, opts, &local_err); |
716 if (ret < 0) { 717 error_propagate(errp, local_err); 718 goto cleanup; 719 } 720 721 qcow_bs = NULL; 722 ret = bdrv_open(&qcow_bs, filename, NULL, NULL, 723 BDRV_O_RDWR | BDRV_O_PROTOCOL, NULL, &local_err); --- 210 unchanged lines hidden (view full) --- 934 935static BlockDriver bdrv_qcow = { 936 .format_name = "qcow", 937 .instance_size = sizeof(BDRVQcowState), 938 .bdrv_probe = qcow_probe, 939 .bdrv_open = qcow_open, 940 .bdrv_close = qcow_close, 941 .bdrv_reopen_prepare = qcow_reopen_prepare, | 716 if (ret < 0) { 717 error_propagate(errp, local_err); 718 goto cleanup; 719 } 720 721 qcow_bs = NULL; 722 ret = bdrv_open(&qcow_bs, filename, NULL, NULL, 723 BDRV_O_RDWR | BDRV_O_PROTOCOL, NULL, &local_err); --- 210 unchanged lines hidden (view full) --- 934 935static BlockDriver bdrv_qcow = { 936 .format_name = "qcow", 937 .instance_size = sizeof(BDRVQcowState), 938 .bdrv_probe = qcow_probe, 939 .bdrv_open = qcow_open, 940 .bdrv_close = qcow_close, 941 .bdrv_reopen_prepare = qcow_reopen_prepare, |
942 .bdrv_create2 = qcow_create, | 942 .bdrv_create = qcow_create, |
943 .bdrv_has_zero_init = bdrv_has_zero_init_1, 944 945 .bdrv_co_readv = qcow_co_readv, 946 .bdrv_co_writev = qcow_co_writev, 947 .bdrv_co_get_block_status = qcow_co_get_block_status, 948 949 .bdrv_set_key = qcow_set_key, 950 .bdrv_make_empty = qcow_make_empty, --- 12 unchanged lines hidden --- | 943 .bdrv_has_zero_init = bdrv_has_zero_init_1, 944 945 .bdrv_co_readv = qcow_co_readv, 946 .bdrv_co_writev = qcow_co_writev, 947 .bdrv_co_get_block_status = qcow_co_get_block_status, 948 949 .bdrv_set_key = qcow_set_key, 950 .bdrv_make_empty = qcow_make_empty, --- 12 unchanged lines hidden --- |