qcow.c (34b5d2c68eb4082c288e70fb99c61af8f7b96fde) qcow.c (cc84d90ff54c025190dbe49ec5fea1268217c5f2)
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

--- 670 unchanged lines hidden (view full) ---

679 } else if (!strcmp(options->name, BLOCK_OPT_BACKING_FILE)) {
680 backing_file = options->value.s;
681 } else if (!strcmp(options->name, BLOCK_OPT_ENCRYPT)) {
682 flags |= options->value.n ? BLOCK_FLAG_ENCRYPT : 0;
683 }
684 options++;
685 }
686
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

--- 670 unchanged lines hidden (view full) ---

679 } else if (!strcmp(options->name, BLOCK_OPT_BACKING_FILE)) {
680 backing_file = options->value.s;
681 } else if (!strcmp(options->name, BLOCK_OPT_ENCRYPT)) {
682 flags |= options->value.n ? BLOCK_FLAG_ENCRYPT : 0;
683 }
684 options++;
685 }
686
687 ret = bdrv_create_file(filename, options);
687 ret = bdrv_create_file(filename, options, &local_err);
688 if (ret < 0) {
688 if (ret < 0) {
689 qerror_report_err(local_err);
690 error_free(local_err);
689 return ret;
690 }
691
692 ret = bdrv_file_open(&qcow_bs, filename, NULL, BDRV_O_RDWR, &local_err);
693 if (ret < 0) {
694 qerror_report_err(local_err);
695 error_free(local_err);
696 return ret;

--- 230 unchanged lines hidden ---
691 return ret;
692 }
693
694 ret = bdrv_file_open(&qcow_bs, filename, NULL, BDRV_O_RDWR, &local_err);
695 if (ret < 0) {
696 qerror_report_err(local_err);
697 error_free(local_err);
698 return ret;

--- 230 unchanged lines hidden ---