]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
First try at generating grub-emu from modules
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 7 Feb 2010 01:07:35 +0000 (02:07 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 7 Feb 2010 01:07:35 +0000 (02:07 +0100)
23 files changed:
Makefile.in
commands/sleep.c
conf/any-emu.rmk
configure.ac
disk/loopback.c
font/font_cmd.c
genemuinit.sh [new file with mode: 0644]
genemuinitheader.sh [new file with mode: 0644]
include/grub/i18n.h
partmap/acorn.c
partmap/amiga.c
partmap/apple.c
partmap/gpt.c
partmap/msdos.c
partmap/sun.c
parttool/msdospart.c
term/gfxterm.c
util/grub-emu.c
video/bitmap.c
video/readers/jpeg.c
video/readers/png.c
video/readers/tga.c
video/video.c

index 46b380cd5f0de83fb504f045017f94d3ade8cf7e..faf13a134bec2d71e02ac0d6cbc8e944c7687e3f 100644 (file)
@@ -84,7 +84,7 @@ TARGET_ASFLAGS = @TARGET_ASFLAGS@
 TARGET_MODULE_FORMAT = @TARGET_MODULE_FORMAT@
 TARGET_APPLE_CC = @TARGET_APPLE_CC@
 OBJCONV = @OBJCONV@
-TARGET_CPPFLAGS = @TARGET_CPPFLAGS@ -nostdinc -isystem $(shell $(TARGET_CC) -print-file-name=include) -I$(srcdir)/include -I$(builddir) -I$(builddir)/include \
+TARGET_CPPFLAGS = @TARGET_CPPFLAGS@ -I$(srcdir)/include -I$(builddir) -I$(builddir)/include \
        -Wall -W
 TARGET_LDFLAGS = @TARGET_LDFLAGS@
 TARGET_IMG_LDSCRIPT = @TARGET_IMG_LDSCRIPT@
index 9207b60a78ca609a9a6f4ef7870f197518a17295..cb208c96f801f7f373a692087f7b6861e1dfd8cc 100644 (file)
@@ -22,7 +22,6 @@
 #include <grub/time.h>
 #include <grub/types.h>
 #include <grub/misc.h>
-#include <grub/machine/time.h>
 #include <grub/extcmd.h>
 
 static const struct grub_arg_option options[] =
index fb97de0a0203501073c436f05643e84328539af9..310076345d6b8237b7d117b68e43f439e956a5d4 100644 (file)
@@ -1,94 +1,85 @@
 # -*- makefile -*-
 
+COMMON_LDFLAGS += -nostdlib
+COMMON_CFLAGS += -DGRUB_UTIL=1
+
 # Used by various components.  These rules need to precede them.
 script/lexer.c_DEPENDENCIES = grub_script.tab.h
 
-sbin_UTILITIES += grub-emu
+#sbin_UTILITIES += grub-emu
 util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
-grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c    \
-       commands/configfile.c commands/echo.c commands/help.c           \
-       commands/handler.c commands/ls.c commands/test.c                \
-       commands/search.c commands/blocklist.c commands/hexdump.c       \
-       lib/hexdump.c commands/halt.c commands/reboot.c                 \
-       lib/envblk.c commands/loadenv.c                                 \
-       commands/gptsync.c commands/probe.c commands/xnu_uuid.c         \
-       commands/password.c commands/keystatus.c                        \
-       disk/host.c disk/loopback.c disk/scsi.c                         \
-       fs/fshelp.c                                                     \
-       \
-       io/gzio.c                                                       \
-       kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c       \
+pkglib_MODULES += main.mod
+main_mod_SOURCES = kern/device.c kern/disk.c kern/dl.c  kern/env.c     \
        kern/err.c kern/list.c kern/handler.c                           \
-       kern/command.c kern/corecmd.c commands/extcmd.c kern/file.c     \
+       kern/command.c kern/corecmd.c kern/file.c                       \
        kern/fs.c commands/boot.c kern/main.c kern/misc.c kern/parser.c \
        kern/partition.c kern/reader.c kern/term.c                      \
        kern/rescue_reader.c kern/rescue_parser.c                       \
-       lib/arg.c normal/cmdline.c normal/datetime.c normal/misc.c      \
-       normal/handler.c normal/auth.c normal/autofs.c                  \
-       normal/completion.c normal/main.c normal/color.c                \
-       normal/menu.c normal/menu_entry.c normal/menu_viewer.c          \
-       normal/menu_text.c                                              \
-       script/main.c script/execute.c script/function.c                \
-       script/lexer.c script/script.c grub_script.tab.c                \
-       partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c   \
-       partmap/acorn.c partmap/gpt.c                                   \
-       \
-       fs/affs.c fs/cpio.c  fs/fat.c fs/ext2.c fs/hfs.c                \
-       fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c          \
-       fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c                  \
-       fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c fs/afs_be.c                \
-       fs/befs.c fs/befs_be.c fs/tar.c                                 \
        \
-       util/console.c util/hostfs.c util/grub-emu.c util/misc.c        \
+       util/console.c  util/grub-emu.c util/misc.c                     \
        util/hostdisk.c util/getroot.c                                  \
        \
-       disk/raid.c disk/raid5_recover.c disk/raid6_recover.c           \
-       disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c             \
-       commands/parttool.c parttool/msdospart.c                        \
        grub_emu_init.c gnulib/progname.c
+main_mod_CFLAGS = $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1
+main_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
+# For hostfs.mod.
+pkglib_MODULES += hostfs.mod
+hostfs_mod_SOURCES = util/hostfs.c
+hostfs_mod_CFLAGS = $(COMMON_CFLAGS)
+hostfs_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
+# For host.mod.
+pkglib_MODULES += host.mod
+host_mod_SOURCES = disk/host.c
+host_mod_CFLAGS = $(COMMON_CFLAGS)
+host_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
+# For reboot.mod.
+pkglib_MODULES += reboot.mod
+reboot_mod_SOURCES = commands/reboot.c
+reboot_mod_CFLAGS = $(COMMON_CFLAGS)
+reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
+# For halt.mod.
+pkglib_MODULES += halt.mod
+halt_mod_SOURCES = commands/halt.c
+halt_mod_CFLAGS = $(COMMON_CFLAGS)
+halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
 
 ifeq ($(target_cpu), i386)
-grub_emu_SOURCES += commands/i386/cpuid.c
+pkglib_MODULES += cpuid.mod
+cpuid_mod_SOURCES = commands/i386/cpuid.c
+cpuid_mod_CFLAGS = $(COMMON_CFLAGS)
+cpuid_mod_LDFLAGS = $(COMMON_LDFLAGS)
 endif
 
 grub_emu_LDFLAGS = $(LIBCURSES)
 
 ifeq ($(enable_grub_emu_usb), yes)
-grub_emu_SOURCES += disk/usbms.c util/usb.c bus/usb/usb.c      \
+pkglib_MODULES += usb.mod
+usb_mod_SOURCES = disk/usbms.c util/usb.c bus/usb/usb.c        \
                commands/usbtest.c
-grub_emu_LDFLAGS += $(LIBCURSES) $(LIBUSB)
+cpuid_mod_CFLAGS = $(COMMON_CFLAGS)
+usb_mod_LDFLAGS = $(COMMON_LDFLAGS) $(LIBUSB)
 endif
 
 ifeq ($(enable_grub_emu_pci), yes)
-grub_emu_SOURCES += util/pci.c commands/lspci.c
-grub_emu_LDFLAGS += $(LIBPCIACCESS)
+pkglib_MODULES += pci.mod
+pci_mod_SOURCES = util/pci.c commands/lspci.c
+pci_mod_LDFLAGS = $(LIBPCIACCESS)
 endif
 
-grub_emu_init.lst: geninit.sh $(filter-out grub_emu_init.c,$(grub_emu_SOURCES))
-       rm -f $@; grep GRUB_MOD_INIT $(filter %.c,$^) /dev/null > $@
-DISTCLEANFILES += grub_emu_init.lst
 
-grub_emu_init.h: grub_emu_init.lst $(filter-out grub_emu_init.c,$(grub_emu_SOURCES)) geninitheader.sh
-       rm -f $@; sh $(srcdir)/geninitheader.sh $< > $@
+grub_emu_init.h: genemuinitheader.sh
+       rm -f $@; echo $(pkglib_MODULES) |sh $(srcdir)/genemuinitheader.sh  > $@
 DISTCLEANFILES += grub_emu_init.h
 
-grub_emu_init.c: grub_emu_init.lst $(filter-out grub_emu_init.c,$(grub_emu_SOURCES)) geninit.sh grub_emu_init.h
-       rm -f $@; sh $(srcdir)/geninit.sh $< $(filter %.c,$^) > $@
+grub_emu_init.c: genemuinit.sh
+       rm -f $@; echo $(pkglib_MODULES) |sed 's,elf.mod,,;s,extcmd.mod,,;s,main.mod,,;s,gzio.mod,,;s,fshelp.mod,,;s,bufio.mod,,;s,setjmp.mod,,;'|sh $(srcdir)/genemuinit.sh > $@
 DISTCLEANFILES += grub_emu_init.c
 
+include $(srcdir)/conf/common.mk
 
-
-
-# FIXME: this could be shared with common.rmk
-
-# For grub-mkfont.
-ifeq ($(enable_grub_mkfont), yes)
-bin_UTILITIES += grub-mkfont
-grub_mkfont_SOURCES = gnulib/progname.c util/grub-mkfont.c util/misc.c
-grub_mkfont_CFLAGS = $(freetype_cflags)
-grub_mkfont_LDFLAGS = $(freetype_libs)
-endif
-
-grub_script.tab.c grub_script.tab.h: script/parser.y
-       $(YACC) -d -p grub_script_yy -b grub_script $(srcdir)/script/parser.y
-DISTCLEANFILES += grub_script.tab.c grub_script.tab.h
+grub-emu: $(pkglib_MODULES)
+       $(CC) -o $@ $(pkglib_MODULES) $(grub_emu_LDFLAGS) $(LDFLAGS) $(grub_emu_SOURCES)
index 6560d3e317fbda12e4de70f0ba9d758357e287a0..098e4524edbf9c12bf2546677566bb82404d0d04 100644 (file)
@@ -74,6 +74,7 @@ fi
 if test -z "$target_alias"; then
   case "$target_cpu"-"$platform" in
     x86_64-efi) ;;
+    x86_64-emu) ;;
     x86_64-*) target_cpu=i386 ;;
     powerpc64-ieee1275) target_cpu=powerpc ;;
   esac
index 29805182e328b45331f0fd1ac2da5adef3b5494a..a8bc25d8c63f035f27b8a21a12f76089b1b3b10f 100644 (file)
@@ -241,7 +241,7 @@ static struct grub_disk_dev grub_loopback_dev =
 
 static grub_extcmd_t cmd;
 
-GRUB_MOD_INIT(loop)
+GRUB_MOD_INIT(loopback)
 {
   cmd = grub_register_extcmd ("loopback", grub_cmd_loopback,
                              GRUB_COMMAND_FLAG_BOTH,
@@ -250,7 +250,7 @@ GRUB_MOD_INIT(loop)
   grub_disk_dev_register (&grub_loopback_dev);
 }
 
-GRUB_MOD_FINI(loop)
+GRUB_MOD_FINI(loopback)
 {
   grub_unregister_extcmd (cmd);
   grub_disk_dev_unregister (&grub_loopback_dev);
index 0402b8d77d9719c563e2b236e4b5f5a11e4c7131..b3eeb4dca868a3d9df377fc1e15b9ec16f46ccbb 100644 (file)
@@ -56,7 +56,7 @@ lsfonts_command (grub_command_t cmd __attribute__ ((unused)),
 
 static grub_command_t cmd_loadfont, cmd_lsfonts;
 
-GRUB_MOD_INIT(font_manager)
+GRUB_MOD_INIT(font)
 {
   grub_font_loader_init ();
 
@@ -69,7 +69,7 @@ GRUB_MOD_INIT(font_manager)
                           0, "List the loaded fonts.");
 }
 
-GRUB_MOD_FINI(font_manager)
+GRUB_MOD_FINI(font)
 {
   /* TODO: Determine way to free allocated resources.
      Warning: possible pointer references could be in use.  */
diff --git a/genemuinit.sh b/genemuinit.sh
new file mode 100644 (file)
index 0000000..e40a683
--- /dev/null
@@ -0,0 +1,68 @@
+#! /bin/sh
+#
+# Copyright (C) 2002,2005,2007  Free Software Foundation, Inc.
+#
+# This gensymlist.sh is free software; the author
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+lst="$1"
+shift
+
+cat <<EOF
+/* This file is automatically generated by geninit.sh. DO NOT EDIT! */
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 2002,2005,2007  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_emu_init.h"
+
+EOF
+
+cat <<EOF
+void
+grub_init_all (void)
+{
+EOF
+
+read mods
+for line in $mods; do
+  echo "grub_${line}_init ();" | sed 's,\.mod,,g;'
+done
+
+cat <<EOF
+}
+EOF
+
+cat <<EOF
+void
+grub_fini_all (void)
+{
+EOF
+
+for line in $mods; do
+  echo "grub_${line}_fini ();" | sed 's,\.mod,,g;'
+done
+
+cat <<EOF
+}
+EOF
diff --git a/genemuinitheader.sh b/genemuinitheader.sh
new file mode 100644 (file)
index 0000000..eac86fc
--- /dev/null
@@ -0,0 +1,48 @@
+#! /bin/sh
+#
+# Copyright (C) 2005,2007  Free Software Foundation, Inc.
+#
+# This gensymlist.sh is free software; the author
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+lst="$1"
+shift
+
+cat <<EOF
+/* This file is automatically generated by gensymlist.sh. DO NOT EDIT! */
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 2005,2007  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/>.
+ */
+
+EOF
+
+cat <<EOF
+void grub_init_all (void);
+void grub_fini_all (void);
+EOF
+
+read mods
+for line in $mods; do
+  echo "void grub_${line}_init (void);" | sed 's,\.mod,,g;'
+  echo "void grub_${line}_fini (void);" | sed 's,\.mod,,g;'
+done
index f6f4687443e07517dbba674f9cecca43c80678d4..11bb30af9b7d67b83520f61e1bdb2de0d5ce128a 100644 (file)
 #ifndef        GRUB_I18N_H
 #define        GRUB_I18N_H     1
 
-#ifdef GRUB_UTIL
+//#ifdef GRUB_UTIL
 # include <locale.h>
 # include <libintl.h>
-# define _(str) gettext(str)
-#else
+//# define _(str) gettext(str)
+//#else
 # define _(str) grub_gettext(str)
 
 const char *EXPORT_FUNC(grub_gettext_dummy) (const char *s);
 extern const char *(*EXPORT_VAR(grub_gettext)) (const char *s);
 
-#endif
+                                           //#endif
 
 #define N_(str) str
 
index e005975c0c1afafb00f2aa3d0940648ba1c03701..ed873875527c6347f31a73b849fedd53f1aea8c7 100644 (file)
@@ -195,12 +195,12 @@ static struct grub_partition_map grub_acorn_partition_map =
   .get_name = acorn_partition_map_get_name
 };
 
-GRUB_MOD_INIT(acorn_partition_map)
+GRUB_MOD_INIT(part_acorn)
 {
   grub_partition_map_register (&grub_acorn_partition_map);
 }
 
-GRUB_MOD_FINI(acorn_partition_map)
+GRUB_MOD_FINI(part_acorn)
 {
   grub_partition_map_unregister (&grub_acorn_partition_map);
 }
index dce9f4f1ffc02f64dd946a2657b5a8858a3768eb..f769d40480c7b94b2d66d6fb735ab2a6fd7da7c9 100644 (file)
@@ -204,12 +204,12 @@ static struct grub_partition_map grub_amiga_partition_map =
     .get_name = amiga_partition_map_get_name
   };
 
-GRUB_MOD_INIT(amiga_partition_map)
+GRUB_MOD_INIT(part_amiga)
 {
   grub_partition_map_register (&grub_amiga_partition_map);
 }
 
-GRUB_MOD_FINI(amiga_partition_map)
+GRUB_MOD_FINI(part_amiga)
 {
   grub_partition_map_unregister (&grub_amiga_partition_map);
 }
index 4dea55a321ce4c16862492745581b24b95e78f23..6208ebceae3c2937c37d038b3fb61cce3a8c77f1 100644 (file)
@@ -247,12 +247,12 @@ static struct grub_partition_map grub_apple_partition_map =
     .get_name = apple_partition_map_get_name
   };
 
-GRUB_MOD_INIT(apple_partition_map)
+GRUB_MOD_INIT(part_apple)
 {
   grub_partition_map_register (&grub_apple_partition_map);
 }
 
-GRUB_MOD_FINI(apple_partition_map)
+GRUB_MOD_FINI(part_apple)
 {
   grub_partition_map_unregister (&grub_apple_partition_map);
 }
index 4a4957437fcbe054d530e0432e6bb06906973214..46f3f0a3784c75a75e0c326e463e6aa23e29bd44 100644 (file)
@@ -182,12 +182,12 @@ static struct grub_partition_map grub_gpt_partition_map =
     .get_name = gpt_partition_map_get_name
   };
 
-GRUB_MOD_INIT(gpt_partition_map)
+GRUB_MOD_INIT(part_gpt)
 {
   grub_partition_map_register (&grub_gpt_partition_map);
 }
 
-GRUB_MOD_FINI(gpt_partition_map)
+GRUB_MOD_FINI(part_gpt)
 {
   grub_partition_map_unregister (&grub_gpt_partition_map);
 }
index 6ba7fb927cd47323a2a4f587ab87b12544c2f186..bae7ced9b8b17298c6bea800bb5e98c701d16a38 100644 (file)
@@ -327,12 +327,12 @@ static struct grub_partition_map grub_msdos_partition_map =
     .get_name = pc_partition_map_get_name
   };
 
-GRUB_MOD_INIT(pc_partition_map)
+GRUB_MOD_INIT(part_msdos)
 {
   grub_partition_map_register (&grub_msdos_partition_map);
 }
 
-GRUB_MOD_FINI(pc_partition_map)
+GRUB_MOD_FINI(part_msdos)
 {
   grub_partition_map_unregister (&grub_msdos_partition_map);
 }
index e816ec17af3931af93f961f56cdc9a8883d9f09d..39cd29969b99943214e53c2f5dfd818935a8a2fe 100644 (file)
@@ -202,12 +202,12 @@ static struct grub_partition_map grub_sun_partition_map =
     .get_name = sun_partition_map_get_name
   };
 
-GRUB_MOD_INIT(sun_partition_map)
+GRUB_MOD_INIT(part_sun)
 {
   grub_partition_map_register (&grub_sun_partition_map);
 }
 
-GRUB_MOD_FINI(sun_partition_map)
+GRUB_MOD_FINI(part_sun)
 {
   grub_partition_map_unregister (&grub_sun_partition_map);
 }
index dbb25bc52c57a91a1fc1b3e70edb3eb7661abde5..6ce48a977c567c9c5815c35e475955e345dc87a3 100644 (file)
@@ -138,7 +138,7 @@ static grub_err_t grub_pcpart_type (const grub_device_t dev,
   return GRUB_ERR_NONE;
 }
 
-GRUB_MOD_INIT (pcpart)
+GRUB_MOD_INIT (msdospart)
 {
   activate_table_handle = grub_parttool_register ("part_msdos",
                                                  grub_pcpart_boot,
@@ -148,7 +148,7 @@ GRUB_MOD_INIT (pcpart)
                                              grub_pcpart_typeargs);
 
 }
-GRUB_MOD_FINI(pcpart)
+GRUB_MOD_FINI(msdospart)
 {
   grub_parttool_unregister (activate_table_handle);
   grub_parttool_unregister (type_table_handle);
index f161499e6f9137d9ac42919113427383cb0f6759..5c94a6b9abe8ec58f31a509ffb3c4d6d03c359cf 100644 (file)
@@ -251,7 +251,7 @@ static int NESTED_FUNC_ATTR video_hook (grub_video_adapter_t p __attribute__ ((u
 }
 
 static grub_err_t
-grub_gfxterm_init (void)
+grub_gfxterm_term_init (void)
 {
   char *font_name;
   char *modevar;
@@ -312,7 +312,7 @@ grub_gfxterm_init (void)
 }
 
 static grub_err_t
-grub_gfxterm_fini (void)
+grub_gfxterm_term_fini (void)
 {
   if (bitmap)
     {
@@ -932,8 +932,8 @@ grub_gfxterm_background_image_cmd (grub_command_t cmd __attribute__ ((unused)),
 static struct grub_term_output grub_video_term =
   {
     .name = "gfxterm",
-    .init = grub_gfxterm_init,
-    .fini = grub_gfxterm_fini,
+    .init = grub_gfxterm_term_init,
+    .fini = grub_gfxterm_term_fini,
     .putchar = grub_gfxterm_putchar,
     .getcharwidth = grub_gfxterm_getcharwidth,
     .getwh = grub_virtual_screen_getwh,
@@ -951,7 +951,7 @@ static struct grub_term_output grub_video_term =
 
 static grub_command_t cmd;
 
-GRUB_MOD_INIT(term_gfxterm)
+GRUB_MOD_INIT(gfxterm)
 {
   grub_term_register_output ("gfxterm", &grub_video_term);
   cmd = grub_register_command ("background_image",
@@ -959,7 +959,7 @@ GRUB_MOD_INIT(term_gfxterm)
                               0, "Load background image for active terminal");
 }
 
-GRUB_MOD_FINI(term_gfxterm)
+GRUB_MOD_FINI(gfxterm)
 {
   grub_unregister_command (cmd);
   grub_term_unregister_output (&grub_video_term);
index e65c8585e550ec18ce0ab01627b72e51c6b3e3a5..b3117ab53870cfe2cb76a1091707f7d7262d6a53 100644 (file)
@@ -51,7 +51,7 @@ static char *prefix = NULL;
 grub_addr_t
 grub_arch_modules_addr (void)
 {
-  return NULL;
+  return 0;
 }
 
 grub_err_t
@@ -106,10 +106,6 @@ grub_machine_fini (void)
   grub_console_fini ();
 }
 
-void
-read_command_list (void)
-{
-}
 \f
 
 static struct option options[] =
index 7b135a5dc459476a052550832e5694ca3d0abf6f..02ded85c62d1d6c159d438ce1681953f2deb02e7 100644 (file)
@@ -243,11 +243,11 @@ void *grub_video_bitmap_get_data (struct grub_video_bitmap *bitmap)
 }
 
 /* Initialize bitmap module.  */
-GRUB_MOD_INIT(video_bitmap)
+GRUB_MOD_INIT(bitmap)
 {
 }
 
 /* Finalize bitmap module.  */
-GRUB_MOD_FINI(video_bitmap)
+GRUB_MOD_FINI(bitmap)
 {
 }
index 460a52872b8aaa9704cd6bcc7290e53a8c6ca9c3..8b7398c3982db4d657df6ee6f13f7f7ba072eaa9 100644 (file)
@@ -725,7 +725,7 @@ static struct grub_video_bitmap_reader jpeg_reader = {
   .next = 0
 };
 
-GRUB_MOD_INIT (video_reader_jpeg)
+GRUB_MOD_INIT (jpeg)
 {
   grub_video_bitmap_reader_register (&jpg_reader);
   grub_video_bitmap_reader_register (&jpeg_reader);
@@ -736,7 +736,7 @@ GRUB_MOD_INIT (video_reader_jpeg)
 #endif
 }
 
-GRUB_MOD_FINI (video_reader_jpeg)
+GRUB_MOD_FINI (jpeg)
 {
 #if defined(JPEG_DEBUG)
   grub_unregister_command ("jpegtest");
index c2008aeb2134d6ebc2d96647e82b217bb1f9587e..7acce214539b0242d76586d9cfe1832cb741addd 100644 (file)
@@ -890,7 +890,7 @@ static struct grub_video_bitmap_reader png_reader = {
   .next = 0
 };
 
-GRUB_MOD_INIT (video_reader_png)
+GRUB_MOD_INIT (png)
 {
   grub_video_bitmap_reader_register (&png_reader);
 #if defined(PNG_DEBUG)
@@ -900,7 +900,7 @@ GRUB_MOD_INIT (video_reader_png)
 #endif
 }
 
-GRUB_MOD_FINI (video_reader_png)
+GRUB_MOD_FINI (png)
 {
 #if defined(PNG_DEBUG)
   grub_unregister_command ("pngtest");
index d0ca2770f72ca4fd5552ec64d6b461d3bff8a824..5f0a7f890324900c20461f2bba4870f0d1c89319 100644 (file)
@@ -476,7 +476,7 @@ static struct grub_video_bitmap_reader tga_reader = {
   .next = 0
 };
 
-GRUB_MOD_INIT(video_reader_tga)
+GRUB_MOD_INIT(tga)
 {
   grub_video_bitmap_reader_register (&tga_reader);
 #if defined(TGA_DEBUG)
@@ -485,7 +485,7 @@ GRUB_MOD_INIT(video_reader_tga)
 #endif
 }
 
-GRUB_MOD_FINI(video_reader_tga)
+GRUB_MOD_FINI(tga)
 {
 #if defined(TGA_DEBUG)
   grub_unregister_command ("tgatest");
index c1d66bdd00a458ee69c2094cd4ba23cccdd72a74..5dcca7c7e3cd31335a3188ed669d01a39955d664 100644 (file)
@@ -713,11 +713,11 @@ grub_video_set_mode (const char *modestring,
 }
 
 /* Initialize Video API module.  */
-GRUB_MOD_INIT(video_video)
+GRUB_MOD_INIT(video)
 {
 }
 
 /* Finalize Video API module.  */
-GRUB_MOD_FINI(video_video)
+GRUB_MOD_FINI(video)
 {
 }