/[grub]/grub/stage2/stage1_5.c
ViewVC logotype

Diff of /grub/stage2/stage1_5.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by okuji, Mon Nov 12 06:57:29 2001 UTC revision 1.7 by okuji, Thu Feb 7 23:28:47 2002 UTC
# Line 1  Line 1 
1  /*  /*
2   *  GRUB  --  GRand Unified Bootloader   *  GRUB  --  GRand Unified Bootloader
3   *  Copyright (C) 2001  Free Software Foundation, Inc.   *  Copyright (C) 2001,2002  Free Software Foundation, Inc.
4   *   *
5   *  This program is free software; you can redistribute it and/or modify   *  This program is free software; you can redistribute it and/or modify
6   *  it under the terms of the GNU General Public License as published by   *  it under the terms of the GNU General Public License as published by
# Line 19  Line 19 
19    
20  #include "shared.h"  #include "shared.h"
21    
22  static int saved_sector;  static int saved_sector = -1;
23    
24  static void  static void
25  disk_read_savesect_func (int sector, int offset, int length)  disk_read_savesect_func (int sector, int offset, int length)
# Line 30  disk_read_savesect_func (int sector, int Line 30  disk_read_savesect_func (int sector, int
30  void  void
31  cmain (void)  cmain (void)
32  {  {
33    printf ("\n\nGRUB loading, please wait...\n");    grub_printf ("\n\nGRUB loading, please wait...\n");
34    
35    /*    /*
36     *  Here load the true second-stage boot-loader.     *  Here load the true second-stage boot-loader.
# Line 43  cmain (void) Line 43  cmain (void)
43        disk_read_hook = disk_read_savesect_func;        disk_read_hook = disk_read_savesect_func;
44        grub_read ((char *) 0x8000, SECTOR_SIZE * 2);        grub_read ((char *) 0x8000, SECTOR_SIZE * 2);
45        disk_read_hook = NULL;        disk_read_hook = NULL;
46    
47          /* Sanity check: catch an internal error.  */
48          if (saved_sector == -1)
49            {
50              grub_printf ("internal error: the second sector of Stage 2 is unknown.");
51              stop ();
52            }
53                
54        ret = grub_read ((char *) 0x8000 + SECTOR_SIZE * 2, -1);        ret = grub_read ((char *) 0x8000 + SECTOR_SIZE * 2, -1);
55                

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26