~ubuntu-branches/ubuntu/trusty/grub2/trusty-updates

« back to all changes in this revision

Viewing changes to normal/main.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Millan
  • Date: 2008-01-28 00:01:11 UTC
  • mto: (17.3.1 squeeze) (1.9.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20080128000111-0764agvqzg601o1d
Tags: upstream-1.95+20080128
ImportĀ upstreamĀ versionĀ 1.95+20080128

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* main.c - the normal mode main routine */
2
2
/*
3
3
 *  GRUB  --  GRand Unified Bootloader
4
 
 *  Copyright (C) 2000,2001,2002,2003,2005,2006,2007  Free Software Foundation, Inc.
 
4
 *  Copyright (C) 2000,2001,2002,2003,2005,2006,2007,2008  Free Software Foundation, Inc.
5
5
 *
6
6
 *  GRUB is free software: you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
261
261
      /* Execute the command(s).  */
262
262
      grub_script_execute (parsed_script);
263
263
 
 
264
      /* Ignore errors.  */
 
265
      grub_errno = GRUB_ERR_NONE;
 
266
 
264
267
      /* The parsed script was executed, throw it away.  */
265
268
      grub_script_free (parsed_script);
266
269
    }
268
271
  grub_file_close (file);
269
272
 
270
273
  if (errors > 0)
271
 
    {
272
 
      /* Wait until the user pushes any key so that the user can
273
 
         see what happened.  */
274
 
      grub_printf ("\nPress any key to continue...");
275
 
      (void) grub_getkey ();
276
 
    }
 
274
    grub_wait_after_message ();
277
275
 
278
276
  return newmenu;
279
277
}
527
525
  grub_rescue_register_command ("normal", grub_rescue_cmd_normal,
528
526
                                "enter normal mode");
529
527
 
 
528
  /* Reload terminal colors when these variables are written to.  */
 
529
  grub_register_variable_hook ("color_normal", NULL, grub_env_write_color_normal);
 
530
  grub_register_variable_hook ("color_highlight", NULL, grub_env_write_color_highlight);
 
531
 
 
532
  /* Preserve hooks after context changes.  */
 
533
  grub_env_export ("color_normal");
 
534
  grub_env_export ("color_highlight");
 
535
 
530
536
  /* This registers some built-in commands.  */
531
537
  grub_command_init ();
532
538
}