summaryrefslogtreecommitdiff
path: root/emulators/qemu/files/patch-aa
diff options
context:
space:
mode:
authorNorikatsu Shigemura <nork@FreeBSD.org>2004-10-25 14:57:30 +0000
committerNorikatsu Shigemura <nork@FreeBSD.org>2004-10-25 14:57:30 +0000
commit96866477a3fe00ae0dd23d275978eaac0246fa1e (patch)
tree5774ce0f5b281b75cf2efa870f4c9a11f08e15f2 /emulators/qemu/files/patch-aa
parentFix compilation on 4.x (gcc3-ism) (diff)
Update to 0.6.0s.20041020.
PR: ports/72945 Submitted by: Juergen Lock <nox@jelal.kn-bremen.de> (maintainer)
Notes
Notes: svn path=/head/; revision=120161
Diffstat (limited to 'emulators/qemu/files/patch-aa')
-rw-r--r--emulators/qemu/files/patch-aa100
1 files changed, 0 insertions, 100 deletions
diff --git a/emulators/qemu/files/patch-aa b/emulators/qemu/files/patch-aa
index dbec12e4ab30..305e6af8ef11 100644
--- a/emulators/qemu/files/patch-aa
+++ b/emulators/qemu/files/patch-aa
@@ -10,106 +10,6 @@ diff -urd --exclude=CVS ../cvs/qemu/Makefile qemu-0.5.5/Makefile
qemu.1: qemu-doc.texi
./texi2pod.pl $< qemu.pod
-diff -urd --exclude=CVS ../cvs/qemu/block.c qemu-0.5.5/block.c
---- ../cvs/qemu/block.c Sat May 8 16:27:20 2004
-+++ qemu-0.5.5/block.c Sun May 30 16:36:53 2004
-@@ -27,6 +27,13 @@
- #include <sys/mman.h>
- #endif
-
-+#ifdef _BSD
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+#include <sys/ioctl.h>
-+#include <sys/disk.h>
-+#endif
-+
- #include "cow.h"
-
- struct BlockDriverState {
-@@ -81,7 +88,10 @@
- {
- int fd;
- int64_t size;
-- struct cow_header_v2 cow_header;
-+ union {
-+ struct cow_header_v2 cow_header;
-+ uint8_t cow_buffer[2048];
-+ } cow;
- #ifndef _WIN32
- char template[] = "/tmp/vl.XXXXXX";
- int cow_fd;
-@@ -117,15 +127,15 @@
- bs->fd = fd;
-
- /* see if it is a cow image */
-- if (read(fd, &cow_header, sizeof(cow_header)) != sizeof(cow_header)) {
-+ if (read(fd, &cow.cow_header, sizeof(cow)) != sizeof(cow)) {
- fprintf(stderr, "%s: could not read header\n", filename);
- goto fail;
- }
- #ifndef _WIN32
-- if (be32_to_cpu(cow_header.magic) == COW_MAGIC &&
-- be32_to_cpu(cow_header.version) == COW_VERSION) {
-+ if (be32_to_cpu(cow.cow_header.magic) == COW_MAGIC &&
-+ be32_to_cpu(cow.cow_header.version) == COW_VERSION) {
- /* cow image found */
-- size = cow_header.size;
-+ size = cow.cow_header.size;
- #ifndef WORDS_BIGENDIAN
- size = bswap64(size);
- #endif
-@@ -133,34 +143,41 @@
-
- bs->cow_fd = fd;
- bs->fd = -1;
-- if (cow_header.backing_file[0] != '\0') {
-- if (stat(cow_header.backing_file, &st) != 0) {
-- fprintf(stderr, "%s: could not find original disk image '%s'\n", filename, cow_header.backing_file);
-+ if (cow.cow_header.backing_file[0] != '\0') {
-+ if (stat(cow.cow_header.backing_file, &st) != 0) {
-+ fprintf(stderr, "%s: could not find original disk image '%s'\n", filename, cow.cow_header.backing_file);
- goto fail;
- }
-- if (st.st_mtime != be32_to_cpu(cow_header.mtime)) {
-- fprintf(stderr, "%s: original raw disk image '%s' does not match saved timestamp\n", filename, cow_header.backing_file);
-+ if (st.st_mtime != be32_to_cpu(cow.cow_header.mtime)) {
-+ fprintf(stderr, "%s: original raw disk image '%s' does not match saved timestamp\n", filename, cow.cow_header.backing_file);
- goto fail;
- }
-- fd = open(cow_header.backing_file, O_RDONLY | O_LARGEFILE);
-+ fd = open(cow.cow_header.backing_file, O_RDONLY | O_LARGEFILE);
- if (fd < 0)
- goto fail;
- bs->fd = fd;
- }
- /* mmap the bitmap */
-- bs->cow_bitmap_size = ((bs->total_sectors + 7) >> 3) + sizeof(cow_header);
-+ bs->cow_bitmap_size = ((bs->total_sectors + 7) >> 3) + sizeof(cow.cow_header);
- bs->cow_bitmap_addr = mmap(get_mmap_addr(bs->cow_bitmap_size),
- bs->cow_bitmap_size,
- PROT_READ | PROT_WRITE,
- MAP_SHARED, bs->cow_fd, 0);
- if (bs->cow_bitmap_addr == MAP_FAILED)
- goto fail;
-- bs->cow_bitmap = bs->cow_bitmap_addr + sizeof(cow_header);
-+ bs->cow_bitmap = bs->cow_bitmap_addr + sizeof(cow.cow_header);
- bs->cow_sectors_offset = (bs->cow_bitmap_size + 511) & ~511;
- snapshot = 0;
- } else
- #endif
- {
-+#ifdef _BSD
-+ struct stat sb;
-+ if (!fstat(fd,&sb) && (S_IFCHR & sb.st_mode)) {
-+ if (ioctl(fd, DIOCGMEDIASIZE, (off_t *)&size))
-+ size = lseek(fd, 0LL, SEEK_END);
-+ } else
-+#endif
- /* standard raw image */
- size = lseek64(fd, 0, SEEK_END);
- bs->total_sectors = size / 512;
-Only in qemu-0.5.5: block.c.bck
Only in qemu-0.5.5: qemu.1
diff -urd --exclude=CVS ../cvs/qemu/target-i386/cpu.h qemu-0.5.5/target-i386/cpu.h
--- ../cvs/qemu/target-i386/cpu.h Thu May 20 15:01:56 2004