Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 647004
Collapse All | Expand All

(-)grub-0.97/stage2/boot.c.ORIG (-11 / +25 lines)
Lines 805-831 Link Here
805
}
805
}
806
806
807
int
807
int
808
load_initrd (char *initrd)
808
load_initrd (char *initrd_list)
809
{
809
{
810
  int len;
810
  int flen, len;
811
  unsigned long moveto;
811
  unsigned long moveto;
812
  unsigned long max_addr;
812
  unsigned long max_addr;
813
  char *initrd = initrd_list;
813
  struct linux_kernel_header *lh
814
  struct linux_kernel_header *lh
814
    = (struct linux_kernel_header *) (cur_addr - LINUX_SETUP_MOVE_SIZE);
815
    = (struct linux_kernel_header *) (cur_addr - LINUX_SETUP_MOVE_SIZE);
815
  
816
  
816
#ifndef NO_DECOMPRESSION
817
#ifndef NO_DECOMPRESSION
817
  no_decompression = 1;
818
  no_decompression = 1;
818
#endif
819
#endif
819
  
820
820
  if (! grub_open (initrd))
821
  if (lh->ramdisk_image) {
822
    errnum = ERR_ALREADY;
821
    goto fail;
823
    goto fail;
824
  }
822
825
823
  len = grub_read ((char *) cur_addr, -1);
826
  len = 0;
824
  if (! len)
827
  while (*initrd) {
825
    {
828
    if (! grub_open (initrd))
826
      grub_close ();
827
      goto fail;
829
      goto fail;
828
    }
830
831
    flen = grub_read ((char *) cur_addr + len, -1);
832
    grub_close ();
833
    if (! flen)
834
        goto fail;
835
836
    len += flen;
837
838
    /* Skip to the next filename */
839
    while (! isspace(*initrd) && *initrd)
840
      initrd++;
841
842
    while (isspace(*initrd))
843
      initrd++;
844
  }
829
845
830
  if (linux_mem_size)
846
  if (linux_mem_size)
831
    moveto = linux_mem_size;
847
    moveto = linux_mem_size;
Lines 854-861 Link Here
854
  lh->ramdisk_image = RAW_ADDR (moveto);
870
  lh->ramdisk_image = RAW_ADDR (moveto);
855
  lh->ramdisk_size = len;
871
  lh->ramdisk_size = len;
856
872
857
  grub_close ();
858
859
 fail:
873
 fail:
860
  
874
  
861
#ifndef NO_DECOMPRESSION
875
#ifndef NO_DECOMPRESSION
(-)grub-0.97/stage2/builtins.c.ORIG (-3 / +3 lines)
Lines 1901-1909 Link Here
1901
  "initrd",
1901
  "initrd",
1902
  initrd_func,
1902
  initrd_func,
1903
  BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
1903
  BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
1904
  "initrd FILE [ARG ...]",
1904
  "initrd FILE [FILE ...]",
1905
  "Load an initial ramdisk FILE for a Linux format boot image and set the"
1905
  "Load one or more initial ramdisk FILEs for a Linux format boot image and"
1906
  " appropriate parameters in the Linux setup area in memory."
1906
  " set the appropriate parameters in the Linux setup area in memory."
1907
};
1907
};
1908
1908
1909
1909
(-)grub-0.97/stage2/common.c.ORIG (+1 lines)
Lines 88-93 Link Here
88
  [ERR_UNRECOGNIZED] = "Unrecognized command",
88
  [ERR_UNRECOGNIZED] = "Unrecognized command",
89
  [ERR_WONT_FIT] = "Selected item cannot fit into memory",
89
  [ERR_WONT_FIT] = "Selected item cannot fit into memory",
90
  [ERR_WRITE] = "Disk write error",
90
  [ERR_WRITE] = "Disk write error",
91
  [ERR_ALREADY] = "Command already specified (only allowed once)",
91
};
92
};
92
93
93
94
(-)grub-0.97/stage2/shared.h.ORIG (+1 lines)
Lines 551-556 Link Here
551
  ERR_DEV_NEED_INIT,
551
  ERR_DEV_NEED_INIT,
552
  ERR_NO_DISK_SPACE,
552
  ERR_NO_DISK_SPACE,
553
  ERR_NUMBER_OVERFLOW,
553
  ERR_NUMBER_OVERFLOW,
554
  ERR_ALREADY,
554
555
555
  MAX_ERR_NUM
556
  MAX_ERR_NUM
556
} grub_error_t;
557
} grub_error_t;

Return to bug 647004