summaryrefslogtreecommitdiff
path: root/sys/arch/hp300/stand/mkboot
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2005-04-22 00:42:17 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2005-04-22 00:42:17 +0000
commit6ca0465503b5d87bd9dca1cbaadf8de986104de6 (patch)
tree8e77ea8763a422038479d8dabe0f7c96e47b8a78 /sys/arch/hp300/stand/mkboot
parent7102af90d5d205ad0826346650bbd84ca7178f52 (diff)
Pass -Wall, complete prototypes, some KNF; no functional change.
Diffstat (limited to 'sys/arch/hp300/stand/mkboot')
-rw-r--r--sys/arch/hp300/stand/mkboot/mkboot.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/sys/arch/hp300/stand/mkboot/mkboot.c b/sys/arch/hp300/stand/mkboot/mkboot.c
index 52c051f6e2d..7686aeb23a7 100644
--- a/sys/arch/hp300/stand/mkboot/mkboot.c
+++ b/sys/arch/hp300/stand/mkboot/mkboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mkboot.c,v 1.3 2003/06/02 23:27:46 millert Exp $ */
+/* $OpenBSD: mkboot.c,v 1.4 2005/04/22 00:42:16 miod Exp $ */
/*
* Copyright (c) 1990, 1993
@@ -42,7 +42,7 @@ static char copyright[] =
static char sccsid[] = "@(#)mkboot.c 7.2 (Berkeley) 12/16/90";
static char rcsid[] = "$NetBSD: mkboot.c,v 1.5 1994/10/26 07:27:45 cgd Exp $";
#endif
-static char rcsid[] = "$OpenBSD: mkboot.c,v 1.3 2003/06/02 23:27:46 millert Exp $";
+static char rcsid[] = "$OpenBSD: mkboot.c,v 1.4 2005/04/22 00:42:16 miod Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -73,6 +73,10 @@ struct lifdir lifd[LIF_NUMDIR];
struct exec ex;
char buf[10240];
+void bcddate(int, char *);
+void putfile(int, int);
+void usage(void);
+
/*
* Old Format:
* sector 0: LIF volume header (40 bytes)
@@ -89,6 +93,7 @@ char buf[10240];
* sector 4-31: disklabel (~300 bytes right now)
* sector 32-: LIF file 0, LIF file 1, etc.
*/
+int
main(argc, argv)
char **argv;
{
@@ -211,12 +216,13 @@ main(argc, argv)
write(to, &lifv, LIF_VOLSIZE);
lseek(to, LIF_DIRSTART, 0);
write(to, lifd, LIF_DIRSIZE);
- exit(0);
+ return (0);
}
-putfile(from, to)
+void
+putfile(int from, int to)
{
- register int n, tcnt, dcnt;
+ int n, tcnt, dcnt;
n = read(from, &ex, sizeof(ex));
if (n != sizeof(ex)) {
@@ -278,6 +284,7 @@ putfile(from, to)
}
}
+void
usage()
{
fprintf(stderr,
@@ -309,6 +316,7 @@ lifname(str)
#include <sys/stat.h>
#include <time.h> /* XXX */
+void
bcddate(fd, toc)
int fd;
char *toc;