/[grub]/grub2/normal/menu_entry.c
ViewVC logotype

Diff of /grub2/normal/menu_entry.c

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

revision 1.1 by okuji, Sat Feb 19 20:56:07 2005 UTC revision 1.2 by okuji, Sun Aug 14 19:36:55 2005 UTC
# Line 822  run (struct screen *screen) Line 822  run (struct screen *screen)
822      {      {
823        struct line *linep = screen->lines + i;        struct line *linep = screen->lines + i;
824        char *p;        char *p;
       grub_command_t c;  
825                
826        /* Trim down space characters.  */        /* Trim down space characters.  */
827        for (p = linep->buf + linep->len - 1;        for (p = linep->buf + linep->len - 1;
# Line 839  run (struct screen *screen) Line 838  run (struct screen *screen)
838          /* Ignore an empty command line.  */          /* Ignore an empty command line.  */
839          continue;          continue;
840    
841        c = grub_command_find (p);        if (grub_command_execute (p, 0) != 0)
       if (! c)  
         break;  
         
       if (! (c->flags & GRUB_COMMAND_FLAG_CMDLINE))  
         {  
           grub_error (GRUB_ERR_INVALID_COMMAND, "invalid command `%s'", p);  
           break;  
         }  
         
       if (! (c->flags & GRUB_COMMAND_FLAG_NO_ECHO))  
         grub_printf ("%s\n", p);  
         
       if (grub_command_execute (p) != 0)  
842          break;          break;
843      }      }
844        
845    if (grub_errno == GRUB_ERR_NONE && grub_loader_is_loaded ())    if (grub_errno == GRUB_ERR_NONE && grub_loader_is_loaded ())
846      /* Implicit execution of boot, only if something is loaded.  */      /* Implicit execution of boot, only if something is loaded.  */
847      grub_command_execute ("boot");      grub_command_execute ("boot", 0);
848    
849    if (grub_errno != GRUB_ERR_NONE)    if (grub_errno != GRUB_ERR_NONE)
850      {      {

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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