Revision 69b4d86d
b/block/vmdk.c | ||
---|---|---|
82 | 82 |
|
83 | 83 |
typedef struct BDRVVmdkState { |
84 | 84 |
int desc_offset; |
85 |
bool cid_updated; |
|
85 | 86 |
uint32_t parent_cid; |
86 | 87 |
int num_extents; |
87 | 88 |
/* Extent array with num_extents entries, ascend ordered by address */ |
... | ... | |
853 | 854 |
int n; |
854 | 855 |
int64_t index_in_cluster; |
855 | 856 |
uint64_t cluster_offset; |
856 |
static int cid_update = 0; |
|
857 | 857 |
VmdkMetaData m_data; |
858 | 858 |
|
859 | 859 |
if (sector_num > bs->total_sectors) { |
... | ... | |
900 | 900 |
buf += n * 512; |
901 | 901 |
|
902 | 902 |
// update CID on the first write every time the virtual disk is opened |
903 |
if (!cid_update) {
|
|
903 |
if (!s->cid_updated) {
|
|
904 | 904 |
vmdk_write_cid(bs, time(NULL)); |
905 |
cid_update++;
|
|
905 |
s->cid_updated = true;
|
|
906 | 906 |
} |
907 | 907 |
} |
908 | 908 |
return 0; |
Also available in: Unified diff