qcow2-snapshot.c (f2687fdb7571a444b5af3509574b659d35ddd601) qcow2-snapshot.c (307261b243df2edde538f3ed5c9d80e168529355)
1/*
2 * Block driver for the QCOW version 2 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

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

1021{
1022 int i, snapshot_index;
1023 BDRVQcow2State *s = bs->opaque;
1024 QCowSnapshot *sn;
1025 uint64_t *new_l1_table;
1026 int new_l1_bytes;
1027 int ret;
1028
1/*
2 * Block driver for the QCOW version 2 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

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

1021{
1022 int i, snapshot_index;
1023 BDRVQcow2State *s = bs->opaque;
1024 QCowSnapshot *sn;
1025 uint64_t *new_l1_table;
1026 int new_l1_bytes;
1027 int ret;
1028
1029 assert(bs->read_only);
1029 assert(bdrv_is_read_only(bs));
1030
1031 /* Search the snapshot */
1032 snapshot_index = find_snapshot_by_id_and_name(bs, snapshot_id, name);
1033 if (snapshot_index < 0) {
1034 error_setg(errp,
1035 "Can't find snapshot");
1036 return -ENOENT;
1037 }

--- 36 unchanged lines hidden ---
1030
1031 /* Search the snapshot */
1032 snapshot_index = find_snapshot_by_id_and_name(bs, snapshot_id, name);
1033 if (snapshot_index < 0) {
1034 error_setg(errp,
1035 "Can't find snapshot");
1036 return -ENOENT;
1037 }

--- 36 unchanged lines hidden ---