Date: Fri, 5 Nov 2004 17:50:27 GMT From: Craig Rodrigues <rodrigc@crodrigues.org> To: freebsd-usb@FreeBSD.org Subject: Re: bin/71615: [usb] [patch] cleanup of the usr.sbin/usbd code Message-ID: <200411051750.iA5HoRop037829@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/71615; it has been noted by GNATS. From: Craig Rodrigues <rodrigc@crodrigues.org> 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 <ctype.h> #include <signal.h> #include <paths.h> +#include <stdint.h> #include <sys/param.h> #include <sys/types.h> #include <sys/errno.h> @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411051750.iA5HoRop037829>