diff options
author | nox <nox@FreeBSD.org> | 2007-05-27 00:08:17 +0800 |
---|---|---|
committer | nox <nox@FreeBSD.org> | 2007-05-27 00:08:17 +0800 |
commit | 86a6985dd93226725c3ec4f29aa4f3f14ee24b72 (patch) | |
tree | ae03d40e871d575a7f67c63ad92f306044894793 /emulators/qemu | |
parent | 2518d41871addf7ebf1a86bb13ba0c523f9897ae (diff) | |
download | freebsd-ports-graphics-86a6985dd93226725c3ec4f29aa4f3f14ee24b72.tar.gz freebsd-ports-graphics-86a6985dd93226725c3ec4f29aa4f3f14ee24b72.tar.zst freebsd-ports-graphics-86a6985dd93226725c3ec4f29aa4f3f14ee24b72.zip |
Merge qcow2 fixes from qemu-devel (cvs):
- Qcow2 corruption fix, by Juergen Keil.
- Qcow2: Release refcount table clusters after growing the refcount table,
by Juergen Keil.
Diffstat (limited to 'emulators/qemu')
-rw-r--r-- | emulators/qemu/Makefile | 2 | ||||
-rw-r--r-- | emulators/qemu/files/patch-block-qcow2.c | 25 |
2 files changed, 26 insertions, 1 deletions
diff --git a/emulators/qemu/Makefile b/emulators/qemu/Makefile index fa995d21373..ac52a214aa4 100644 --- a/emulators/qemu/Makefile +++ b/emulators/qemu/Makefile @@ -7,7 +7,7 @@ PORTNAME= qemu PORTVERSION= 0.9.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= emulators MASTER_SITES= http://qemu.org/:release \ http://qemu-forum.ipi.fi/qemu-snapshots/:snapshot \ diff --git a/emulators/qemu/files/patch-block-qcow2.c b/emulators/qemu/files/patch-block-qcow2.c new file mode 100644 index 00000000000..e392c5114dd --- /dev/null +++ b/emulators/qemu/files/patch-block-qcow2.c @@ -0,0 +1,25 @@ +Index: qemu/block-qcow2.c +@@ -1886,6 +1886,8 @@ + int64_t table_offset; + uint64_t data64; + uint32_t data32; ++ int old_table_size; ++ int64_t old_table_offset; + + if (min_size <= s->refcount_table_size) + return 0; +@@ -1931,10 +1933,14 @@ + &data32, sizeof(data32)) != sizeof(data32)) + goto fail; + qemu_free(s->refcount_table); ++ old_table_offset = s->refcount_table_offset; ++ old_table_size = s->refcount_table_size; + s->refcount_table = new_table; + s->refcount_table_size = new_table_size; ++ s->refcount_table_offset = table_offset; + + update_refcount(bs, table_offset, new_table_size2, 1); ++ free_clusters(bs, old_table_offset, old_table_size * sizeof(uint64_t)); + return 0; + fail: + free_clusters(bs, table_offset, new_table_size2); |