diff options
Diffstat (limited to 'arch/mips/boot/addinitrd.c')
-rw-r--r-- | arch/mips/boot/addinitrd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/mips/boot/addinitrd.c b/arch/mips/boot/addinitrd.c index 193e4be52e79..b5b3febc10cc 100644 --- a/arch/mips/boot/addinitrd.c +++ b/arch/mips/boot/addinitrd.c | |||
@@ -40,7 +40,7 @@ void die(char *s) | |||
40 | 40 | ||
41 | int main(int argc, char *argv[]) | 41 | int main(int argc, char *argv[]) |
42 | { | 42 | { |
43 | int fd_vmlinux,fd_initrd,fd_outfile; | 43 | int fd_vmlinux, fd_initrd, fd_outfile; |
44 | FILHDR efile; | 44 | FILHDR efile; |
45 | AOUTHDR eaout; | 45 | AOUTHDR eaout; |
46 | SCNHDR esecs[3]; | 46 | SCNHDR esecs[3]; |
@@ -48,15 +48,15 @@ int main(int argc, char *argv[]) | |||
48 | char buf[1024]; | 48 | char buf[1024]; |
49 | unsigned long loadaddr; | 49 | unsigned long loadaddr; |
50 | unsigned long initrd_header[2]; | 50 | unsigned long initrd_header[2]; |
51 | int i,cnt; | 51 | int i, cnt; |
52 | int swab = 0; | 52 | int swab = 0; |
53 | 53 | ||
54 | if (argc != 4) { | 54 | if (argc != 4) { |
55 | printf("Usage: %s <vmlinux> <initrd> <outfile>\n",argv[0]); | 55 | printf("Usage: %s <vmlinux> <initrd> <outfile>\n", argv[0]); |
56 | exit(1); | 56 | exit(1); |
57 | } | 57 | } |
58 | 58 | ||
59 | if ((fd_vmlinux = open (argv[1],O_RDONLY)) < 0) | 59 | if ((fd_vmlinux = open (argv[1], O_RDONLY)) < 0) |
60 | die("open vmlinux"); | 60 | die("open vmlinux"); |
61 | if (read (fd_vmlinux, &efile, sizeof efile) != sizeof efile) | 61 | if (read (fd_vmlinux, &efile, sizeof efile) != sizeof efile) |
62 | die("read file header"); | 62 | die("read file header"); |
@@ -98,7 +98,7 @@ int main(int argc, char *argv[]) | |||
98 | eaout.dsize = esecs[1].s_size = initrd_header[1] = SWAB(st.st_size+8); | 98 | eaout.dsize = esecs[1].s_size = initrd_header[1] = SWAB(st.st_size+8); |
99 | eaout.data_start = esecs[1].s_vaddr = esecs[1].s_paddr = SWAB(loadaddr); | 99 | eaout.data_start = esecs[1].s_vaddr = esecs[1].s_paddr = SWAB(loadaddr); |
100 | 100 | ||
101 | if ((fd_outfile = open (argv[3], O_RDWR|O_CREAT|O_TRUNC,0666)) < 0) | 101 | if ((fd_outfile = open (argv[3], O_RDWR|O_CREAT|O_TRUNC, 0666)) < 0) |
102 | die("open outfile"); | 102 | die("open outfile"); |
103 | if (write (fd_outfile, &efile, sizeof efile) != sizeof efile) | 103 | if (write (fd_outfile, &efile, sizeof efile) != sizeof efile) |
104 | die("write file header"); | 104 | die("write file header"); |