]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
fix a problem that chainloader doesn't report any error, even if it failed.
authorokuji <okuji@localhost>
Sat, 16 Dec 2000 20:25:15 +0000 (20:25 +0000)
committerokuji <okuji@localhost>
Sat, 16 Dec 2000 20:25:15 +0000 (20:25 +0000)
ChangeLog
stage2/builtins.c

index 2100d54d36af8334846e8bfbe8b1d930b7092d99..c0adf4865fa8a8ff2dc26ae3aa0fef2de38c5747 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2000-12-17  OKUJI Yoshinori  <okuji@gnu.org>
+
+       * stage2/builtins.c (chainloader_func): Set ERRNUM to
+       ERR_EXEC_FORMAT, when ERRNUM is ERR_NONE, even if grub_read
+       fails in reading one sector.
+       
 2000-12-14  OKUJI Yoshinori  <okuji@gnu.org>
 
        * docs/prog-ref.texi (Partition types): Rewrite the footnotes.
index dc589ee5994cd496d9c06cb461e80438da91c162..2f7ed54cbeb5b15a08660d2a220dfd068fd6a956 100644 (file)
@@ -418,6 +418,12 @@ chainloader_func (char *arg, int flags)
     {
       grub_close ();
       kernel_type = KERNEL_TYPE_NONE;
+
+      /* This below happens, if a file whose size is less than 512 bytes
+        is loaded.  */
+      if (errnum == ERR_NONE)
+       errnum = ERR_EXEC_FORMAT;
+      
       return 1;
     }