Merge from trunk
This commit is contained in:
commit
dfec2d96f9
89 changed files with 1963 additions and 3765 deletions
|
@ -109,6 +109,8 @@ grub_device_iterate (int (*hook) (const char *name))
|
|||
(void) grub_partition_iterate (dev->disk, iterate_partition);
|
||||
grub_device_close (dev);
|
||||
|
||||
grub_errno = GRUB_ERR_NONE;
|
||||
|
||||
p = ents;
|
||||
while (p != NULL)
|
||||
{
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
*/
|
||||
|
||||
#include <grub/cpu/io.h>
|
||||
#include <grub/cpu/halt.h>
|
||||
#include <grub/machine/init.h>
|
||||
#include <grub/misc.h>
|
||||
|
||||
|
|
|
@ -484,21 +484,6 @@ FUNCTION(grub_exit)
|
|||
jmp cold_reboot
|
||||
.code32
|
||||
|
||||
/*
|
||||
* grub_reboot()
|
||||
*
|
||||
* Reboot the system. At the moment, rely on BIOS.
|
||||
*/
|
||||
FUNCTION(grub_reboot)
|
||||
call prot_to_real
|
||||
.code16
|
||||
cold_reboot:
|
||||
/* cold boot */
|
||||
movw $0x0472, %di
|
||||
movw %ax, (%di)
|
||||
ljmp $0xFFFF, $0x0000
|
||||
.code32
|
||||
|
||||
/*
|
||||
* grub_halt(int no_apm)
|
||||
*
|
||||
|
|
|
@ -95,3 +95,5 @@ codestart:
|
|||
|
||||
/* This should never happen. */
|
||||
jmp EXT_C(grub_stop)
|
||||
|
||||
#include "../realmode.S"
|
||||
|
|
|
@ -215,10 +215,27 @@ realcseg:
|
|||
movw %ax, %gs
|
||||
movw %ax, %ss
|
||||
|
||||
#ifdef GRUB_MACHINE_PCBIOS
|
||||
/* restore interrupts */
|
||||
sti
|
||||
#endif
|
||||
|
||||
/* return on new stack! */
|
||||
DATA32 ret
|
||||
|
||||
.code32
|
||||
|
||||
/*
|
||||
* grub_reboot()
|
||||
*
|
||||
* Reboot the system. At the moment, rely on BIOS.
|
||||
*/
|
||||
FUNCTION(grub_reboot)
|
||||
call prot_to_real
|
||||
.code16
|
||||
cold_reboot:
|
||||
/* set 0x472 to 0x0000 for cold boot (0x1234 for warm boot) */
|
||||
movw $0x0472, %di
|
||||
movw %ax, (%di)
|
||||
ljmp $0xf000, $0xfff0
|
||||
.code32
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include <grub/cpu/io.h>
|
||||
#include <grub/cpu/at_keyboard.h>
|
||||
#include <grub/cpu/reboot.h>
|
||||
#include <grub/misc.h>
|
||||
|
||||
void
|
||||
grub_reboot (void)
|
||||
{
|
||||
/* Use the keyboard controller to reboot. That's what keyboards were
|
||||
designed for, isn't it? */
|
||||
grub_outb (KEYBOARD_COMMAND_REBOOT, KEYBOARD_REG_STATUS);
|
||||
|
||||
grub_printf ("GRUB doesn't know how to reboot this machine yet!\n");
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
/* openfw.c -- Open firmware support functions. */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2003,2004,2005,2007,2008 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2003,2004,2005,2007,2008,2009 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -399,11 +399,14 @@ grub_ieee1275_encode_devname (const char *path)
|
|||
return encoding;
|
||||
}
|
||||
|
||||
/* On i386, a firmware-independant grub_reboot() is provided by realmode.S. */
|
||||
#ifndef __i386__
|
||||
void
|
||||
grub_reboot (void)
|
||||
{
|
||||
grub_ieee1275_interpret ("reset-all", 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
grub_halt (void)
|
||||
|
|
13
kern/misc.c
13
kern/misc.c
|
@ -126,6 +126,19 @@ grub_printf (const char *fmt, ...)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
grub_printf_ (const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
va_start (ap, fmt);
|
||||
ret = grub_vprintf (_(fmt), ap);
|
||||
va_end (ap);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if defined (APPLE_CC) && ! defined (GRUB_UTIL)
|
||||
int
|
||||
grub_err_printf (const char *fmt, ...)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue