2008-09-29 Felix Zielcke <fzielcke@z-51.de>
[grub2/phcoder.git] / loader / multiboot_loader_normal.c
blob4a1a029b8c04bc7cf9291063dd208f73ae75f7c2
1 /* multiboot_loader_normal.c - boot another boot loader */
2 /*
3 * GRUB -- GRand Unified Bootloader
4 * Copyright (C) 2007 Free Software Foundation, Inc.
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.
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.
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/>.
20 #include <grub/err.h>
21 #include <grub/normal.h>
22 #include <grub/dl.h>
23 #include <grub/multiboot_loader.h>
25 static grub_err_t
26 grub_normal_cmd_multiboot (struct grub_arg_list *state __attribute__ ((unused)),
27 int argc, char **args)
29 grub_rescue_cmd_multiboot_loader (argc, args);
30 return grub_errno;
33 static grub_err_t
34 grub_normal_cmd_module (struct grub_arg_list *state __attribute__ ((unused)),
35 int argc, char **args)
37 grub_rescue_cmd_module_loader (argc, args);
38 return grub_errno;
41 GRUB_MOD_INIT(multiboot_loader_normal)
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);
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);
57 GRUB_MOD_FINI(multiboot_loader_normal)
59 grub_unregister_command ("multiboot");
60 grub_unregister_command ("module");