schistory.c (102148) | schistory.c (109623) |
---|---|
1/*- 2 * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> 3 * Copyright (c) 1992-1998 S�ren Schmidt 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, 22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * | 1/*- 2 * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> 3 * Copyright (c) 1992-1998 S�ren Schmidt 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, 22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * |
29 * $FreeBSD: head/sys/dev/syscons/schistory.c 102148 2002-08-19 23:56:01Z peter $ | 29 * $FreeBSD: head/sys/dev/syscons/schistory.c 109623 2003-01-21 08:56:16Z alfred $ |
30 */ 31 32#include "opt_syscons.h" 33 34#ifndef SC_NO_HISTORY 35 36#include <sys/param.h> 37#include <sys/systm.h> --- 81 unchanged lines hidden (view full) --- 119 scp->history = prev_history; 120 return EINVAL; 121 } 122 } 123 124 /* allocate a new buffer */ 125 history = (sc_vtb_t *)malloc(sizeof(*history), 126 M_DEVBUF, | 30 */ 31 32#include "opt_syscons.h" 33 34#ifndef SC_NO_HISTORY 35 36#include <sys/param.h> 37#include <sys/systm.h> --- 81 unchanged lines hidden (view full) --- 119 scp->history = prev_history; 120 return EINVAL; 121 } 122 } 123 124 /* allocate a new buffer */ 125 history = (sc_vtb_t *)malloc(sizeof(*history), 126 M_DEVBUF, |
127 (wait) ? M_WAITOK : M_NOWAIT); | 127 (wait) ? 0 : M_NOWAIT); |
128 if (history != NULL) { 129 if (lines > min_lines) 130 extra_history_size -= lines - min_lines; 131 /* XXX error check? */ 132 sc_vtb_init(history, VTB_RINGBUFFER, scp->xsize, lines, 133 NULL, wait); 134 /* FIXME: XXX no good? */ 135 sc_vtb_clear(history, scp->sc->scr_map[0x20], --- 187 unchanged lines hidden --- | 128 if (history != NULL) { 129 if (lines > min_lines) 130 extra_history_size -= lines - min_lines; 131 /* XXX error check? */ 132 sc_vtb_init(history, VTB_RINGBUFFER, scp->xsize, lines, 133 NULL, wait); 134 /* FIXME: XXX no good? */ 135 sc_vtb_clear(history, scp->sc->scr_map[0x20], --- 187 unchanged lines hidden --- |