~hamo/ubuntu/precise/grub2/grub2.hi_res

« back to all changes in this revision

Viewing changes to loader/multiboot_loader_normal.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Millan
  • Date: 2007-11-01 13:18:51 UTC
  • mto: (17.3.1 squeeze) (1.9.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 15.
  • Revision ID: james.westby@ubuntu.com-20071101131851-63uqsb4dax2h1cbm
Tags: upstream-1.95+20071101
ImportĀ upstreamĀ versionĀ 1.95+20071101

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* multiboot_loader_normal.c - boot another boot loader */
 
2
/*
 
3
 *  GRUB  --  GRand Unified Bootloader
 
4
 *  Copyright (C) 2007  Free Software Foundation, Inc.
 
5
 *
 
6
 *  GRUB is free software: you can redistribute it and/or modify
 
7
 *  it under the terms of the GNU General Public License as published by
 
8
 *  the Free Software Foundation, either version 3 of the License, or
 
9
 *  (at your option) any later version.
 
10
 *
 
11
 *  GRUB is distributed in the hope that it will be useful,
 
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 *  GNU General Public License for more details.
 
15
 *
 
16
 *  You should have received a copy of the GNU General Public License
 
17
 *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
18
 */
 
19
 
 
20
#include <grub/err.h>
 
21
#include <grub/normal.h>
 
22
#include <grub/dl.h>
 
23
#include <grub/multiboot_loader.h>
 
24
 
 
25
static grub_err_t
 
26
grub_normal_cmd_multiboot (struct grub_arg_list *state __attribute__ ((unused)),
 
27
                           int argc, char **args)
 
28
{
 
29
  grub_rescue_cmd_multiboot_loader (argc, args);
 
30
  return grub_errno;
 
31
}
 
32
 
 
33
static grub_err_t
 
34
grub_normal_cmd_module (struct grub_arg_list *state __attribute__ ((unused)),
 
35
                        int argc, char **args)
 
36
{
 
37
  grub_rescue_cmd_module_loader (argc, args);
 
38
  return grub_errno;
 
39
}
 
40
 
 
41
GRUB_MOD_INIT(multiboot_loader_normal)
 
42
{
 
43
  (void) mod; /* To stop warning.  */
 
44
  grub_register_command ("multiboot", grub_normal_cmd_multiboot,
 
45
                         GRUB_COMMAND_FLAG_BOTH
 
46
                         | GRUB_COMMAND_FLAG_NO_ARG_PARSE,
 
47
                         "multiboot FILE [ARGS...]",
 
48
                         "Load a Multiboot kernel.", 0);
 
49
 
 
50
  grub_register_command ("module", grub_normal_cmd_module,
 
51
                         GRUB_COMMAND_FLAG_BOTH
 
52
                         | GRUB_COMMAND_FLAG_NO_ARG_PARSE,
 
53
                         "module FILE [ARGS...]",
 
54
                         "Load a Multiboot module.", 0);
 
55
}
 
56
 
 
57
GRUB_MOD_FINI(multiboot_loader_normal)
 
58
{
 
59
  grub_unregister_command ("multiboot");
 
60
  grub_unregister_command ("module");
 
61
}