diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-04-22 15:10:57 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-04-22 15:10:57 +0000 |
commit | 745df0d0ed3f778bd125e87bdfc3815cfcb2273e (patch) | |
tree | 0a391898bc1287eaee31d1d56c0ee7243390f734 /sys/dev | |
parent | 92c3a6b185c40b1334c4d5734428d2f3d1e9fa2a (diff) |
handle long long time_t in debug code
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/drm_irq.c | 8 | ||||
-rw-r--r-- | sys/dev/pci/envy.c | 10 | ||||
-rw-r--r-- | sys/dev/usb/hidkbd.c | 10 |
3 files changed, 14 insertions, 14 deletions
diff --git a/sys/dev/pci/drm/drm_irq.c b/sys/dev/pci/drm/drm_irq.c index 2896e921852..6e9adf2abce 100644 --- a/sys/dev/pci/drm/drm_irq.c +++ b/sys/dev/pci/drm/drm_irq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: drm_irq.c,v 1.44 2013/03/18 12:36:51 jsg Exp $ */ +/* $OpenBSD: drm_irq.c,v 1.45 2013/04/22 15:10:55 deraadt Exp $ */ /** * \file drm_irq.c * IRQ support @@ -745,10 +745,10 @@ drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, int crtc, */ *vblank_time = ns_to_timeval(timeval_to_ns(&etime) - delta_ns); - DPRINTF("crtc %d : v %d p(%d,%d)@ %ld.%ld -> %ld.%ld [e %d us, %d rep]\n", + DPRINTF("crtc %d : v %d p(%d,%d)@ %lld.%ld -> %lld.%ld [e %d us, %d rep]\n", crtc, (int)vbl_status, hpos, vpos, - (long)etime.tv_sec, (long)etime.tv_usec, - (long)vblank_time->tv_sec, (long)vblank_time->tv_usec, + (long long)etime.tv_sec, (long)etime.tv_usec, + (long long)vblank_time->tv_sec, (long)vblank_time->tv_usec, (int)duration_ns/1000, i); vbl_status = DRM_VBLANKTIME_SCANOUTPOS_METHOD; diff --git a/sys/dev/pci/envy.c b/sys/dev/pci/envy.c index 2277cf002b3..35e7738d3d5 100644 --- a/sys/dev/pci/envy.c +++ b/sys/dev/pci/envy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: envy.c,v 1.53 2013/03/14 08:14:47 ratchov Exp $ */ +/* $OpenBSD: envy.c,v 1.54 2013/04/22 15:10:55 deraadt Exp $ */ /* * Copyright (c) 2007 Alexandre Ratchov <alex@caoua.org> * @@ -1918,13 +1918,13 @@ envy_pintr(struct envy_softc *sc) int i; if (sc->spurious > 0 || envydebug >= 2) { - printf("%s: spurious = %u, start = %u.%ld\n", + printf("%s: spurious = %u, start = %lld.%ld\n", DEVNAME(sc), sc->spurious, - sc->start_ts.tv_sec, sc->start_ts.tv_nsec); + (long long)sc->start_ts.tv_sec, sc->start_ts.tv_nsec); for (i = 0; i < sc->nintr; i++) { - printf("%u.%09ld: " + printf("%lld.%09ld: " "active=%d/%d pos=%d/%d st=%x/%x, ctl=%x\n", - sc->intrs[i].ts.tv_sec, + (long long)sc->intrs[i].ts.tv_sec, sc->intrs[i].ts.tv_nsec, sc->intrs[i].iactive, sc->intrs[i].oactive, diff --git a/sys/dev/usb/hidkbd.c b/sys/dev/usb/hidkbd.c index fe0f81bf171..b04dd1294ad 100644 --- a/sys/dev/usb/hidkbd.c +++ b/sys/dev/usb/hidkbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hidkbd.c,v 1.7 2012/07/13 12:33:08 shadchin Exp $ */ +/* $OpenBSD: hidkbd.c,v 1.8 2013/04/22 15:10:56 deraadt Exp $ */ /* $NetBSD: ukbd.c,v 1.85 2003/03/11 16:44:00 augustss Exp $ */ /* @@ -134,9 +134,9 @@ hidkbdtracedump(void) for (i = 0; i < HIDKBDTRACESIZE; i++) { struct hidkbdtraceinfo *p = &hidkbdtracedata[(i+hidkbdtraceindex)%HIDKBDTRACESIZE]; - printf("%lu.%06lu: mod=0x%02x key0=0x%02x key1=0x%02x " + printf("%lld.%06ld: mod=0x%02x key0=0x%02x key1=0x%02x " "key2=0x%02x key3=0x%02x\n", - p->tv.tv_sec, p->tv.tv_usec, + (long long)p->tv.tv_sec, p->tv.tv_usec, p->ud.modifiers, p->ud.keycode[0], p->ud.keycode[1], p->ud.keycode[2], p->ud.keycode[3]); } @@ -337,9 +337,9 @@ hidkbd_decode(struct hidkbd *kbd, struct hidkbd_data *ud) if (hidkbddebug > 5) { struct timeval tv; microtime(&tv); - DPRINTF((" at %lu.%06lu mod=0x%02x key0=0x%02x key1=0x%02x " + DPRINTF((" at %lld.%06ld mod=0x%02x key0=0x%02x key1=0x%02x " "key2=0x%02x key3=0x%02x\n", - tv.tv_sec, tv.tv_usec, + (long long)tv.tv_sec, tv.tv_usec, ud->modifiers, ud->keycode[0], ud->keycode[1], ud->keycode[2], ud->keycode[3])); } |