diff options
Diffstat (limited to 'emulators/qemu-devel/files')
-rw-r--r-- | emulators/qemu-devel/files/patch-aa | 100 | ||||
-rw-r--r-- | emulators/qemu-devel/files/patch-ba | 9 | ||||
-rw-r--r-- | emulators/qemu-devel/files/patch-bb | 11 | ||||
-rw-r--r-- | emulators/qemu-devel/files/patch-bg | 59 | ||||
-rw-r--r-- | emulators/qemu-devel/files/patch-bk | 28 |
5 files changed, 38 insertions, 169 deletions
diff --git a/emulators/qemu-devel/files/patch-aa b/emulators/qemu-devel/files/patch-aa index dbec12e4ab30..305e6af8ef11 100644 --- a/emulators/qemu-devel/files/patch-aa +++ b/emulators/qemu-devel/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 diff --git a/emulators/qemu-devel/files/patch-ba b/emulators/qemu-devel/files/patch-ba deleted file mode 100644 index 1d43df4b4bba..000000000000 --- a/emulators/qemu-devel/files/patch-ba +++ /dev/null @@ -1,9 +0,0 @@ -Index: qemu/block.c -@@ -31,6 +31,7 @@ - #include <sys/types.h> - #include <sys/stat.h> - #include <sys/ioctl.h> -+#include <sys/queue.h> - #include <sys/disk.h> - #endif - diff --git a/emulators/qemu-devel/files/patch-bb b/emulators/qemu-devel/files/patch-bb deleted file mode 100644 index 02302a316df2..000000000000 --- a/emulators/qemu-devel/files/patch-bb +++ /dev/null @@ -1,11 +0,0 @@ -Index: qemu/block.c -@@ -175,7 +175,9 @@ - #ifdef _BSD - struct stat sb; - if (!fstat(fd,&sb) && (S_IFCHR & sb.st_mode)) { -+#ifdef DIOCGMEDIASIZE - if (ioctl(fd, DIOCGMEDIASIZE, (off_t *)&size)) -+#endif - size = lseek(fd, 0LL, SEEK_END); - } else - #endif diff --git a/emulators/qemu-devel/files/patch-bg b/emulators/qemu-devel/files/patch-bg index 5beb0f5c88bb..57a9ef32df97 100644 --- a/emulators/qemu-devel/files/patch-bg +++ b/emulators/qemu-devel/files/patch-bg @@ -1,40 +1,25 @@ -Index: qemu/qemu-mkcow.c -@@ -21,6 +21,8 @@ - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -+#include "config-host.h" -+ - #include <stdlib.h> - #include <stdio.h> - #include <stdarg.h> -@@ -36,6 +38,13 @@ - #include <sys/stat.h> - #include <netinet/in.h> +Index: qemu/Makefile.target +@@ -179,7 +179,7 @@ -+#ifdef _BSD -+#include <sys/types.h> -+#include <sys/ioctl.h> -+#include <sys/queue.h> -+#include <sys/disk.h> -+#endif -+ - #include "cow.h" + ######################################################### + +-DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE ++DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DSMBD=\"${LOCALBASE}/sbin/smbd\" + LIBS+=-lm + ifndef CONFIG_USER_ONLY + LIBS+=-lz +Index: qemu/vl.c +@@ -1560,8 +1560,13 @@ + fclose(f); + atexit(smb_exit); - #include "bswap.h" -@@ -56,6 +64,15 @@ int cow_create(int cow_fd, const char *i - perror(image_filename); - exit(1); - } -+#ifdef _BSD -+ struct stat sb; -+ if (!fstat(fd,&sb) && (S_IFCHR & sb.st_mode)) { -+#ifdef DIOCGMEDIASIZE -+ if (ioctl(fd, DIOCGMEDIASIZE, (off_t *)&image_sectors)) ++#ifdef __FreeBSD__ ++ snprintf(smb_cmdline, sizeof(smb_cmdline), SMBD " -s %s", ++ smb_conf); ++#else + snprintf(smb_cmdline, sizeof(smb_cmdline), "/usr/sbin/smbd -s %s", + smb_conf); +#endif -+ image_sectors = lseek(fd, 0LL, SEEK_END); -+ } else -+#endif - image_sectors = lseek64(fd, 0, SEEK_END); - if (fstat(fd, &st) != 0) { - close(fd); + + slirp_add_exec(0, smb_cmdline, 4, 139); + } diff --git a/emulators/qemu-devel/files/patch-bk b/emulators/qemu-devel/files/patch-bk index f18a5be6e26f..09281f31aef2 100644 --- a/emulators/qemu-devel/files/patch-bk +++ b/emulators/qemu-devel/files/patch-bk @@ -1,10 +1,4 @@ Index: qemu/slirp/bootp.c -=================================================================== -RCS file: /cvsroot/qemu/qemu/slirp/bootp.c,v -retrieving revision 1.3 -diff -u -r1.3 bootp.c ---- slirp/bootp.c 4 Jun 2004 15:30:48 -0000 1.3 -+++ slirp/bootp.c 5 Jun 2004 19:34:22 -0000 @@ -29,11 +29,12 @@ #define START_ADDR 15 @@ -104,13 +98,14 @@ diff -u -r1.3 bootp.c + dhcp_decode(bp->bp_vend, DHCP_OPT_LEN, &dhcp_msg_type,&reqaddr); + dprintf("bootp packet op=%d msgtype=%d reqaddr=%x\n", bp->bp_op, dhcp_msg_type,ntohl(reqaddr.sin_addr.s_addr)); - if (dhcp_msg_type != DHCPDISCOVER && - dhcp_msg_type != DHCPREQUEST) -@@ -149,19 +182,18 @@ + if (dhcp_msg_type == 0) + dhcp_msg_type = DHCPREQUEST; /* Force reply for old BOOTP clients */ +@@ -152,21 +185,18 @@ m->m_data += sizeof(struct udpiphdr); memset(rbp, 0, sizeof(struct bootp_t)); - if (dhcp_msg_type == DHCPDISCOVER) { +- new_addr: - bc = get_new_addr(&daddr.sin_addr); - if (!bc) { - dprintf("no address left\n"); @@ -120,8 +115,9 @@ diff -u -r1.3 bootp.c - } else { - bc = find_addr(&daddr.sin_addr, bp->bp_hwaddr); - if (!bc) { -- dprintf("no address assigned\n"); -- return; +- /* if never assigned, behaves as if it was already +- assigned (windows fix because it remembers its address) */ +- goto new_addr; - } + bc=NULL; + daddr.sin_addr.s_addr=htonl(0L); @@ -138,7 +134,15 @@ diff -u -r1.3 bootp.c } dprintf("offered addr=%08x\n", ntohl(daddr.sin_addr.s_addr)); -@@ -182,18 +214,21 @@ +@@ -181,25 +211,27 @@ + rbp->bp_hlen = 6; + memcpy(rbp->bp_hwaddr, bp->bp_hwaddr, 6); + +- rbp->bp_yiaddr = daddr.sin_addr; /* Client IP address */ +- rbp->bp_siaddr = saddr.sin_addr; /* Server IP address */ ++ rbp->bp_yiaddr = daddr.sin_addr; /* IP address */ + + q = rbp->bp_vend; memcpy(q, rfc1533_cookie, 4); q += 4; |