From cba4b405e434989026b156f3cd14a7cc6fdf4f96 Mon Sep 17 00:00:00 2001 From: cgd Date: Fri, 24 Mar 1995 15:29:46 +0000 Subject: [PATCH] don't let args default, return values, add protos --- sys/dev/cons.c | 7 +++++-- sys/dev/cons.h | 12 +++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/sys/dev/cons.c b/sys/dev/cons.c index ee4c0f1f3e26..0281f42d6739 100644 --- a/sys/dev/cons.c +++ b/sys/dev/cons.c @@ -1,4 +1,4 @@ -/* $NetBSD: cons.c,v 1.23 1994/12/14 19:09:13 mycroft Exp $ */ +/* $NetBSD: cons.c,v 1.24 1995/03/24 15:29:46 cgd Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -142,6 +142,7 @@ int cnread(dev, uio, flag) dev_t dev; struct uio *uio; + int flag; { /* @@ -164,6 +165,7 @@ int cnwrite(dev, uio, flag) dev_t dev; struct uio *uio; + int flag; { /* @@ -253,12 +255,13 @@ cnputc(c) { if (cn_tab == NULL) - return; + return 0; /* XXX should be void */ if (c) { (*cn_tab->cn_putc)(cn_tab->cn_dev, c); if (c == '\n') (*cn_tab->cn_putc)(cn_tab->cn_dev, '\r'); } + return 0; /* XXX should be void */ } void diff --git a/sys/dev/cons.h b/sys/dev/cons.h index 3967bc16e700..d7648eef0b52 100644 --- a/sys/dev/cons.h +++ b/sys/dev/cons.h @@ -1,4 +1,4 @@ -/* $NetBSD: cons.h,v 1.7 1994/10/26 17:56:56 mycroft Exp $ */ +/* $NetBSD: cons.h,v 1.8 1995/03/24 15:29:49 cgd Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -64,4 +64,14 @@ struct consdev { #ifdef KERNEL extern struct consdev constab[]; extern struct consdev *cn_tab; + +void cninit __P((void)); +int cnopen __P((dev_t, int, int, struct proc *)); +int cnclose __P((dev_t, int, int, struct proc *)); +int cnread __P((dev_t, struct uio *, int)); +int cnwrite __P((dev_t, struct uio *, int)); +int cnioctl __P((dev_t, u_long, caddr_t, int, struct proc *)); +int cnselect __P((dev_t, int, struct proc *)); +int cngetc __P((void)); +int cnputc __P((int)); #endif