Split grub-setup.c into frontend (grub-setup.c) and backend (setup.c)

	files.
parent 8f53bb3f
2013-10-15 Vladimir Serbinenko <phcoder@gmail.com>
Split grub-setup.c into frontend (grub-setup.c) and backend (setup.c)
files.
2013-10-15 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/osdep/windows/hostdisk.c (grub_util_fd_strerror):
......@@ -317,6 +317,7 @@ program = {
installdir = sbin;
mansection = 8;
common = util/grub-setup.c;
common = util/setup_bios.c;
common = grub-core/kern/emu/argp_common.c;
common = grub-core/lib/reed_solomon.c;
common = grub-core/osdep/init.c;
......@@ -326,7 +327,7 @@ program = {
ldadd = libgrubgcry.a;
ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
cppflags = '-DGRUB_SETUP_BIOS=1';
cppflags = '-DGRUB_SETUP_FUNC=grub_util_bios_setup';
};
program = {
......@@ -334,6 +335,7 @@ program = {
installdir = sbin;
mansection = 8;
common = util/grub-setup.c;
common = util/setup_sparc.c;
common = grub-core/kern/emu/argp_common.c;
common = grub-core/lib/reed_solomon.c;
common = grub-core/osdep/ofpath.c;
......@@ -344,7 +346,7 @@ program = {
ldadd = libgrubgcry.a;
ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
cppflags = '-DGRUB_SETUP_SPARC64=1';
cppflags = '-DGRUB_SETUP_FUNC=grub_util_sparc_setup';
};
program = {
......
static void
grub_file_progress_hook_real (grub_disk_addr_t sector,
unsigned offset, unsigned length,
void *data)
{
grub_file_t file = data;
file->progress_offset += length;
show_progress (file->progress_offset, file->size);
}
GRUB_MOD_INIT (progress)
{
grub_file_progress_hook = grub_file_progress_hook_real;
}
GRUB_MOD_FINI (progress)
{
grub_file_progress_hook = 0;
}
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2013 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/>.
*/
#ifndef GRUB_UTIL_INSTALL_HEADER
#define GRUB_UTIL_INSTALL_HEADER 1
#include <sys/types.h>
#include <stdio.h>
#include <grub/device.h>
#include <grub/disk.h>
#include <grub/emu/hostfile.h>
void
grub_util_bios_setup (const char *dir,
const char *boot_file, const char *core_file,
const char *dest, int force,
int fs_probe, int allow_floppy);
void
grub_util_sparc_setup (const char *dir,
const char *boot_file, const char *core_file,
const char *dest, int force,
int fs_probe, int allow_floppy);
#endif
This diff is collapsed.
This diff is collapsed.
#define GRUB_SETUP_BIOS 1
#include "setup.c"
#define GRUB_SETUP_SPARC64 1
#include "setup.c"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment