From owner-freebsd-usb@FreeBSD.ORG Fri Nov 5 17:50:28 2004 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3607116A4CE for ; Fri, 5 Nov 2004 17:50:28 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 219CD43D5E for ; Fri, 5 Nov 2004 17:50:28 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id iA5HoSjM037830 for ; Fri, 5 Nov 2004 17:50:28 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id iA5HoRop037829; Fri, 5 Nov 2004 17:50:27 GMT (envelope-from gnats) Date: Fri, 5 Nov 2004 17:50:27 GMT Message-Id: <200411051750.iA5HoRop037829@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Craig Rodrigues Subject: Re: bin/71615: [usb] [patch] cleanup of the usr.sbin/usbd code X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Craig Rodrigues List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Nov 2004 17:50:28 -0000 The following reply was made to PR bin/71615; it has been noted by GNATS. From: Craig Rodrigues To: freebsd-gnats-submit@FreeBSD.org Cc: dan@obluda.cz Subject: Re: bin/71615: [usb] [patch] cleanup of the usr.sbin/usbd code Date: Fri, 5 Nov 2004 12:49:55 -0500 Hi, This patch works with intmax_t, so should make 64-bit and 32-bit platforms happy. :) --- usbd.c.orig Fri Nov 5 12:12:00 2004 +++ usbd.c Fri Nov 5 12:44:59 2004 @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include @@ -583,8 +584,8 @@ event->ue_type == USB_EVENT_DEVICE_DETACH) { devinfo = &event->u.ue_device; - printf(" at %ld.%09ld, %s, %s:\n", - timespec->tv_sec, timespec->tv_nsec, + printf(" at %jd.%09ld, %s, %s:\n", + (intmax_t)timespec->tv_sec, timespec->tv_nsec, devinfo->udi_product, devinfo->udi_vendor); printf(" vndr=0x%04x prdct=0x%04x rlse=0x%04x " @@ -607,12 +608,12 @@ } } else if (event->ue_type == USB_EVENT_CTRLR_ATTACH || event->ue_type == USB_EVENT_CTRLR_DETACH) { - printf(" bus=%d", &event->u.ue_ctrlr.ue_bus); + printf(" bus=%d", event->u.ue_ctrlr.ue_bus); } else if (event->ue_type == USB_EVENT_DRIVER_ATTACH || event->ue_type == USB_EVENT_DRIVER_DETACH) { printf(" cookie=%u devname=%s", - &event->u.ue_driver.ue_cookie.cookie, - &event->u.ue_driver.ue_devname); + event->u.ue_driver.ue_cookie.cookie, + event->u.ue_driver.ue_devname); } printf("\n"); } -- Craig Rodrigues http://crodrigues.org rodrigc@crodrigues.org