qemu-img.c (f30c66ba6e417a07e68ad6e0bc5da27561a3beea) | qemu-img.c (645ae7d88e5393a2a67ebe325f4456ecd49e33e5) |
---|---|
1/* 2 * QEMU disk image utility 3 * 4 * Copyright (c) 2003-2008 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 --- 3329 unchanged lines hidden (view full) --- 3338 } 3339 if (force_share) { 3340 qdict_put_bool(options, BDRV_OPT_FORCE_SHARE, true); 3341 } 3342 3343 bdrv_refresh_filename(bs); 3344 overlay_filename = bs->exact_filename[0] ? bs->exact_filename 3345 : bs->filename; | 1/* 2 * QEMU disk image utility 3 * 4 * Copyright (c) 2003-2008 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 --- 3329 unchanged lines hidden (view full) --- 3338 } 3339 if (force_share) { 3340 qdict_put_bool(options, BDRV_OPT_FORCE_SHARE, true); 3341 } 3342 3343 bdrv_refresh_filename(bs); 3344 overlay_filename = bs->exact_filename[0] ? bs->exact_filename 3345 : bs->filename; |
3346 out_real_path = g_malloc(PATH_MAX); 3347 3348 bdrv_get_full_backing_filename_from_filename(overlay_filename, 3349 out_baseimg, 3350 out_real_path, 3351 PATH_MAX, 3352 &local_err); | 3346 out_real_path = 3347 bdrv_get_full_backing_filename_from_filename(overlay_filename, 3348 out_baseimg, 3349 &local_err); |
3353 if (local_err) { 3354 error_reportf_err(local_err, 3355 "Could not resolve backing filename: "); 3356 ret = -1; | 3350 if (local_err) { 3351 error_reportf_err(local_err, 3352 "Could not resolve backing filename: "); 3353 ret = -1; |
3357 g_free(out_real_path); | |
3358 goto out; 3359 } 3360 3361 blk_new_backing = blk_new_open(out_real_path, NULL, 3362 options, src_flags, &local_err); 3363 g_free(out_real_path); 3364 if (!blk_new_backing) { 3365 error_reportf_err(local_err, --- 1631 unchanged lines hidden --- | 3354 goto out; 3355 } 3356 3357 blk_new_backing = blk_new_open(out_real_path, NULL, 3358 options, src_flags, &local_err); 3359 g_free(out_real_path); 3360 if (!blk_new_backing) { 3361 error_reportf_err(local_err, --- 1631 unchanged lines hidden --- |