From owner-freebsd-emulation Tue Aug 20 4: 1:52 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 24F6A37B400 for ; Tue, 20 Aug 2002 04:01:47 -0700 (PDT) Received: from birch.ripe.net (birch.ripe.net [193.0.1.96]) by mx1.FreeBSD.org (Postfix) with ESMTP id 34B9A43E4A for ; Tue, 20 Aug 2002 04:01:46 -0700 (PDT) (envelope-from marks@ripe.net) Received: from laptop.6bone.nl (cow.ripe.net [193.0.1.239]) by birch.ripe.net (8.12.5/8.11.6) with SMTP id g7KB1iF4014904; Tue, 20 Aug 2002 13:01:44 +0200 Received: (nullmailer pid 28320 invoked by uid 1000); Tue, 20 Aug 2002 11:01:34 -0000 Date: Tue, 20 Aug 2002 13:01:34 +0200 From: Mark Santcroos To: emulation@freebsd.org Cc: vsilyaev@mindspring.com Subject: vmware2 fix for fo_ioctl api change Message-ID: <20020820110134.GG716@laptop.6bone.nl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="bp/iNruPH9dso1Pn" Content-Disposition: inline User-Agent: Mutt/1.4i X-Handles: MS6-6BONE, MS18417-RIPE X-RIPE-Spam-Status: NONE ; -989 X-RIPE-Spam-Level: Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Attached patches fixes compilation of vmware2 on -CURRENT. Note that it doesn't work at the moment, but that has other reasons and will be addressed in a seperate patch. (Not sure yet whether it is a vmware thing or a linux emu thing) Please commit. Mark (fo_ioctl.patch needs to be put in 'files' and makefile patch is needed to include that patch) -- Mark Santcroos RIPE Network Coordination Centre http://www.ripe.net/home/mark/ New Projects Group/TTM --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="vmware_makefile.patch" --- /usr/ports/emulators/vmware2/Makefile Wed Aug 14 19:01:42 2002 +++ ./Makefile Tue Aug 20 12:52:27 2002 @@ -110,6 +110,9 @@ ${WRKSRC}/vmware-distrib/vmmon-only/freebsd/*.c .endif cat ${FILESDIR}/kmoddeps.patch | (cd ${WRKSRC} && patch) > /dev/null 2>&1 +.if ${OSVERSION} >= 50038 + cat ${FILESDIR}/fo_ioctl.patch | (cd ${WRKSRC} && patch) > /dev/null 2>&1 +.endif setoptions: ${SED} -e 's;@@PREFIX@@;${PREFIX};' \ --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="fo_ioctl.patch" --- vmmon-only/freebsd/linux_emu.c Tue Aug 20 12:40:02 2002 +++ vmmon-only/freebsd/linux_emu.c Tue Aug 20 12:42:23 2002 @@ -306,7 +306,7 @@ struct linux_floppy_struct fls; struct fd_type fdt; - if ((error = fo_ioctl(fp, FD_GTYPE, (caddr_t)&fdt, td)) != 0) + if ((error = fo_ioctl(fp, FD_GTYPE, (caddr_t)&fdt, td->td_ucred, td)) != 0) return error; bzero(&fls, sizeof(fls)); @@ -330,7 +330,7 @@ struct linux_hd_geometry drive_geo; struct disklabel dl; - if ((error = fo_ioctl(fp, DIOCGDINFO, (caddr_t)&dl, td)) != 0) + if ((error = fo_ioctl(fp, DIOCGDINFO, (caddr_t)&dl, td->td_ucred, td)) != 0) return error; bzero(&drive_geo, sizeof(drive_geo)); @@ -351,7 +351,7 @@ struct linux_hd_driveid driveid; unsigned int capacity; - if ((error = fo_ioctl(fp, DIOCGDINFO, (caddr_t)&dl, td)) != 0) + if ((error = fo_ioctl(fp, DIOCGDINFO, (caddr_t)&dl, td->td_ucred, td)) != 0) return error; bzero(&driveid, sizeof(driveid)); @@ -388,7 +388,7 @@ struct ioc_vol bsd_vol; struct linux_cdrom_volctrl linux_vol; - if ((error = fo_ioctl(fp, CDIOCGETVOL, (caddr_t)&bsd_vol, td)) != 0) + if ((error = fo_ioctl(fp, CDIOCGETVOL, (caddr_t)&bsd_vol, td->td_ucred, td)) != 0) return error; linux_vol.channel0 = bsd_vol.vol[0]; @@ -411,7 +411,7 @@ if ((error = copyin(muls, &ms, sizeof(ms))) != 0) return error; - if ((error = fo_ioctl(fp, CDIOREADTOCHEADER, (caddr_t)&h, td)) != 0) + if ((error = fo_ioctl(fp, CDIOREADTOCHEADER, (caddr_t)&h, td->td_ucred, td)) != 0) return error; bzero(&t, sizeof(t)); @@ -419,7 +419,7 @@ t.address_format = ms.addr_format ; /* BSD and LINUX formats equal */ t.track = 0; /* get content from the first track */ - if ((error = fo_ioctl(fp, CDIOREADTOCENTRY, (caddr_t)&t, td)) != 0) + if ((error = fo_ioctl(fp, CDIOREADTOCENTRY, (caddr_t)&t, td->td_ucred, td)) != 0) return error; bsd_to_linux_msf_lba(ms.addr_format, &t.entry.addr, &ms.addr); --- vmnet-only/freebsd/vmnet_linux.c Tue Aug 20 12:40:02 2002 +++ vmnet-only/freebsd/vmnet_linux.c Tue Aug 20 12:42:59 2002 @@ -90,7 +90,7 @@ switch (macAddr.version) { case 1: - error = fo_ioctl(fp, SIOCSIFADDR, (caddr_t)macAddr.addr, td); + error = fo_ioctl(fp, SIOCSIFADDR, (caddr_t)macAddr.addr, td->td_ucred, td); DEB(printf("Get ethernet address: %6D\n", macAddr.addr, ":")); break; default: --bp/iNruPH9dso1Pn-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message