]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2003-01-29 Yoshinori K. Okuji <okuji@enbug.org>
authorokuji <okuji@localhost>
Wed, 29 Jan 2003 09:13:56 +0000 (09:13 +0000)
committerokuji <okuji@localhost>
Wed, 29 Jan 2003 09:13:56 +0000 (09:13 +0000)
From Ilguiz Latypov:
* configure.in: Fix a syntax error in a sed script.
* stage2/bios.c (get_diskinfo): PhoenixBIOS 4.0 Revision 6.0
for ZF Micro might understand the greater buffer size for the
"get drive parameters" int 0x13 call in its own way.
Supposedly the BIOS assumes even bigger space is available and
thus corrupts the stack.  This is why we specify the exactly
necessary size of 0x42 bytes.

ChangeLog
configure
configure.in
stage2/bios.c

index 67193b05190aa92ba0eb9ba549f3529f1584dac5..96003760505baeef1d8a65579a286359a95f2c8d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2003-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
+
+       From Ilguiz Latypov:
+       * configure.in: Fix a syntax error in a sed script.
+       * stage2/bios.c (get_diskinfo): PhoenixBIOS 4.0 Revision 6.0 
+       for ZF Micro might understand the greater buffer size for the
+       "get drive parameters" int 0x13 call in its own way.  
+       Supposedly the BIOS assumes even bigger space is available and
+       thus corrupts the stack.  This is why we specify the exactly 
+       necessary size of 0x42 bytes.
+
 2003-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
 
        From Steven Dick <ssd.gnu@mmae.ucf.edu>:
index e1c0b1662953c24c846965fa456ddac34de5c93f..fcbfa1220a86caf3741e8d874155690ad9ebc64b 100644 (file)
--- a/configure
+++ b/configure
@@ -2918,7 +2918,7 @@ fi
 if test "x$ac_cv_c_compiler_gnu" = xyes; then
   if test "x$default_CFLAGS" = xyes; then
     # Autoconf may set CFLAGS to -O2 and/or -g. So eliminate them.
-    CFLAGS="`echo $CFLAGS | sed -e 's/-g//g' -e 's/-O[0-9]/g'` -g"
+    CFLAGS="`echo $CFLAGS | sed -e 's/-g//g' -e 's/-O[0-9]//g'` -g"
     # If the user specify the directory for binutils, add the option `-B'.
     if test "x$with_binutils" != x; then
       CFLAGS="-B$with_binutils/ $CFLAGS"
index 767f0acc51b1045e0b51dcc84f19021ef1a99955..875fa1297fd185ea5b6db891fd638cb5c81789a7 100644 (file)
@@ -1,5 +1,5 @@
 dnl Configure script for GRUB.
-dnl Copyright 1999,2000,2001,2002 Free Software Foundation, Inc.
+dnl Copyright 1999,2000,2001,2002,2003 Free Software Foundation, Inc.
 
 dnl Permission to use, copy, modify and distribute this software and its
 dnl documentation is hereby granted, provided that both the copyright
@@ -78,7 +78,7 @@ fi
 if test "x$ac_cv_prog_gcc" = xyes; then
   if test "x$default_CFLAGS" = xyes; then
     # Autoconf may set CFLAGS to -O2 and/or -g. So eliminate them.
-    CFLAGS="`echo $CFLAGS | sed -e 's/-g//g' -e 's/-O[[0-9]]/g'` -g"
+    CFLAGS="`echo $CFLAGS | sed -e 's/-g//g' -e 's/-O[[0-9]]//g'` -g"
     # If the user specify the directory for binutils, add the option `-B'.
     if test "x$with_binutils" != x; then
       CFLAGS="-B$with_binutils/ $CFLAGS"
index 6e61b38d5400453085a6b7f55aceba952e8dc96d..558034d373ed71f88ecba06bebcdbcbaeda4f7ce 100644 (file)
@@ -1,7 +1,7 @@
 /* bios.c - implement C part of low-level BIOS disk input and output */
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 1999,2000  Free Software Foundation, Inc.
+ *  Copyright (C) 1999,2000,2003  Free Software Foundation, Inc.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -169,7 +169,14 @@ get_diskinfo (int drive, struct geometry *geometry)
          /* It is safe to clear out DRP.  */
          grub_memset (&drp, 0, sizeof (drp));
          
-         drp.size = sizeof (drp);
+         /* PhoenixBIOS 4.0 Revision 6.0 for ZF Micro might understand 
+            the greater buffer size for the "get drive parameters" int 
+            0x13 call in its own way.  Supposedly the BIOS assumes even 
+            bigger space is available and thus corrupts the stack.  
+            This is why we specify the exactly necessary size of 0x42 
+            bytes. */
+         drp.size = sizeof (drp) - sizeof (drp.dummy);
+         
          err = get_diskinfo_int13_extensions (drive, &drp);
          if (! err)
            {