syscons.c (81030) | syscons.c (81050) |
---|---|
1/*- 2 * Copyright (c) 1992-1998 S�ren Schmidt 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * | 1/*- 2 * Copyright (c) 1992-1998 S�ren Schmidt 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * |
28 * $FreeBSD: head/sys/dev/syscons/syscons.c 81030 2001-08-02 08:30:40Z yokota $ | 28 * $FreeBSD: head/sys/dev/syscons/syscons.c 81050 2001-08-02 13:22:33Z yokota $ |
29 */ 30 | 29 */ 30 |
31#include "splash.h" | |
32#include "opt_syscons.h" | 31#include "opt_syscons.h" |
32#include "opt_splash.h" |
|
33#include "opt_ddb.h" 34#ifdef __i386__ 35#include "opt_apm.h" 36#endif 37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/conf.h> --- 56 unchanged lines hidden (view full) --- 97 98static char init_done = COLD; 99static char shutdown_in_progress = FALSE; 100static char sc_malloc = FALSE; 101 102static int saver_mode = CONS_NO_SAVER; /* LKM/user saver */ 103static int run_scrn_saver = FALSE; /* should run the saver? */ 104static long scrn_blank_time = 0; /* screen saver timeout value */ | 33#include "opt_ddb.h" 34#ifdef __i386__ 35#include "opt_apm.h" 36#endif 37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/conf.h> --- 56 unchanged lines hidden (view full) --- 97 98static char init_done = COLD; 99static char shutdown_in_progress = FALSE; 100static char sc_malloc = FALSE; 101 102static int saver_mode = CONS_NO_SAVER; /* LKM/user saver */ 103static int run_scrn_saver = FALSE; /* should run the saver? */ 104static long scrn_blank_time = 0; /* screen saver timeout value */ |
105#if NSPLASH > 0 | 105#ifdef DEV_SPLASH |
106static int scrn_blanked; /* # of blanked screen */ 107static int sticky_splash = FALSE; 108 109static void none_saver(sc_softc_t *sc, int blank) { } 110static void (*current_saver)(sc_softc_t *, int) = none_saver; 111#endif 112 113#if !defined(SC_NO_FONT_LOADING) && defined(SC_DFLT_FONT) --- 35 unchanged lines hidden (view full) --- 149static int sccngetch(int flags); 150static void sccnupdate(scr_stat *scp); 151static scr_stat *alloc_scp(sc_softc_t *sc, int vty); 152static void init_scp(sc_softc_t *sc, int vty, scr_stat *scp); 153static timeout_t scrn_timer; 154static int and_region(int *s1, int *e1, int s2, int e2); 155static void scrn_update(scr_stat *scp, int show_cursor); 156 | 106static int scrn_blanked; /* # of blanked screen */ 107static int sticky_splash = FALSE; 108 109static void none_saver(sc_softc_t *sc, int blank) { } 110static void (*current_saver)(sc_softc_t *, int) = none_saver; 111#endif 112 113#if !defined(SC_NO_FONT_LOADING) && defined(SC_DFLT_FONT) --- 35 unchanged lines hidden (view full) --- 149static int sccngetch(int flags); 150static void sccnupdate(scr_stat *scp); 151static scr_stat *alloc_scp(sc_softc_t *sc, int vty); 152static void init_scp(sc_softc_t *sc, int vty, scr_stat *scp); 153static timeout_t scrn_timer; 154static int and_region(int *s1, int *e1, int s2, int e2); 155static void scrn_update(scr_stat *scp, int show_cursor); 156 |
157#if NSPLASH > 0 | 157#ifdef DEV_SPLASH |
158static int scsplash_callback(int event, void *arg); 159static void scsplash_saver(sc_softc_t *sc, int show); 160static int add_scrn_saver(void (*this_saver)(sc_softc_t *, int)); 161static int remove_scrn_saver(void (*this_saver)(sc_softc_t *, int)); 162static int set_scrn_saver_mode(scr_stat *scp, int mode, u_char *pal, int border); 163static int restore_scrn_saver_mode(scr_stat *scp, int changemode); 164static void stop_scrn_saver(sc_softc_t *sc, void (*saver)(sc_softc_t *, int)); 165static int wait_scrn_saver_stop(sc_softc_t *sc); 166#define scsplash_stick(stick) (sticky_splash = (stick)) | 158static int scsplash_callback(int event, void *arg); 159static void scsplash_saver(sc_softc_t *sc, int show); 160static int add_scrn_saver(void (*this_saver)(sc_softc_t *, int)); 161static int remove_scrn_saver(void (*this_saver)(sc_softc_t *, int)); 162static int set_scrn_saver_mode(scr_stat *scp, int mode, u_char *pal, int border); 163static int restore_scrn_saver_mode(scr_stat *scp, int changemode); 164static void stop_scrn_saver(sc_softc_t *sc, void (*saver)(sc_softc_t *, int)); 165static int wait_scrn_saver_stop(sc_softc_t *sc); 166#define scsplash_stick(stick) (sticky_splash = (stick)) |
167#else /* !NSPLASH */ | 167#else /* !DEV_SPLASH */ |
168#define scsplash_stick(stick) | 168#define scsplash_stick(stick) |
169#endif /* NSPLASH */ | 169#endif /* DEV_SPLASH */ |
170 171static int do_switch_scr(sc_softc_t *sc, int s); 172static int vt_proc_alive(scr_stat *scp); 173static int signal_vt_rel(scr_stat *scp); 174static int signal_vt_acq(scr_stat *scp); 175static int finish_vt_rel(scr_stat *scp, int release, int *s); 176static int finish_vt_acq(scr_stat *scp); 177static void exchange_scr(sc_softc_t *sc); --- 150 unchanged lines hidden (view full) --- 328 sc->config = flags; 329 scp = SC_STAT(sc->dev[0]); 330 if (sc_console == NULL) /* sc_console_unit < 0 */ 331 sc_console = scp; 332 333#ifdef SC_PIXEL_MODE 334 if ((sc->config & SC_VESA800X600) 335 && ((*vidsw[sc->adapter]->get_info)(sc->adp, M_VESA_800x600, &info) == 0)) { | 170 171static int do_switch_scr(sc_softc_t *sc, int s); 172static int vt_proc_alive(scr_stat *scp); 173static int signal_vt_rel(scr_stat *scp); 174static int signal_vt_acq(scr_stat *scp); 175static int finish_vt_rel(scr_stat *scp, int release, int *s); 176static int finish_vt_acq(scr_stat *scp); 177static void exchange_scr(sc_softc_t *sc); --- 150 unchanged lines hidden (view full) --- 328 sc->config = flags; 329 scp = SC_STAT(sc->dev[0]); 330 if (sc_console == NULL) /* sc_console_unit < 0 */ 331 sc_console = scp; 332 333#ifdef SC_PIXEL_MODE 334 if ((sc->config & SC_VESA800X600) 335 && ((*vidsw[sc->adapter]->get_info)(sc->adp, M_VESA_800x600, &info) == 0)) { |
336#if NSPLASH > 0 | 336#ifdef DEV_SPLASH |
337 if (sc->flags & SC_SPLASH_SCRN) 338 splash_term(sc->adp); 339#endif 340 sc_set_graphics_mode(scp, NULL, M_VESA_800x600); 341 sc_set_pixel_mode(scp, NULL, COL, ROW, 16); 342 sc->initial_mode = M_VESA_800x600; | 337 if (sc->flags & SC_SPLASH_SCRN) 338 splash_term(sc->adp); 339#endif 340 sc_set_graphics_mode(scp, NULL, M_VESA_800x600); 341 sc_set_pixel_mode(scp, NULL, COL, ROW, 16); 342 sc->initial_mode = M_VESA_800x600; |
343#if NSPLASH > 0 | 343#ifdef DEV_SPLASH |
344 /* put up the splash again! */ 345 if (sc->flags & SC_SPLASH_SCRN) 346 splash_init(sc->adp, scsplash_callback, sc); 347#endif 348 } 349#endif /* SC_PIXEL_MODE */ 350 351 /* initialize cursor */ --- 433 unchanged lines hidden (view full) --- 785 case CONS_SAVERMODE: /* set saver mode */ 786 switch(*(int *)data) { 787 case CONS_NO_SAVER: 788 case CONS_USR_SAVER: 789 /* if a LKM screen saver is running, stop it first. */ 790 scsplash_stick(FALSE); 791 saver_mode = *(int *)data; 792 s = spltty(); | 344 /* put up the splash again! */ 345 if (sc->flags & SC_SPLASH_SCRN) 346 splash_init(sc->adp, scsplash_callback, sc); 347#endif 348 } 349#endif /* SC_PIXEL_MODE */ 350 351 /* initialize cursor */ --- 433 unchanged lines hidden (view full) --- 785 case CONS_SAVERMODE: /* set saver mode */ 786 switch(*(int *)data) { 787 case CONS_NO_SAVER: 788 case CONS_USR_SAVER: 789 /* if a LKM screen saver is running, stop it first. */ 790 scsplash_stick(FALSE); 791 saver_mode = *(int *)data; 792 s = spltty(); |
793#if NSPLASH > 0 | 793#ifdef DEV_SPLASH |
794 if ((error = wait_scrn_saver_stop(NULL))) { 795 splx(s); 796 return error; 797 } | 794 if ((error = wait_scrn_saver_stop(NULL))) { 795 splx(s); 796 return error; 797 } |
798#endif /* NSPLASH */ | 798#endif |
799 run_scrn_saver = TRUE; 800 if (saver_mode == CONS_USR_SAVER) 801 scp->status |= SAVER_RUNNING; 802 else 803 scp->status &= ~SAVER_RUNNING; 804 scsplash_stick(TRUE); 805 splx(s); 806 break; --- 765 unchanged lines hidden (view full) --- 1572 if (debugger > 0 || panicstr || shutdown_in_progress) { 1573 sc_touch_scrn_saver(); 1574 } else if (scp != scp->sc->cur_scp) { 1575 return; 1576 } 1577 1578 if (!run_scrn_saver) 1579 scp->sc->flags &= ~SC_SCRN_IDLE; | 799 run_scrn_saver = TRUE; 800 if (saver_mode == CONS_USR_SAVER) 801 scp->status |= SAVER_RUNNING; 802 else 803 scp->status &= ~SAVER_RUNNING; 804 scsplash_stick(TRUE); 805 splx(s); 806 break; --- 765 unchanged lines hidden (view full) --- 1572 if (debugger > 0 || panicstr || shutdown_in_progress) { 1573 sc_touch_scrn_saver(); 1574 } else if (scp != scp->sc->cur_scp) { 1575 return; 1576 } 1577 1578 if (!run_scrn_saver) 1579 scp->sc->flags &= ~SC_SCRN_IDLE; |
1580#if NSPLASH > 0 | 1580#ifdef DEV_SPLASH |
1581 if ((saver_mode != CONS_LKM_SAVER) || !(scp->sc->flags & SC_SCRN_IDLE)) 1582 if (scp->sc->flags & SC_SCRN_BLANKED) 1583 stop_scrn_saver(scp->sc, current_saver); | 1581 if ((saver_mode != CONS_LKM_SAVER) || !(scp->sc->flags & SC_SCRN_IDLE)) 1582 if (scp->sc->flags & SC_SCRN_BLANKED) 1583 stop_scrn_saver(scp->sc, current_saver); |
1584#endif /* NSPLASH */ | 1584#endif |
1585 1586 if (scp != scp->sc->cur_scp || scp->sc->blink_in_progress 1587 || scp->sc->switch_in_progress) 1588 return; 1589 /* 1590 * FIXME: unlike scrn_timer(), we call scrn_update() from here even 1591 * when write_in_progress is non-zero. XXX 1592 */ --- 57 unchanged lines hidden (view full) --- 1650 else 1651 sc->flags &= ~SC_SCRN_IDLE; 1652 } else { 1653 sc->scrn_time_stamp = tv.tv_sec; 1654 sc->flags &= ~SC_SCRN_IDLE; 1655 if (scrn_blank_time > 0) 1656 run_scrn_saver = TRUE; 1657 } | 1585 1586 if (scp != scp->sc->cur_scp || scp->sc->blink_in_progress 1587 || scp->sc->switch_in_progress) 1588 return; 1589 /* 1590 * FIXME: unlike scrn_timer(), we call scrn_update() from here even 1591 * when write_in_progress is non-zero. XXX 1592 */ --- 57 unchanged lines hidden (view full) --- 1650 else 1651 sc->flags &= ~SC_SCRN_IDLE; 1652 } else { 1653 sc->scrn_time_stamp = tv.tv_sec; 1654 sc->flags &= ~SC_SCRN_IDLE; 1655 if (scrn_blank_time > 0) 1656 run_scrn_saver = TRUE; 1657 } |
1658#if NSPLASH > 0 | 1658#ifdef DEV_SPLASH |
1659 if ((saver_mode != CONS_LKM_SAVER) || !(sc->flags & SC_SCRN_IDLE)) 1660 if (sc->flags & SC_SCRN_BLANKED) 1661 stop_scrn_saver(sc, current_saver); | 1659 if ((saver_mode != CONS_LKM_SAVER) || !(sc->flags & SC_SCRN_IDLE)) 1660 if (sc->flags & SC_SCRN_BLANKED) 1661 stop_scrn_saver(sc, current_saver); |
1662#endif /* NSPLASH */ | 1662#endif |
1663 1664 /* should we just return ? */ 1665 if (sc->blink_in_progress || sc->switch_in_progress 1666 || sc->write_in_progress) { 1667 if (again) 1668 timeout(scrn_timer, sc, hz / 10); 1669 splx(s); 1670 return; 1671 } 1672 1673 /* Update the screen */ 1674 scp = sc->cur_scp; /* cur_scp may have changed... */ 1675 if (!ISGRAPHSC(scp) && !(sc->flags & SC_SCRN_BLANKED)) 1676 scrn_update(scp, TRUE); 1677 | 1663 1664 /* should we just return ? */ 1665 if (sc->blink_in_progress || sc->switch_in_progress 1666 || sc->write_in_progress) { 1667 if (again) 1668 timeout(scrn_timer, sc, hz / 10); 1669 splx(s); 1670 return; 1671 } 1672 1673 /* Update the screen */ 1674 scp = sc->cur_scp; /* cur_scp may have changed... */ 1675 if (!ISGRAPHSC(scp) && !(sc->flags & SC_SCRN_BLANKED)) 1676 scrn_update(scp, TRUE); 1677 |
1678#if NSPLASH > 0 | 1678#ifdef DEV_SPLASH |
1679 /* should we activate the screen saver? */ 1680 if ((saver_mode == CONS_LKM_SAVER) && (sc->flags & SC_SCRN_IDLE)) 1681 if (!ISGRAPHSC(scp) || (sc->flags & SC_SCRN_BLANKED)) 1682 (*current_saver)(sc, TRUE); | 1679 /* should we activate the screen saver? */ 1680 if ((saver_mode == CONS_LKM_SAVER) && (sc->flags & SC_SCRN_IDLE)) 1681 if (!ISGRAPHSC(scp) || (sc->flags & SC_SCRN_BLANKED)) 1682 (*current_saver)(sc, TRUE); |
1683#endif /* NSPLASH */ | 1683#endif |
1684 1685 if (again) 1686 timeout(scrn_timer, sc, hz / 25); 1687 splx(s); 1688} 1689 1690static int 1691and_region(int *s1, int *e1, int s2, int e2) --- 122 unchanged lines hidden (view full) --- 1814#endif /* SC_NO_CUTPASTE */ 1815 1816 scp->end = 0; 1817 scp->start = scp->xsize*scp->ysize - 1; 1818 1819 --scp->sc->videoio_in_progress; 1820} 1821 | 1684 1685 if (again) 1686 timeout(scrn_timer, sc, hz / 25); 1687 splx(s); 1688} 1689 1690static int 1691and_region(int *s1, int *e1, int s2, int e2) --- 122 unchanged lines hidden (view full) --- 1814#endif /* SC_NO_CUTPASTE */ 1815 1816 scp->end = 0; 1817 scp->start = scp->xsize*scp->ysize - 1; 1818 1819 --scp->sc->videoio_in_progress; 1820} 1821 |
1822#if NSPLASH > 0 | 1822#ifdef DEV_SPLASH |
1823static int 1824scsplash_callback(int event, void *arg) 1825{ 1826 sc_softc_t *sc; 1827 int error; 1828 1829 sc = (sc_softc_t *)arg; 1830 --- 211 unchanged lines hidden (view full) --- 2042 } 2043 error = tsleep((caddr_t)&scrn_blanked, PZERO | PCATCH, "scrsav", 0); 2044 if ((error != 0) && (error != ERESTART)) 2045 break; 2046 } 2047 run_scrn_saver = FALSE; 2048 return error; 2049} | 1823static int 1824scsplash_callback(int event, void *arg) 1825{ 1826 sc_softc_t *sc; 1827 int error; 1828 1829 sc = (sc_softc_t *)arg; 1830 --- 211 unchanged lines hidden (view full) --- 2042 } 2043 error = tsleep((caddr_t)&scrn_blanked, PZERO | PCATCH, "scrsav", 0); 2044 if ((error != 0) && (error != ERESTART)) 2045 break; 2046 } 2047 run_scrn_saver = FALSE; 2048 return error; 2049} |
2050#endif /* NSPLASH */ | 2050#endif /* DEV_SPLASH */ |
2051 2052void 2053sc_touch_scrn_saver(void) 2054{ 2055 scsplash_stick(FALSE); 2056 run_scrn_saver = FALSE; 2057} 2058 --- 329 unchanged lines hidden (view full) --- 2388 update_kbd_state(scp, scp->status, LOCK_MASK); 2389 2390 mark_all(scp); 2391} 2392 2393void 2394sc_puts(scr_stat *scp, u_char *buf, int len) 2395{ | 2051 2052void 2053sc_touch_scrn_saver(void) 2054{ 2055 scsplash_stick(FALSE); 2056 run_scrn_saver = FALSE; 2057} 2058 --- 329 unchanged lines hidden (view full) --- 2388 update_kbd_state(scp, scp->status, LOCK_MASK); 2389 2390 mark_all(scp); 2391} 2392 2393void 2394sc_puts(scr_stat *scp, u_char *buf, int len) 2395{ |
2396#if NSPLASH > 0 | 2396#ifdef DEV_SPLASH |
2397 /* make screensaver happy */ 2398 if (!sticky_splash && scp == scp->sc->cur_scp) 2399 run_scrn_saver = FALSE; 2400#endif 2401 2402 if (scp->tsw) 2403 (*scp->tsw->te_puts)(scp, buf, len); 2404 --- 299 unchanged lines hidden (view full) --- 2704 sc_show_font(scp, 0); 2705 } 2706#endif /* !SC_NO_FONT_LOADING */ 2707 2708#ifndef SC_NO_PALETTE_LOADING 2709 save_palette(sc->adp, sc->palette); 2710#endif 2711 | 2397 /* make screensaver happy */ 2398 if (!sticky_splash && scp == scp->sc->cur_scp) 2399 run_scrn_saver = FALSE; 2400#endif 2401 2402 if (scp->tsw) 2403 (*scp->tsw->te_puts)(scp, buf, len); 2404 --- 299 unchanged lines hidden (view full) --- 2704 sc_show_font(scp, 0); 2705 } 2706#endif /* !SC_NO_FONT_LOADING */ 2707 2708#ifndef SC_NO_PALETTE_LOADING 2709 save_palette(sc->adp, sc->palette); 2710#endif 2711 |
2712#if NSPLASH > 0 | 2712#ifdef DEV_SPLASH |
2713 if (!(sc->flags & SC_SPLASH_SCRN) && (flags & SC_KERNEL_CONSOLE)) { 2714 /* we are ready to put up the splash image! */ 2715 splash_init(sc->adp, scsplash_callback, sc); 2716 sc->flags |= SC_SPLASH_SCRN; 2717 } | 2713 if (!(sc->flags & SC_SPLASH_SCRN) && (flags & SC_KERNEL_CONSOLE)) { 2714 /* we are ready to put up the splash image! */ 2715 splash_init(sc->adp, scsplash_callback, sc); 2716 sc->flags |= SC_SPLASH_SCRN; 2717 } |
2718#endif /* NSPLASH */ | 2718#endif |
2719 } 2720 2721 /* the rest is not necessary, if we have done it once */ 2722 if (sc->flags & SC_INIT_DONE) 2723 return; 2724 2725 /* initialize mapscrn arrays to a one to one map */ 2726 for (i = 0; i < sizeof(sc->scr_map); i++) --- 8 unchanged lines hidden (view full) --- 2735{ 2736 sc_softc_t *sc; 2737 scr_stat *scp; 2738 2739 sc = sc_get_softc(unit, flags & SC_KERNEL_CONSOLE); 2740 if (sc == NULL) 2741 return; /* shouldn't happen */ 2742 | 2719 } 2720 2721 /* the rest is not necessary, if we have done it once */ 2722 if (sc->flags & SC_INIT_DONE) 2723 return; 2724 2725 /* initialize mapscrn arrays to a one to one map */ 2726 for (i = 0; i < sizeof(sc->scr_map); i++) --- 8 unchanged lines hidden (view full) --- 2735{ 2736 sc_softc_t *sc; 2737 scr_stat *scp; 2738 2739 sc = sc_get_softc(unit, flags & SC_KERNEL_CONSOLE); 2740 if (sc == NULL) 2741 return; /* shouldn't happen */ 2742 |
2743#if NSPLASH > 0 | 2743#ifdef DEV_SPLASH |
2744 /* this console is no longer available for the splash screen */ 2745 if (sc->flags & SC_SPLASH_SCRN) { 2746 splash_term(sc->adp); 2747 sc->flags &= ~SC_SPLASH_SCRN; 2748 } | 2744 /* this console is no longer available for the splash screen */ 2745 if (sc->flags & SC_SPLASH_SCRN) { 2746 splash_term(sc->adp); 2747 sc->flags &= ~SC_SPLASH_SCRN; 2748 } |
2749#endif /* NSPLASH */ | 2749#endif |
2750 2751#if 0 /* XXX */ 2752 /* move the hardware cursor to the upper-left corner */ 2753 (*vidsw[sc->adapter]->set_hw_cursor)(sc->adp, 0, 0); 2754#endif 2755 2756 /* release the keyboard and the video card */ 2757 if (sc->keyboard >= 0) --- 40 unchanged lines hidden (view full) --- 2798 && sc_console->smode.mode == VT_AUTO) 2799 sc_switch_scr(sc_console->sc, sc_console->index); 2800 shutdown_in_progress = TRUE; 2801} 2802 2803int 2804sc_clean_up(scr_stat *scp) 2805{ | 2750 2751#if 0 /* XXX */ 2752 /* move the hardware cursor to the upper-left corner */ 2753 (*vidsw[sc->adapter]->set_hw_cursor)(sc->adp, 0, 0); 2754#endif 2755 2756 /* release the keyboard and the video card */ 2757 if (sc->keyboard >= 0) --- 40 unchanged lines hidden (view full) --- 2798 && sc_console->smode.mode == VT_AUTO) 2799 sc_switch_scr(sc_console->sc, sc_console->index); 2800 shutdown_in_progress = TRUE; 2801} 2802 2803int 2804sc_clean_up(scr_stat *scp) 2805{ |
2806#if NSPLASH > 0 | 2806#ifdef DEV_SPLASH |
2807 int error; | 2807 int error; |
2808#endif /* NSPLASH */ | 2808#endif |
2809 2810 if (scp->sc->flags & SC_SCRN_BLANKED) { 2811 sc_touch_scrn_saver(); | 2809 2810 if (scp->sc->flags & SC_SCRN_BLANKED) { 2811 sc_touch_scrn_saver(); |
2812#if NSPLASH > 0 | 2812#ifdef DEV_SPLASH |
2813 if ((error = wait_scrn_saver_stop(scp->sc))) 2814 return error; | 2813 if ((error = wait_scrn_saver_stop(scp->sc))) 2814 return error; |
2815#endif /* NSPLASH */ | 2815#endif |
2816 } 2817 scp->status |= MOUSE_HIDDEN; 2818 sc_remove_mouse_image(scp); 2819 sc_remove_cutmarking(scp); 2820 return 0; 2821} 2822 2823void --- 345 unchanged lines hidden (view full) --- 3169 break; 3170 3171 case BTAB: 3172 if (!(sc->flags & SC_SCRN_BLANKED)) 3173 return c; 3174 break; 3175 3176 case SPSC: | 2816 } 2817 scp->status |= MOUSE_HIDDEN; 2818 sc_remove_mouse_image(scp); 2819 sc_remove_cutmarking(scp); 2820 return 0; 2821} 2822 2823void --- 345 unchanged lines hidden (view full) --- 3169 break; 3170 3171 case BTAB: 3172 if (!(sc->flags & SC_SCRN_BLANKED)) 3173 return c; 3174 break; 3175 3176 case SPSC: |
3177#if NSPLASH > 0 | 3177#ifdef DEV_SPLASH |
3178 /* force activatation/deactivation of the screen saver */ 3179 if (!(sc->flags & SC_SCRN_BLANKED)) { 3180 run_scrn_saver = TRUE; 3181 sc->scrn_time_stamp -= scrn_blank_time; 3182 } 3183 if (cold) { 3184 /* 3185 * While devices are being probed, the screen saver need --- 4 unchanged lines hidden (view full) --- 3190 stop_scrn_saver(sc, current_saver); 3191 } else { 3192 if (!ISGRAPHSC(scp)) { 3193 scsplash_stick(TRUE); 3194 (*current_saver)(sc, TRUE); 3195 } 3196 } 3197 } | 3178 /* force activatation/deactivation of the screen saver */ 3179 if (!(sc->flags & SC_SCRN_BLANKED)) { 3180 run_scrn_saver = TRUE; 3181 sc->scrn_time_stamp -= scrn_blank_time; 3182 } 3183 if (cold) { 3184 /* 3185 * While devices are being probed, the screen saver need --- 4 unchanged lines hidden (view full) --- 3190 stop_scrn_saver(sc, current_saver); 3191 } else { 3192 if (!ISGRAPHSC(scp)) { 3193 scsplash_stick(TRUE); 3194 (*current_saver)(sc, TRUE); 3195 } 3196 } 3197 } |
3198#endif /* NSPLASH */ | 3198#endif /* DEV_SPLASH */ |
3199 break; 3200 3201 case RBT: 3202#ifndef SC_DISABLE_REBOOT 3203 shutdown_nice(0); 3204#endif 3205 break; 3206 --- 301 unchanged lines hidden --- | 3199 break; 3200 3201 case RBT: 3202#ifndef SC_DISABLE_REBOOT 3203 shutdown_nice(0); 3204#endif 3205 break; 3206 --- 301 unchanged lines hidden --- |