Update to 0.6.0s.20041020.

PR:		ports/72945
Submitted by:	Juergen Lock <nox@jelal.kn-bremen.de> (maintainer)
This commit is contained in:
Norikatsu Shigemura 2004-10-25 14:57:30 +00:00
parent f3352f06d6
commit 96866477a3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=120161
18 changed files with 108 additions and 374 deletions

View File

@ -6,36 +6,32 @@
#
PORTNAME= qemu
PORTVERSION= 0.6.0s
PORTVERSION= 0.6.0s.20041020
CATEGORIES= emulators
MASTER_SITES= http://dad-answers.com/qemu/FreeBSD/
DISTNAME= ${PORTNAME}-snapshot-2004-07-15_23
MASTER_SITES= http://www.fuqn.ca/distfiles/ \
http://dad-answers.com/qemu/
DISTNAME= ${PORTNAME}-snapshot-2004-10-20_23
MAINTAINER= nox@jelal.kn-bremen.de
COMMENT= QEMU CPU Emulator
BUILD_DEPENDS+= texi2html:${PORTSDIR}/textproc/texi2html
RUN_DEPENDS+= ${LOCALBASE}/sbin/smbd:${PORTSDIR}/net/samba
HAS_CONFIGURE= yes
USE_BZIP2= yes
USE_GMAKE= yes
USE_GETOPT_LONG= yes
USE_SDL= sdl
USE_GCC= 3.3
USE_GCC= 3.4
USE_PERL5= yes
WRKSRC= ${WRKDIR}/${DISTNAME}
PATCH_STRIP= -p1
CONFIGURE_ARGS+= --prefix=${PREFIX} --cc=${CC}\ -I${PREFIX}/include
MAN1= qemu.1 qemu-mkcow.1
MAN1= qemu.1
ONLY_FOR_ARCHS= i386 amd64 powerpc
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 502126
BROKEN= "Does not compile on FreeBSD >= 5.x"
.endif
post-install:
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
MD5 (qemu-snapshot-2004-07-15_23.tar.bz2) = a45bec4f467f47401f745147091f1644
SIZE (qemu-snapshot-2004-07-15_23.tar.bz2) = 747718
MD5 (qemu-snapshot-2004-10-20_23.tar.bz2) = 6f14b647038ad70f91b5e9b6b99dad0f
SIZE (qemu-snapshot-2004-10-20_23.tar.bz2) = 823062

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"
#########################################################
#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))
-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);
+#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);
}

View File

@ -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;

View File

@ -16,6 +16,7 @@ is 100... The linux 2.6 kernel uses 1000 by default btw.) Enabling
patch to emulators/rtc.)
- using physical media doesn't work on 4.x hosts (missing DIOCGMEDIASIZE
ioctl)
- leaving X grab with shift-ctrl now often leaves shift or ctrl `pressed'
for the guest, hitting it once fixes that
- physical cdroms don't work at the moment because of the new block layer,
Antony says he already has a new patch for that so expect this to be
working again soon.
====

View File

@ -1,7 +1,7 @@
bin/qemu
bin/qemu-mkcow
bin/qemu-img
bin/qemu-system-ppc
bin/vmdk2raw
bin/qemu-system-sparc
%%PORTDOCS%%%%DOCSDIR%%/qemu-doc.html
%%PORTDOCS%%%%DOCSDIR%%/qemu-tech.html
share/qemu/bios.bin
@ -9,5 +9,6 @@ share/qemu/linux_boot.bin
share/qemu/vgabios.bin
share/qemu/vgabios-cirrus.bin
share/qemu/ppc_rom.bin
share/qemu/proll.bin
@dirrm share/qemu
%%PORTDOCS%%@dirrm %%DOCSDIR%%

View File

@ -6,36 +6,32 @@
#
PORTNAME= qemu
PORTVERSION= 0.6.0s
PORTVERSION= 0.6.0s.20041020
CATEGORIES= emulators
MASTER_SITES= http://dad-answers.com/qemu/FreeBSD/
DISTNAME= ${PORTNAME}-snapshot-2004-07-15_23
MASTER_SITES= http://www.fuqn.ca/distfiles/ \
http://dad-answers.com/qemu/
DISTNAME= ${PORTNAME}-snapshot-2004-10-20_23
MAINTAINER= nox@jelal.kn-bremen.de
COMMENT= QEMU CPU Emulator
BUILD_DEPENDS+= texi2html:${PORTSDIR}/textproc/texi2html
RUN_DEPENDS+= ${LOCALBASE}/sbin/smbd:${PORTSDIR}/net/samba
HAS_CONFIGURE= yes
USE_BZIP2= yes
USE_GMAKE= yes
USE_GETOPT_LONG= yes
USE_SDL= sdl
USE_GCC= 3.3
USE_GCC= 3.4
USE_PERL5= yes
WRKSRC= ${WRKDIR}/${DISTNAME}
PATCH_STRIP= -p1
CONFIGURE_ARGS+= --prefix=${PREFIX} --cc=${CC}\ -I${PREFIX}/include
MAN1= qemu.1 qemu-mkcow.1
MAN1= qemu.1
ONLY_FOR_ARCHS= i386 amd64 powerpc
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 502126
BROKEN= "Does not compile on FreeBSD >= 5.x"
.endif
post-install:
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
MD5 (qemu-snapshot-2004-07-15_23.tar.bz2) = a45bec4f467f47401f745147091f1644
SIZE (qemu-snapshot-2004-07-15_23.tar.bz2) = 747718
MD5 (qemu-snapshot-2004-10-20_23.tar.bz2) = 6f14b647038ad70f91b5e9b6b99dad0f
SIZE (qemu-snapshot-2004-10-20_23.tar.bz2) = 823062

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"
#########################################################
#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))
-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);
+#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);
}

View File

@ -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;

View File

@ -16,6 +16,7 @@ is 100... The linux 2.6 kernel uses 1000 by default btw.) Enabling
patch to emulators/rtc.)
- using physical media doesn't work on 4.x hosts (missing DIOCGMEDIASIZE
ioctl)
- leaving X grab with shift-ctrl now often leaves shift or ctrl `pressed'
for the guest, hitting it once fixes that
- physical cdroms don't work at the moment because of the new block layer,
Antony says he already has a new patch for that so expect this to be
working again soon.
====

View File

@ -1,7 +1,7 @@
bin/qemu
bin/qemu-mkcow
bin/qemu-img
bin/qemu-system-ppc
bin/vmdk2raw
bin/qemu-system-sparc
%%PORTDOCS%%%%DOCSDIR%%/qemu-doc.html
%%PORTDOCS%%%%DOCSDIR%%/qemu-tech.html
share/qemu/bios.bin
@ -9,5 +9,6 @@ share/qemu/linux_boot.bin
share/qemu/vgabios.bin
share/qemu/vgabios-cirrus.bin
share/qemu/ppc_rom.bin
share/qemu/proll.bin
@dirrm share/qemu
%%PORTDOCS%%@dirrm %%DOCSDIR%%