Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 04 Feb 2009 13:04:47 -0500
From:      Michael Butler <imb@protected-networks.net>
To:        John Baldwin <jhb@freebsd.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: lpt stopped working
Message-ID:  <4989D8BF.6010301@protected-networks.net>
In-Reply-To: <4989CE44.7010209@protected-networks.net>
References:  <200902021643.39862.c47g@gmx.at>	<4987157E.9080605@protected-networks.net>	<200902040919.10647.jhb@freebsd.org> <4989CE44.7010209@protected-networks.net>

next in thread | previous in thread | raw e-mail | index | archive | help
I wrote:
> kqemu[-devel] compiles but fails when attempting to kldload it with:
> 
> 	kernel: link_elf: symbol unit2minor undefined
> 
>  .. which is a different issue and seems to need a similar patch to that
> applied to fuse-kmod for -current since unit2minor has 'gone away',

Something trivial like this seems to make it load and run again ..

*** kqemu-freebsd.c~    Wed Feb  4 12:34:54 2009
--- kqemu-freebsd.c     Wed Feb  4 12:36:09 2009
***************
*** 381,387 ****

      r = clone_create(&kqemuclones, &kqemu_cdevsw, &unit, dev, 0);
      if (r) {
!       *dev = make_dev(&kqemu_cdevsw, unit2minor(unit),
            UID_ROOT, GID_WHEEL, 0660, "kqemu%d", unit);
        if (*dev != NULL) {
            dev_ref(*dev);
--- 381,392 ----

      r = clone_create(&kqemuclones, &kqemu_cdevsw, &unit, dev, 0);
      if (r) {
!       *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);

	Michael



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4989D8BF.6010301>