Date: Thu, 12 Feb 2009 10:34:11 GMT From: "Scot W. Hetzel" <swhetzel@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/131603: [patch] emulators/kqemu-kmod-devel: unit2minor doesn't exist on recent 8.0-CURRENT Message-ID: <200902121034.n1CAYB6P048445@www.freebsd.org> Resent-Message-ID: <200902121040.n1CAe1Yp060896@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 131603 >Category: ports >Synopsis: [patch] emulators/kqemu-kmod-devel: unit2minor doesn't exist on recent 8.0-CURRENT >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Feb 12 10:40:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Scot W. Hetzel >Release: FreeBSD 8.0-CURRENT >Organization: >Environment: FreeBSD hp010 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Mon Feb 9 00:17:11 CST 2009 root@hp010:/usr/obj/usr/src/sys/DV8135NR amd64 >Description: When trying to load the kqemu.ko kernel module, it fails with: kldload: can't load kqemu.ko: Exec format error /var/log/messages shows: Feb 12 03:27:58 hp010 kernel: link_elf_obj: symbol unit2minor undefined Feb 12 03:27:58 hp010 kernel: kldload: /boot/modules/kqemu.ko: Unsupported file type Feb 12 03:27:58 hp010 root: ./kqemu: WARNING: kqemu module failed to load. CURRENT > 800062 no longer has unit2minor. >How-To-Repeat: install either emulators/kqemu-kmod or emulators/kqemu-kmod-devel then try to load kqemu.ko on a recent 8.0-CURRENT. >Fix: Apply the attached patch to emulators/kqemu-kmod-devel Note: emulators/kqemu-kmod also needs the same patch: cd /usr/ports/emulators/kqemu-kmod cp ../kqemu-kmod-devel/files/patch-unit2minorfix files Then update the PORTREVISON in emulators/kqemu-kmod/Makefile. Patch attached with submission follows: Index: Makefile =================================================================== RCS file: /home/ncvs/ports/emulators/kqemu-kmod-devel/Makefile,v retrieving revision 1.30 diff -u -r1.30 Makefile --- Makefile 22 Jun 2008 22:06:15 -0000 1.30 +++ Makefile 12 Feb 2009 09:59:54 -0000 @@ -7,6 +7,7 @@ PORTNAME= kqemu PORTVERSION= 1.4.0.p1 +PORTREVISION= 1 CATEGORIES= emulators kld MASTER_SITES= http://bellard.org/qemu/ \ http://qemu.org/ \ Index: files/patch-unit2minorfix =================================================================== RCS file: files/patch-unit2minorfix diff -N files/patch-unit2minorfix --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-unit2minorfix 12 Feb 2009 09:58:56 -0000 @@ -0,0 +1,16 @@ +--- kqemu-freebsd.c.orig 2009-02-12 03:45:30.607773000 -0600 ++++ kqemu-freebsd.c 2009-02-12 03:50:10.019986534 -0600 +@@ -381,7 +381,12 @@ + + r = clone_create(&kqemuclones, &kqemu_cdevsw, &unit, dev, 0); + if (r) { +- *dev = make_dev(&kqemu_cdevsw, unit2minor(unit), ++ *dev = make_dev(&kqemu_cdevsw, ++#if __FreeBSD_version < 800062 ++ unit2minor(unit), ++#else /* __FreeBSD_version >= 800062 */ ++ unit, ++#endif /* __FreeBSD_version < 800062 */ + UID_ROOT, GID_WHEEL, 0660, "kqemu%d", unit); + if (*dev != NULL) { + dev_ref(*dev); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902121034.n1CAYB6P048445>