Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/pc532/stand KNF, ANSIfy, de-__P.
details: https://anonhg.NetBSD.org/src/rev/1850b4845a6b
branches: trunk
changeset: 556033:1850b4845a6b
user: simonb <simonb%NetBSD.org@localhost>
date: Sat Dec 06 13:09:01 2003 +0000
description:
KNF, ANSIfy, de-__P.
diffstat:
sys/arch/pc532/stand/boot/boot.c | 15 +-
sys/arch/pc532/stand/common/cons.c | 13 +-
sys/arch/pc532/stand/common/consdefs.h | 10 +-
sys/arch/pc532/stand/common/devopen.c | 62 +--
sys/arch/pc532/stand/common/filesystem.c | 6 +-
sys/arch/pc532/stand/common/machdep.c | 33 +-
sys/arch/pc532/stand/common/md.c | 32 +-
sys/arch/pc532/stand/common/prf.c | 12 +-
sys/arch/pc532/stand/common/samachdep.h | 22 +-
sys/arch/pc532/stand/common/scn.c | 32 +-
sys/arch/pc532/stand/common/scsi_hi.c | 348 ++++++++++----------
sys/arch/pc532/stand/common/scsi_low.c | 532 ++++++++++++++++--------------
sys/arch/pc532/stand/common/sd.c | 45 +-
sys/arch/pc532/stand/common/so.h | 18 +-
sys/arch/pc532/stand/common/srt0.S | 4 +-
sys/arch/pc532/stand/common/tgets.c | 11 +-
16 files changed, 579 insertions(+), 616 deletions(-)
diffs (truncated from 1868 to 300 lines):
diff -r 331586695891 -r 1850b4845a6b sys/arch/pc532/stand/boot/boot.c
--- a/sys/arch/pc532/stand/boot/boot.c Sat Dec 06 11:43:56 2003 +0000
+++ b/sys/arch/pc532/stand/boot/boot.c Sat Dec 06 13:09:01 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: boot.c,v 1.4 2003/08/07 16:29:03 agc Exp $ */
+/* $NetBSD: boot.c,v 1.5 2003/12/06 13:09:01 simonb Exp $ */
/*-
* Copyright (c) 1982, 1986, 1990, 1993
@@ -39,8 +39,8 @@
#include <pc532/stand/common/samachdep.h>
-void main __P((void));
-static void getbootdev __P((int *));
+void main(void);
+static void getbootdev(int *);
/*
* Boot program... bits in `howto' determine whether boot stops to
@@ -63,17 +63,17 @@
"onetbsd", "onetbsd.gz",
NULL
};
-#define NUMNAMES (sizeof(names) / sizeof(char *))
+#define NUMNAMES (sizeof(names) / sizeof(char *))
static int bdev, badapt, bctlr, bunit, bpart;
void
-main()
+main(void)
{
int currname = 0;
printf("\n");
- printf(">> %s, Revision %s\n", bootprog_name, bootprog_rev);
+ printf(">> %s, Revision %s\n", bootprog_name, bootprog_rev);
printf(">> (%s, %s)\n", bootprog_maker, bootprog_date);
bdev = B_TYPE(bootdev);
@@ -99,8 +99,7 @@
}
void
-getbootdev(howto)
- int *howto;
+getbootdev(int *howto)
{
char c, *ptr = line;
diff -r 331586695891 -r 1850b4845a6b sys/arch/pc532/stand/common/cons.c
--- a/sys/arch/pc532/stand/common/cons.c Sat Dec 06 11:43:56 2003 +0000
+++ b/sys/arch/pc532/stand/common/cons.c Sat Dec 06 13:09:01 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cons.c,v 1.2 2003/08/07 16:29:04 agc Exp $ */
+/* $NetBSD: cons.c,v 1.3 2003/12/06 13:09:01 simonb Exp $ */
/*
* Copyright (c) 1990, 1993
@@ -93,9 +93,9 @@
int noconsole;
void
-cninit()
+cninit(void)
{
- register struct consdev *cp;
+ struct consdev *cp;
cn_tab = NULL;
noconsole = 1;
@@ -112,8 +112,9 @@
}
int
-cngetc()
+cngetc(void)
{
+
/* Note: the dev_t arguments are not used! */
if (cn_tab)
return((*cn_tab->cn_getc)(0));
@@ -121,9 +122,9 @@
}
int
-cnputc(c)
- int c;
+cnputc(int c)
{
+
/* Note: the dev_t arguments are not used! */
if (cn_tab)
(*cn_tab->cn_putc)(0, c);
diff -r 331586695891 -r 1850b4845a6b sys/arch/pc532/stand/common/consdefs.h
--- a/sys/arch/pc532/stand/common/consdefs.h Sat Dec 06 11:43:56 2003 +0000
+++ b/sys/arch/pc532/stand/common/consdefs.h Sat Dec 06 13:09:01 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: consdefs.h,v 1.2 2003/08/07 16:29:04 agc Exp $ */
+/* $NetBSD: consdefs.h,v 1.3 2003/12/06 13:09:01 simonb Exp $ */
/*
* Copyright (c) 1982, 1990, 1993
@@ -33,8 +33,8 @@
* Console routine prototypes.
*/
#ifdef SCNCONSOLE
-void scnprobe __P((struct consdev *));
-void scninit __P((struct consdev *));
-int scngetchar __P((dev_t));
-void scnputchar __P((dev_t, int));
+void scnprobe(struct consdev *);
+void scninit(struct consdev *);
+int scngetchar(dev_t);
+void scnputchar(dev_t, int);
#endif
diff -r 331586695891 -r 1850b4845a6b sys/arch/pc532/stand/common/devopen.c
--- a/sys/arch/pc532/stand/common/devopen.c Sat Dec 06 11:43:56 2003 +0000
+++ b/sys/arch/pc532/stand/common/devopen.c Sat Dec 06 13:09:01 2003 +0000
@@ -1,9 +1,9 @@
-/* $NetBSD: devopen.c,v 1.2 2001/07/26 22:47:35 wiz Exp $ */
+/* $NetBSD: devopen.c,v 1.3 2003/12/06 13:09:01 simonb Exp $ */
/*-
* Copyright (c) 1993 John Brezak
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -14,7 +14,7 @@
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -36,43 +36,40 @@
#include <pc532/stand/common/samachdep.h>
-static int atoi __P((const char *));
-static void usage __P((void));
-static int devlookup __P((const char *, int));
-static int devparse __P((const char *, int *,
- int *, int *, int *, int *, char **));
+static int atoi(const char *);
+static void usage(void);
+static int devlookup(const char *, int);
+static int devparse(const char *, int *, int *, int *, int *, int *,
+ char **);
u_int opendev;
-
-#define ispart(c) ((c) >= 'a' && (c) <= 'h')
+
+#define ispart(c) ((c) >= 'a' && (c) <= 'h')
static int
-atoi(cp)
- const char *cp;
+atoi(const char *cp)
{
int val = 0;
+
while (isdigit(*cp))
val = val * 10 + (*cp++ - '0');
return(val);
}
static void
-usage()
+usage(void)
{
- printf("\
-Usage: device(adaptor, controller, drive, partition)file\n\
- <device><unit><partitionletter>:file\n\
-");
+
+ printf("Usage: device(adaptor, controller, drive, partition)file\n");
+ printf(" <device><unit><partitionletter>:file\n");
}
static int
-devlookup(d, len)
- const char *d;
- int len;
+devlookup(const char *d, int len)
{
struct devsw *dp = devsw;
int i;
-
+
for (i = 0; i < ndevs; i++, dp++)
if (dp->dv_name && strncmp(dp->dv_name, d, len) == 0)
return(i);
@@ -94,14 +91,8 @@
* dev unit part
*/
static int
-devparse(fname, dev, adapt, ctlr, unit, part, file)
- const char *fname;
- int *dev;
- int *adapt;
- int *ctlr;
- int *unit;
- int *part;
- char **file;
+devparse(const char *fname, int *dev, int *adapt, int *ctlr, int *unit,
+ int *part, char **file)
{
int i;
const char *s, *args[4];
@@ -177,19 +168,16 @@
/* return the remaining unparsed part as the file to boot */
return(0);
-
+
bad:
usage();
baddev:
return(-1);
-}
+}
int
-devopen(f, fname, file)
- struct open_file *f;
- const char *fname;
- char **file;
+devopen(struct open_file *f, const char *fname, char **file)
{
int error, dev, adapt, ctlr, unit, part;
struct devsw *dp = &devsw[0];
@@ -209,7 +197,7 @@
return(ENODEV);
f->f_dev = dp;
-
+
if ((error = (*dp->dv_open)(f, ctlr, unit, part)) == 0) {
opendev = MAKEBOOTDEV(dev, adapt, ctlr, unit, part);
return(0);
@@ -219,4 +207,4 @@
adapt, ctlr, unit, part, strerror(error));
return(error);
-}
+}
diff -r 331586695891 -r 1850b4845a6b sys/arch/pc532/stand/common/filesystem.c
--- a/sys/arch/pc532/stand/common/filesystem.c Sat Dec 06 11:43:56 2003 +0000
+++ b/sys/arch/pc532/stand/common/filesystem.c Sat Dec 06 13:09:01 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: filesystem.c,v 1.1 1997/05/17 13:56:05 matthias Exp $ */
+/* $NetBSD: filesystem.c,v 1.2 2003/12/06 13:09:01 simonb Exp $ */
/*
* Copyright (c) 1993 Philip A. Nelson.
@@ -33,9 +33,9 @@
#include <lib/libsa/stand.h>
#include <lib/libsa/ufs.h>
-
+
struct fs_ops file_system[] = {
{ ufs_open, ufs_close, ufs_read, ufs_write, ufs_seek, ufs_stat },
};
-
+
int nfsys = sizeof(file_system)/sizeof(struct fs_ops);
diff -r 331586695891 -r 1850b4845a6b sys/arch/pc532/stand/common/machdep.c
--- a/sys/arch/pc532/stand/common/machdep.c Sat Dec 06 11:43:56 2003 +0000
+++ b/sys/arch/pc532/stand/common/machdep.c Sat Dec 06 13:09:01 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.3 1999/05/03 09:19:29 matthias Exp $ */
+/* $NetBSD: machdep.c,v 1.4 2003/12/06 13:09:01 simonb Exp $ */
/*
* Copyright (c) 1994 Philip L. Budne.
@@ -48,43 +48,31 @@
/* XXX TEMP; would like to use code more like hp300 scsi.c */
int
-scsialive(ctlr)
- int ctlr;
+scsialive(int ctlr)
{
+
return 1; /* controller always alive! */
}
int
-scsi_tt_read(ctlr, slave, buf, len, blk, nblk)
- int ctlr, slave;
Home |
Main Index |
Thread Index |
Old Index