/* boot.c - command to boot an operating system */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2002,2003,2004,2005,2007,2009 Free Software Foundation, Inc.
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
GRUB_MOD_LICENSE ("GPLv3+");
static int grub_loader_noreturn;
static int grub_loader_loaded;
int
grub_loader_is_loaded (void)
{
return grub_loader_loaded;
}
void
grub_err_t (*unload) (void),
int noreturn)
{
grub_loader_loaded = 1;
}
void
grub_loader_unset(void)
{
grub_loader_loaded = 0;
}
grub_loader_boot (void)
{
if (! grub_loader_loaded)
if (grub_loader_noreturn)
if (err)
return err;
err = (grub_loader_boot_func) ();
if (! err)
else
return err;
}
/* boot */
static grub_err_t
{
return grub_loader_boot ();
}
{
cmd_boot =
0, N_("Boot an operating system."));
}
{
}