diff options
author | Guillem Jover <guillem@hadrons.org> | 2011-09-09 03:40:24 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2011-09-12 21:43:22 +0200 |
commit | ec76bb9b04b851f403fac72fddaa8613025c7da4 (patch) | |
tree | addc5ba4589bf2cc07e78c2a19d6c476455e0b43 /i386/i386at/rtc.c | |
parent | b509223167d6cf0780e1dd7ac9b2bde6bf6a2728 (diff) |
Remove unused [!MACH_KERNEL] driver code
Use «unifdef -DMACK_KERNEL=1» as a starting point, but only remove
the code not exposed on public headers, the rest is needed to build
properly from userland.
* device/cons.c [!MACH_KERNEL]: Remove includes.
[!MACH_KERNEL] (constty): Remove variable.
(cninit, cnmaygetc) [MACH_KERNEL]: Remove preprocessor conditionals.
[!MACH_KERNEL] (cnopen, cnclose, cnread, cnwrite, cnioctl, cnselect)
(cncontrol): Remove functions.
* device/cons.h (struct consdev) [MACH_KERNEL]: Remove preprocessor
conditional.
* device/kmsg.h [MACH_KERNEL]: Likewise.
* i386/i386at/autoconf.c [!MACH_KERNEL]: Remove includes.
* i386/i386at/kd_event.c [!MACH_KERNEL]: Likewise.
[!MACH_KERNEL] (kbd_sel, kbdpgrp, kbdflag): Remove variables.
[!MACH_KERNEL] (KBD_COLL, KBD_ASYNC, KBD_NBIO): Remove macros.
(kbdopen, kbdclose, kbd_enqueue) [!MACH_KERNEL]: Remove code.
[!MACH_KERNEL] (kbdioctl, kbdselect, kbdread): Remove functions.
[!MACH_KERNEL] (X_kdb_enter_init, X_kdb_exit_init: Likewise.
* i386/i386at/kd_mouse.c [!MACH_KERNEL]: Remove includes.
[!MACH_KERNEL] (mouse_sel, mousepgrp, mouseflag): Remove variables.
[!MACH_KERNEL] (MOUSE_COLL, MOUSE_ASYNC, MOUSE_NBIO): Remove macros.
(mouseopen, mouseclose, kd_mouse_read, mouse_enqueue) [!MACH_KERNEL]: Remove
code.
[!MACH_KERNEL] (mouseioctl, mouseselect, mouseread): Remove functions.
* i386/i386at/lpr.c [!MACH_KERNEL]: Remove includes.
(lpropen) [MACH_KERNEL]: Remove preprocessor conditionals.
(lpropen, lprclose, lprstart) [!MACH_KERNEL]: Remove code.
[!MACH_KERNEL] (lprwrite, lprioctl, lprstop): Remove functions.
* i386/i386at/rtc.c (readtodc, writetodc) [!MACH_KERNEL]: Remove code.
* kern/mach_factor.c [MACH_KERNEL]: Remove preprocessor conditional.
* xen/time.c (readtodc) [!MACH_KERNEL]: Remove code.
Diffstat (limited to 'i386/i386at/rtc.c')
-rw-r--r-- | i386/i386at/rtc.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/i386/i386at/rtc.c b/i386/i386at/rtc.c index 77a83e8..6776801 100644 --- a/i386/i386at/rtc.c +++ b/i386/i386at/rtc.c @@ -138,11 +138,7 @@ readtodc(tp) int i, days = 0; spl_t ospl; -#ifdef MACH_KERNEL ospl = splclock(); -#else /* MACH_KERNEL */ - ospl = spl5(); -#endif /* MACH_KERNEL */ if (rtcget(&rtclk)) { splx(ospl); return(-1); @@ -169,12 +165,6 @@ readtodc(tp) days += yeartoday(i); n += days * 3600 * 24; -#ifdef MACH_KERNEL -#else /* MACH_KERNEL */ - n += tz.tz_minuteswest * 60; - if (tz.tz_dsttime) - n -= 3600; -#endif /* MACH_KERNEL */ *tp = n; @@ -189,24 +179,14 @@ writetodc() int diff, i, j; spl_t ospl; -#ifdef MACH_KERNEL ospl = splclock(); -#else /* MACH_KERNEL */ - ospl = spl5(); -#endif /* MACH_KERNEL */ if (rtcget(&rtclk)) { splx(ospl); return(-1); } splx(ospl); -#ifdef MACH_KERNEL diff = 0; -#else /* MACH_KERNEL */ - diff = tz.tz_minuteswest * 60; - if (tz.tz_dsttime) - diff -= 3600; -#endif /* MACH_KERNEL */ n = (time.tv_sec - diff) % (3600 * 24); /* hrs+mins+secs */ rtclk.rtc_sec = dectohexdec(n%60); n /= 60; @@ -230,11 +210,7 @@ writetodc() rtclk.rtc_dom = dectohexdec(++n); -#ifdef MACH_KERNEL ospl = splclock(); -#else /* MACH_KERNEL */ - ospl = spl5(); -#endif /* MACH_KERNEL */ rtcput(&rtclk); splx(ospl); |