| @@ -1,33 +1,33 @@ | | | @@ -1,33 +1,33 @@ |
1 | /* $NetBSD: installboot.c,v 1.5 2010/07/06 06:09:57 mrg Exp $ */ | | 1 | /* $NetBSD: installboot.c,v 1.6 2017/02/12 18:21:50 maxv Exp $ */ |
2 | | | 2 | |
3 | #include <err.h> | | 3 | #include <err.h> |
4 | #include <fcntl.h> | | 4 | #include <fcntl.h> |
5 | #include <stdio.h> | | 5 | #include <stdio.h> |
6 | #include <stdlib.h> | | 6 | #include <stdlib.h> |
7 | #include <string.h> | | 7 | #include <string.h> |
8 | #include <unistd.h> | | 8 | #include <unistd.h> |
9 | | | 9 | |
10 | #include "../elf2bb/chksum.h" | | 10 | #include "../elf2bb/chksum.h" |
11 | | | 11 | |
12 | /* XXX Must be kept in sync with bbstart.s! */ | | 12 | /* XXX Must be kept in sync with bbstart.s! */ |
13 | #define CMDLN_LOC 0x10 | | 13 | #define CMDLN_LOC 0x10 |
14 | #define CMDLN_LEN 0x20 | | 14 | #define CMDLN_LEN 0x20 |
15 | | | 15 | |
16 | int main(int argc, char *argv[]); | | 16 | int main(int argc, char *argv[]); |
17 | | | 17 | |
18 | int main(int argc, char *argv[]){ | | 18 | int main(int argc, char *argv[]){ |
19 | | | 19 | |
20 | char *line; | | 20 | char *line = NULL; |
21 | char *progname; | | 21 | char *progname; |
22 | char *bootnam, *devnam; | | 22 | char *bootnam, *devnam; |
23 | char *dline; | | 23 | char *dline; |
24 | int bootfd, devfd; | | 24 | int bootfd, devfd; |
25 | int rc; /* read, write */ | | 25 | int rc; /* read, write */ |
26 | int c; /* getopt */ | | 26 | int c; /* getopt */ |
27 | int sumlen; | | 27 | int sumlen; |
28 | u_int32_t sum2, sum16; | | 28 | u_int32_t sum2, sum16; |
29 | | | 29 | |
30 | u_int32_t block[128*16]; | | 30 | u_int32_t block[128*16]; |
31 | | | 31 | |
32 | progname = argv[0]; | | 32 | progname = argv[0]; |
33 | while ((c = getopt(argc, argv, "l:")) != -1) { | | 33 | while ((c = getopt(argc, argv, "l:")) != -1) { |