fix the problem that savedefault doesn't work with Stage 1.5.

This commit is contained in:
okuji committed 2001-02-02 13:31:03 +00:00
1 parent 9417ebb550
commit 00865a8027
11 files changed
+55 -44

No files matched your search

+16 -2
View File
@@ -19,6 +19,14 @@
#include "shared.h"
static int saved_sector;
static void
disk_read_savesect_func (int sector, int offset, int length)
{
saved_sector = sector;
}
void
cmain (void)
{
@@ -30,12 +38,18 @@ cmain (void)
if (grub_open (config_file))
{
int ret = grub_read ((char *) 0x8000, -1);
int ret;
disk_read_hook = disk_read_savesect_func;
grub_read ((char *) 0x8000, SECTOR_SIZE * 2);
disk_read_hook = NULL;
ret = grub_read ((char *) 0x8000 + SECTOR_SIZE * 2, -1);
grub_close ();
if (ret)
chain_stage2 (0, 0x8200);
chain_stage2 (0, 0x8200, saved_sector);
}
/*