From owner-freebsd-current@FreeBSD.ORG Wed Oct 22 08:48:00 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E02981065679; Wed, 22 Oct 2008 08:47:59 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.delphij.net (delphij-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:2c9::2]) by mx1.freebsd.org (Postfix) with ESMTP id 860E68FC17; Wed, 22 Oct 2008 08:47:59 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [211.166.10.233]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.delphij.net (Postfix) with ESMTPS id 7AA5C28454; Wed, 22 Oct 2008 16:47:58 +0800 (CST) Received: from localhost (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id D6996EB4675; Wed, 22 Oct 2008 16:47:57 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by localhost (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with ESMTP id eKJ9hX9ldII3; Wed, 22 Oct 2008 16:47:52 +0800 (CST) Received: from delta.delphij.net (c-76-103-40-85.hsd1.ca.comcast.net [76.103.40.85]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id B1A3AEB42DC; Wed, 22 Oct 2008 16:47:51 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:subject:x-enigmail-version:openpgp:content-type; b=ol1Qn0wjEXD8xq62OKjquRABonzJI9TK6+n3svr8IimOJiua9gPD8zYK0RK/+rqcC SLvlMaTCyGYIWbZKtbc/A== Message-ID: <48FEE8B0.7090906@delphij.net> Date: Wed, 22 Oct 2008 01:47:44 -0700 From: Xin LI Organization: The Geek China Organization User-Agent: Thunderbird 2.0.0.17 (X11/20080926) MIME-Version: 1.0 To: FreeBSD Current , jhb@freebsd.org X-Enigmail-Version: 0.95.7 OpenPGP: id=18EDEBA0; url=http://www.delphij.net/delphij.asc Content-Type: multipart/mixed; boundary="------------050302050204080100070303" Cc: Subject: [patch] fix build wrt ppbus X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Oct 2008 08:48:00 -0000 This is a multi-part message in MIME format. --------------050302050204080100070303 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Here is a patch which can (presumbly) fix ppbus build issue... I don't think I'm familiar with the code enough so I'd like to seek review from someone else. Cheers, -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkj+6LAACgkQi+vbBBjt66DkkwCfdqzbx4MIZOQjVb3tWEpoaSqr gmQAoJrM0zOt+XGMXVLzlaoHMCZe7L0L =YT9q -----END PGP SIGNATURE----- --------------050302050204080100070303 Content-Type: text/x-patch; name="ppbus-fixbuild.diff" Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="ppbus-fixbuild.diff" Index: lpt.c =================================================================== --- lpt.c (版本 184151) +++ lpt.c (工作副本) @@ -399,7 +399,7 @@ sc->cdev_bypass = make_dev(&lpt_cdevsw, unit, UID_ROOT, GID_WHEEL, 0600, LPT_NAME "%d.ctl", unit); sc->cdev_bypass->si_drv1 = sc; - sc->cdev_bypass->si_drv2 = LP_BYPASS; + sc->cdev_bypass->si_drv2 = (void *)(intptr_t)LP_BYPASS; return (0); } @@ -476,7 +476,7 @@ } else sc->sc_state |= LPTINIT; - sc->sc_flags = dev->si_drv2; + sc->sc_flags = (char)(intptr_t)dev->si_drv2; /* Check for open with BYPASS flag set. */ if (sc->sc_flags & LP_BYPASS) { Index: ppi.c =================================================================== --- ppi.c (版本 184151) +++ ppi.c (工作副本) @@ -171,7 +171,7 @@ UID_ROOT, GID_WHEEL, 0600, "ppi%d", device_get_unit(dev)); if (ppi->ppi_cdev == NULL) { - device_printf("Failed to create character device\n"); + device_printf(dev, "Failed to create character device\n"); return (ENXIO); } ppi->ppi_cdev->si_drv1 = ppi; @@ -496,6 +496,7 @@ { struct ppi_data *ppi = dev->si_drv1; device_t ppidev = ppi->ppi_device; + device_t ppbus = device_get_parent(ppidev); int error = 0; u_int8_t *val = (u_int8_t *)data; --------------050302050204080100070303--