Deleted Added
full compact
dcons.c (132199) dcons.c (132226)
1/*
2 * Copyright (C) 2003
3 * Hidetoshi Shimokawa. 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

--- 18 unchanged lines hidden (view full) ---

27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * $Id: dcons.c,v 1.65 2003/10/24 03:24:55 simokawa Exp $
1/*
2 * Copyright (C) 2003
3 * Hidetoshi Shimokawa. 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

--- 18 unchanged lines hidden (view full) ---

27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * $Id: dcons.c,v 1.65 2003/10/24 03:24:55 simokawa Exp $
35 * $FreeBSD: head/sys/dev/dcons/dcons.c 132199 2004-07-15 08:26:07Z phk $
35 * $FreeBSD: head/sys/dev/dcons/dcons.c 132226 2004-07-15 20:47:41Z phk $
36 */
37
38#include <sys/param.h>
39#if __FreeBSD_version >= 502122
40#include <sys/kdb.h>
41#include <gdb/gdb.h>
42#endif
43#include <sys/kernel.h>

--- 181 unchanged lines hidden (view full) ---

225
226 unit = minor(dev);
227 if (unit != 0)
228 return (ENXIO);
229
230 tp = dev->si_tty;
231 if (tp->t_state & TS_ISOPEN) {
232 ttyld_close(tp, flag);
36 */
37
38#include <sys/param.h>
39#if __FreeBSD_version >= 502122
40#include <sys/kdb.h>
41#include <gdb/gdb.h>
42#endif
43#include <sys/kernel.h>

--- 181 unchanged lines hidden (view full) ---

225
226 unit = minor(dev);
227 if (unit != 0)
228 return (ENXIO);
229
230 tp = dev->si_tty;
231 if (tp->t_state & TS_ISOPEN) {
232 ttyld_close(tp, flag);
233 ttyclose(tp);
233 tty_close(tp);
234 }
235
236 return (0);
237}
238
239static int
240dcons_tty_param(struct tty *tp, struct termios *t)
241{

--- 350 unchanged lines hidden (view full) ---

592
593 dc = &sc[port];
594
595 tp = dc->dev->si_tty;
596
597 if (tp->t_state & TS_ISOPEN) {
598 printf("dcons: still opened\n");
599 ttyld_close(tp, 0);
234 }
235
236 return (0);
237}
238
239static int
240dcons_tty_param(struct tty *tp, struct termios *t)
241{

--- 350 unchanged lines hidden (view full) ---

592
593 dc = &sc[port];
594
595 tp = dc->dev->si_tty;
596
597 if (tp->t_state & TS_ISOPEN) {
598 printf("dcons: still opened\n");
599 ttyld_close(tp, 0);
600 ttyclose(tp);
600 tty_close(tp);
601 }
602 /* XXX
603 * must wait until all device are closed.
604 */
605 tsleep((void *)dc, PWAIT, "dcodtc", hz/4);
606 destroy_dev(dc->dev);
607
608 return(0);

--- 92 unchanged lines hidden ---
601 }
602 /* XXX
603 * must wait until all device are closed.
604 */
605 tsleep((void *)dc, PWAIT, "dcodtc", hz/4);
606 destroy_dev(dc->dev);
607
608 return(0);

--- 92 unchanged lines hidden ---