block.c (6686ce3f1628f045035d58db8890d20705fd5c34) block.c (c2e0dbbfd7265eb9a7170ab195d8f9f8a1cbd1af)
1/*
2 * QEMU System Emulator block driver
3 *
4 * Copyright (c) 2003 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

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

1266int bdrv_append_temp_snapshot(BlockDriverState *bs, int flags, Error **errp)
1267{
1268 /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */
1269 char *tmp_filename = g_malloc0(PATH_MAX + 1);
1270 int64_t total_size;
1271 QemuOpts *opts = NULL;
1272 QDict *snapshot_options;
1273 BlockDriverState *bs_snapshot;
1/*
2 * QEMU System Emulator block driver
3 *
4 * Copyright (c) 2003 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

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

1266int bdrv_append_temp_snapshot(BlockDriverState *bs, int flags, Error **errp)
1267{
1268 /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */
1269 char *tmp_filename = g_malloc0(PATH_MAX + 1);
1270 int64_t total_size;
1271 QemuOpts *opts = NULL;
1272 QDict *snapshot_options;
1273 BlockDriverState *bs_snapshot;
1274 Error *local_err;
1274 Error *local_err = NULL;
1275 int ret;
1276
1277 /* if snapshot, we create a temporary backing file and open it
1278 instead of opening 'filename' directly */
1279
1280 /* Get the required size from the image */
1281 total_size = bdrv_getlength(bs);
1282 if (total_size < 0) {

--- 2915 unchanged lines hidden ---
1275 int ret;
1276
1277 /* if snapshot, we create a temporary backing file and open it
1278 instead of opening 'filename' directly */
1279
1280 /* Get the required size from the image */
1281 total_size = bdrv_getlength(bs);
1282 if (total_size < 0) {

--- 2915 unchanged lines hidden ---