This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / arch / mips / boot / addinitrd.c
index 8b30333..38261f1 100644 (file)
@@ -2,8 +2,6 @@
  * addinitrd - program to add a initrd image to an ecoff kernel
  *
  * (C) 1999 Thomas Bogendoerfer
- * minor modifications, cleanup: Guido Guenther <agx@sigxcpu.org>
- * further cleanup: Maciej W. Rozycki
  */
 
 #include <sys/types.h>
@@ -56,7 +54,7 @@ int main (int argc, char *argv[])
                exit (1);
        }
 
-       if ((fd_vmlinux = open (argv[1],O_RDONLY)) < 0)
+       if ((fd_vmlinux = open (argv[1],O_RDWR)) < 0)
                 die ("open vmlinux");
        if (read (fd_vmlinux, &efile, sizeof efile) != sizeof efile)
                die ("read file header");
@@ -80,11 +78,6 @@ int main (int argc, char *argv[])
                        swab = 1;
        }
 
-       /* make sure we have an empty data segment for the initrd */
-       if (eaout.dsize || esecs[1].s_size) {
-               fprintf (stderr, "Data segment not empty. Giving up!\n");
-               exit (1);
-       }
        if ((fd_initrd = open (argv[2], O_RDONLY)) < 0)
                die ("open initrd");
        if (fstat (fd_initrd, &st) < 0)