mirror of
https://git.proxmox.com/git/grub2
synced 2025-05-18 22:52:05 +00:00

* include/grub/normal.h (grub_halt_init): New prototype. (grub_halt_fini): Likewise. (grub_reboot_init): Likewise. (grub_reboot_fini): Likewise. * util/grub-emu.c: Include signal.h. (main_env): New global variable. (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot catch C-c. (grub_machine_fini): New function. (main): Call grub_halt_init and grub_reboot_init before grub_main, and grub_reboot_fini and grub_halt_fini after it. Call setjmp with MAIN_ENV to go back afterwards. Call grub_machine_fini right before return. * include/grub/util/misc.h: Include setjmp.h. (main_env): New prototype. * include/grub/kernel.h (grub_machine_fini): New prototype. * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise. * include/grub/i386/pc/console.h (grub_console_fini): Likewise. * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function. * kern/i386/pc/init.c (grub_machine_fini): Likewise. * term/i386/pc/console.c (grub_console_fini): Likewise. * util/i386/pc/misc.c: New file. * conf/i386-pc.rmk (grub_emu_SOURCES): Added util/i386/pc/misc.c, commands/i386/pc/halt.c and commands/i386/pc/reboot.c.
49 lines
1.6 KiB
C
49 lines
1.6 KiB
C
/*
|
|
* GRUB -- GRand Unified Bootloader
|
|
* Copyright (C) 2002,2005 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 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program 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, write to the Free Software
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
*/
|
|
|
|
#ifndef GRUB_BIOSDISK_MACHINE_HEADER
|
|
#define GRUB_BIOSDISK_MACHINE_HEADER 1
|
|
|
|
#define GRUB_BIOSDISK_FLAG_LBA 1
|
|
|
|
struct grub_biosdisk_data
|
|
{
|
|
int drive;
|
|
unsigned long cylinders;
|
|
unsigned long heads;
|
|
unsigned long sectors;
|
|
unsigned long flags;
|
|
};
|
|
|
|
int grub_biosdisk_rw_int13_extensions (int ah, int drive, void *dap);
|
|
int grub_biosdisk_rw_standard (int ah, int drive, int coff, int hoff,
|
|
int soff, int nsec, int segment);
|
|
int grub_biosdisk_check_int13_extensions (int drive);
|
|
int grub_biosdisk_get_diskinfo_int13_extensions (int drive, void *drp);
|
|
int grub_biosdisk_get_diskinfo_standard (int drive,
|
|
unsigned long *cylinders,
|
|
unsigned long *heads,
|
|
unsigned long *sectors);
|
|
int grub_biosdisk_get_num_floppies (void);
|
|
|
|
void grub_biosdisk_init (void);
|
|
void grub_biosdisk_fini (void);
|
|
|
|
#endif /* ! GRUB_BIOSDISK_MACHINE_HEADER */
|