Revision: 2338
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2338
Author:   fzielcke
Date:     2009-06-17 17:19:23 +0000 (Wed, 17 Jun 2009)
Log Message:
-----------
2009-06-17  Felix Zielcke  <[email protected]>

        * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
        file can't be found.
        * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/loader/i386/linux.c
    trunk/grub2/loader/i386/pc/linux.c

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog       2009-06-17 13:47:37 UTC (rev 2337)
+++ trunk/grub2/ChangeLog       2009-06-17 17:19:23 UTC (rev 2338)
@@ -1,3 +1,9 @@
+2009-06-17  Felix Zielcke  <[email protected]>
+
+       * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
+       file can't be found.
+       * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
+
 2009-06-17  Vladimir Serbinenko  <[email protected]>
 
        Fix newline handling

Modified: trunk/grub2/loader/i386/linux.c
===================================================================
--- trunk/grub2/loader/i386/linux.c     2009-06-17 13:47:37 UTC (rev 2337)
+++ trunk/grub2/loader/i386/linux.c     2009-06-17 17:19:23 UTC (rev 2338)
@@ -600,7 +600,10 @@
 
   file = grub_file_open (argv[0]);
   if (! file)
-    goto fail;
+    {
+      grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
+      goto fail;
+    }
 
   if (grub_file_read (file, &lh, sizeof (lh)) != sizeof (lh))
     {

Modified: trunk/grub2/loader/i386/pc/linux.c
===================================================================
--- trunk/grub2/loader/i386/pc/linux.c  2009-06-17 13:47:37 UTC (rev 2337)
+++ trunk/grub2/loader/i386/pc/linux.c  2009-06-17 17:19:23 UTC (rev 2338)
@@ -69,7 +69,10 @@
 
   file = grub_file_open (argv[0]);
   if (! file)
-    goto fail;
+    {
+      grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
+      goto fail;
+    }
 
   if ((grub_size_t) grub_file_size (file) > grub_os_area_size)
     {



Reply via email to