merge trunk

This commit is contained in:
Colin Watson 2011-04-21 11:07:10 +01:00
commit 1eb44ae37e
301 changed files with 8465 additions and 1449 deletions

View file

@ -44,7 +44,6 @@ grub-kbdcomp
grub-macho2img grub-macho2img
grub-menulst2cfg grub-menulst2cfg
grub-mk* grub-mk*
grub-pbkdf2
grub-pe2elf grub-pe2elf
grub-probe grub-probe
grub_probe_init.c grub_probe_init.c
@ -134,3 +133,5 @@ grub-core/gnulib/wctype.h
grub-core/rs_decoder.S grub-core/rs_decoder.S
widthspec.bin widthspec.bin
widthspec.h widthspec.h
docs/stamp-1
docs/version-dev.texi

7
BUGS Normal file
View file

@ -0,0 +1,7 @@
GRUB team is aware of following problems:
- Currently search and assembling multidevice abstractions scans
all the devices which can be slow.
- Cache isn't used correctly for video which results in slowness.
While these are bugs their solution has a potential of breaking more and more
seriously. So it was decided for 1.99 that they aren't fixed.

1570
ChangeLog

File diff suppressed because it is too large Load diff

View file

@ -40,13 +40,5 @@
(GRUB_MOD_FINI): Unregister background_color command. (GRUB_MOD_FINI): Unregister background_color command.
(redraw_screen_rect): Allow blend/replace of text layer to be (redraw_screen_rect): Allow blend/replace of text layer to be
controlled independently from whether there is a background bitmap. controlled independently from whether there is a background bitmap.
(grub_gfxterm_fullscreen): Change blend_text_bg when changing (grub_gfxterm_background_image_cmd): Change blend_text_bg when
bitmap. changing bitmap.
(destroy_window): Likewise.
(grub_gfxterm_background_image_cmd): Likewise.
Fix border repainting.
* grub-core/term/gfxterm.c (dirty_region_add): When a repaint is
already scheduled, merge the virtual screen with the requested
region rather than repainting only the virtual screen.

View file

@ -147,28 +147,28 @@ linux.init.i386: $(srcdir)/grub-core/tests/boot/linux.init-i386.S
$(TARGET_CC) -o $@ $< -m32 -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" $(TARGET_CC) -o $@ $< -m32 -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\"
multiboot.elf: $(srcdir)/grub-core/tests/boot/kernel-i386.S multiboot.elf: $(srcdir)/grub-core/tests/boot/kernel-i386.S
$(TARGET_CC) -o $@ $< -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -DTARGET_MULTIBOOT=1 -Wl,-N -Wl,-Ttext,0x100000 -m32 -I$(srcdir)/include $(TARGET_CC) -o $@ $< -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -DTARGET_MULTIBOOT=1 -Wl,--build-id=none -Wl,-N -Wl,-Ttext,0x100000 -m32 -I$(srcdir)/include
kfreebsd.elf: $(srcdir)/grub-core/tests/boot/kernel-i386.S kfreebsd.elf: $(srcdir)/grub-core/tests/boot/kernel-i386.S
$(TARGET_CC) -o $@ $< -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,-N -Wl,-Ttext,0x100000 -m32 -I$(srcdir)/include $(TARGET_CC) -o $@ $< -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,--build-id=none -Wl,-N -Wl,-Ttext,0x100000 -m32 -I$(srcdir)/include
kfreebsd.aout: kfreebsd.elf kfreebsd.aout: kfreebsd.elf
$(OBJCOPY) -O a.out-i386-linux $< $@ -R .note.gnu.build-id $(OBJCOPY) -O a.out-i386-linux $< $@ -R .note.gnu.build-id
pc-chainloader.elf: $(srcdir)/grub-core/tests/boot/kernel-8086.S pc-chainloader.elf: $(srcdir)/grub-core/tests/boot/kernel-8086.S
$(TARGET_CC) -o $@ $< -DTARGET_CHAINLOADER=1 -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,-N -Wl,-Ttext,0x7c00 -m32 $(TARGET_CC) -o $@ $< -DTARGET_CHAINLOADER=1 -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,--build-id=none -Wl,-N -Wl,-Ttext,0x7c00 -m32
pc-chainloader.bin: pc-chainloader.elf pc-chainloader.bin: pc-chainloader.elf
$(OBJCOPY) -O binary --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; $(OBJCOPY) -O binary --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@;
ntldr.elf: $(srcdir)/grub-core/tests/boot/kernel-8086.S ntldr.elf: $(srcdir)/grub-core/tests/boot/kernel-8086.S
$(TARGET_CC) -o $@ $< -DTARGET_NTLDR=1 -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,-N -Wl,-Ttext,0 -m32 $(TARGET_CC) -o $@ $< -DTARGET_NTLDR=1 -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,--build-id=none -Wl,-N -Wl,-Ttext,0 -m32
ntldr.bin: ntldr.elf ntldr.bin: ntldr.elf
$(OBJCOPY) -O binary --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@; $(OBJCOPY) -O binary --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn $< $@;
multiboot2.elf: $(srcdir)/grub-core/tests/boot/kernel-i386.S multiboot2.elf: $(srcdir)/grub-core/tests/boot/kernel-i386.S
$(TARGET_CC) -o $@ $< -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,-N -Wl,-Ttext,0x100000 -m32 -I$(srcdir)/include -DTARGET_MULTIBOOT2=1 $(TARGET_CC) -o $@ $< -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,--build-id=none -Wl,-N -Wl,-Ttext,0x100000 -m32 -I$(srcdir)/include -DTARGET_MULTIBOOT2=1
kfreebsd.init.x86_64: $(srcdir)/grub-core/tests/boot/kfreebsd.init-x86_64.S kfreebsd.init.x86_64: $(srcdir)/grub-core/tests/boot/kfreebsd.init-x86_64.S
$(TARGET_CC) -o $@ $< -m64 -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" && freebsd-brandelf -t FreeBSD $@ $(TARGET_CC) -o $@ $< -m64 -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" && freebsd-brandelf -t FreeBSD $@

View file

@ -83,6 +83,7 @@ library = {
common = grub-core/lib/LzFind.c; common = grub-core/lib/LzFind.c;
common = grub-core/lib/LzmaEnc.c; common = grub-core/lib/LzmaEnc.c;
common = grub-core/lib/pbkdf2.c; common = grub-core/lib/pbkdf2.c;
common = grub-core/lib/crc.c;
common = grub-core/normal/datetime.c; common = grub-core/normal/datetime.c;
common = grub-core/normal/misc.c; common = grub-core/normal/misc.c;
common = grub-core/partmap/acorn.c; common = grub-core/partmap/acorn.c;
@ -98,6 +99,7 @@ library = {
common = grub-core/script/main.c; common = grub-core/script/main.c;
common = grub-core/script/script.c; common = grub-core/script/script.c;
common = grub-core/script/argv.c; common = grub-core/script/argv.c;
common = grub-core/io/gzio.c;
}; };
program = { program = {
@ -122,7 +124,7 @@ program = {
ldadd = libgrubkern.a; ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a; ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBLZMA)'; ldadd = '$(LIBLZMA)';
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
cppflags = '-DGRUB_PKGLIBROOTDIR=\"$(pkglibrootdir)\"'; cppflags = '-DGRUB_PKGLIBROOTDIR=\"$(pkglibrootdir)\"';
}; };
@ -135,7 +137,7 @@ program = {
ldadd = libgrubmods.a; ldadd = libgrubmods.a;
ldadd = libgrubkern.a; ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a; ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
}; };
program = { program = {
@ -147,7 +149,7 @@ program = {
ldadd = libgrubmods.a; ldadd = libgrubmods.a;
ldadd = libgrubkern.a; ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a; ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
}; };
program = { program = {
@ -159,7 +161,7 @@ program = {
ldadd = libgrubmods.a; ldadd = libgrubmods.a;
ldadd = libgrubkern.a; ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a; ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
}; };
program = { program = {
@ -171,7 +173,7 @@ program = {
ldadd = libgrubmods.a; ldadd = libgrubmods.a;
ldadd = libgrubkern.a; ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a; ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
cflags = '$(CFLAGS_GCRY)'; cflags = '$(CFLAGS_GCRY)';
cppflags = '$(CPPFLAGS_GCRY)'; cppflags = '$(CPPFLAGS_GCRY)';
}; };
@ -209,7 +211,7 @@ program = {
ldadd = libgrubmods.a; ldadd = libgrubmods.a;
ldadd = libgrubkern.a; ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a; ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
}; };
program = { program = {
@ -224,7 +226,7 @@ program = {
ldadd = libgrubkern.a; ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a; ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(freetype_libs)'; ldadd = '$(freetype_libs)';
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
condition = COND_GRUB_MKFONT; condition = COND_GRUB_MKFONT;
}; };
@ -243,7 +245,7 @@ program = {
ldadd = libgrubmods.a; ldadd = libgrubmods.a;
ldadd = libgrubkern.a; ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a; ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR)'; ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
}; };
program = { program = {
@ -255,7 +257,7 @@ program = {
ldadd = libgrubmods.a; ldadd = libgrubmods.a;
ldadd = libgrubkern.a; ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a; ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR)'; ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
}; };
program = { program = {
@ -272,7 +274,7 @@ program = {
ldadd = libgrubmods.a; ldadd = libgrubmods.a;
ldadd = libgrubkern.a; ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a; ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR)'; ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
enable = i386_pc; enable = i386_pc;
enable = sparc64_ieee1275; enable = sparc64_ieee1275;
@ -287,7 +289,7 @@ program = {
ldadd = libgrubmods.a; ldadd = libgrubmods.a;
ldadd = libgrubkern.a; ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a; ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL)'; ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBGEOM)';
enable = sparc64_ieee1275; enable = sparc64_ieee1275;
}; };
@ -301,7 +303,7 @@ program = {
ldadd = libgrubmods.a; ldadd = libgrubmods.a;
ldadd = libgrubkern.a; ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a; ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
}; };
data = { data = {
@ -611,7 +613,7 @@ program = {
ldadd = libgrubmods.a; ldadd = libgrubmods.a;
ldadd = libgrubkern.a; ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a; ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; ldadd = '$(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
}; };
program = { program = {
@ -624,5 +626,5 @@ program = {
ldadd = libgrubmods.a; ldadd = libgrubmods.a;
ldadd = libgrubkern.a; ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a; ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
}; };

6
NEWS
View file

@ -29,7 +29,7 @@ New in 1.99:
* New `lsacpi' command. * New `lsacpi' command.
* Basic btrfs support (detection and UUID). * Btrfs support.
* New `--boot-directory' option to `grub-install', `grub-reboot', and * New `--boot-directory' option to `grub-install', `grub-reboot', and
`grub-set-default', with clearer semantics than the previous `grub-set-default', with clearer semantics than the previous
@ -83,10 +83,6 @@ New in 1.99:
* Extensive updates to the Texinfo documentation. * Extensive updates to the Texinfo documentation.
* Add `grub-probe' support for the btrfs filesystem, permitting / to
reside on btrfs as long as /boot is on a filesystem natively supported
by GRUB.
* Handle symbolic links under /dev/mapper on GNU/Linux. * Handle symbolic links under /dev/mapper on GNU/Linux.
* Handle installation across multiple partition table types. * Handle installation across multiple partition table types.

View file

@ -2,6 +2,10 @@
set -e set -e
export LC_CTYPE=C
export LC_COLLATE=C
unset LC_ALL
autogen --version >/dev/null || exit 1 autogen --version >/dev/null || exit 1
echo "Importing unicode..." echo "Importing unicode..."

View file

@ -2,6 +2,10 @@
CFLAGS_PLATFORM= CFLAGS_PLATFORM=
export LC_COLLATE := C
export LC_CTYPE := C
unexport LC_ALL
# Platform specific options # Platform specific options
if COND_i386_pc if COND_i386_pc
CFLAGS_PLATFORM += -mrtd -mregparm=3 CFLAGS_PLATFORM += -mrtd -mregparm=3
@ -67,7 +71,11 @@ CFLAGS_KERNEL = $(CFLAGS_CPU) $(CFLAGS_PLATFORM) -ffreestanding
LDFLAGS_KERNEL = $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib -Wl,-N -static-libgcc LDFLAGS_KERNEL = $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib -Wl,-N -static-libgcc
CPPFLAGS_KERNEL = $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM) CPPFLAGS_KERNEL = $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM)
CCASFLAGS_KERNEL = $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM) CCASFLAGS_KERNEL = $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM)
if COND_CYGWIN
STRIPFLAGS_KERNEL = -F elf32-i386 -R .rel.dyn -R .reginfo -R .note -R .comment -R .drectve
else
STRIPFLAGS_KERNEL = -R .rel.dyn -R .reginfo -R .note -R .comment STRIPFLAGS_KERNEL = -R .rel.dyn -R .reginfo -R .note -R .comment
endif
CFLAGS_MODULE = $(CFLAGS_CPU) $(CFLAGS_PLATFORM) -ffreestanding CFLAGS_MODULE = $(CFLAGS_CPU) $(CFLAGS_PLATFORM) -ffreestanding
LDFLAGS_MODULE = $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib -Wl,-N,-r,-d LDFLAGS_MODULE = $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib -Wl,-N,-r,-d

View file

@ -13,15 +13,9 @@ SECTIONS
__data_start__ = . ; __data_start__ = . ;
*(.data) *(.data)
__data_end__ = . ; __data_end__ = . ;
}
.rdata :
{
__rdata_start__ = . ; __rdata_start__ = . ;
*(.rdata) *(.rdata)
__rdata_end__ = . ; __rdata_end__ = . ;
}
.pdata :
{
*(.pdata) *(.pdata)
edata = . ; edata = . ;
} }

View file

@ -1,3 +1,7 @@
#undef _LARGEFILE_SOURCE
#undef _FILE_OFFSET_BITS
#define _LARGEFILE_SOURCE
#define _FILE_OFFSET_BITS 64
#if defined (GRUB_UTIL) || !defined (GRUB_MACHINE) #if defined (GRUB_UTIL) || !defined (GRUB_MACHINE)
#include <config-util.h> #include <config-util.h>
#define NESTED_FUNC_ATTR #define NESTED_FUNC_ATTR

View file

@ -32,7 +32,7 @@ dnl type, so there is no conflict. Variables with the prefix "TARGET_"
dnl (such as TARGET_CC, TARGET_CFLAGS, etc.) are used for the target dnl (such as TARGET_CC, TARGET_CFLAGS, etc.) are used for the target
dnl type. dnl type.
AC_INIT([GRUB],[1.99~beta0],[bug-grub@gnu.org]) AC_INIT([GRUB],[1.99~rc2],[bug-grub@gnu.org])
AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_AUX_DIR([build-aux])
@ -103,15 +103,12 @@ else
platform="$with_platform" platform="$with_platform"
fi fi
# Adjust CPU unless target was explicitly specified. case "$target_cpu"-"$platform" in
if test -z "$target_alias"; then x86_64-efi) ;;
case "$target_cpu"-"$platform" in x86_64-emu) ;;
x86_64-efi) ;; x86_64-*) target_cpu=i386 ;;
x86_64-emu) ;; powerpc64-ieee1275) target_cpu=powerpc ;;
x86_64-*) target_cpu=i386 ;; esac
powerpc64-ieee1275) target_cpu=powerpc ;;
esac
fi
# Check if the platform is supported, make final adjustments. # Check if the platform is supported, make final adjustments.
case "$target_cpu"-"$platform" in case "$target_cpu"-"$platform" in
@ -249,7 +246,7 @@ else
fi fi
# These are not a "must". # These are not a "must".
AC_PATH_PROG(MAKEINFO, makeinfo) AC_PATH_PROGS(MAKEINFO, makeinfo true)
# #
# Checks for host programs. # Checks for host programs.
@ -457,7 +454,7 @@ fi
# For platforms where ELF is not the default link format. # For platforms where ELF is not the default link format.
AC_MSG_CHECKING([for command to convert module to ELF format]) AC_MSG_CHECKING([for command to convert module to ELF format])
case "${host_os}" in case "${host_os}" in
cygwin) TARGET_OBJ2ELF='$(grub_utildir)/grub-pe2elf'; cygwin) TARGET_OBJ2ELF='$(top_builddir)/grub-pe2elf';
# FIXME: put proper test here # FIXME: put proper test here
NEED_REGISTER_FRAME_INFO=1 NEED_REGISTER_FRAME_INFO=1
;; ;;
@ -866,6 +863,12 @@ if test x"$enable_device_mapper" = xno ; then
device_mapper_excuse="explicitly disabled" device_mapper_excuse="explicitly disabled"
fi fi
if test x"$device_mapper_excuse" = x ; then
# Check for device-mapper header.
AC_CHECK_HEADER([libdevmapper.h], [],
[device_mapper_excuse="need libdevmapper header"])
fi
if test x"$device_mapper_excuse" = x ; then if test x"$device_mapper_excuse" = x ; then
# Check for device-mapper library. # Check for device-mapper library.
AC_CHECK_LIB([devmapper], [dm_task_create], [], AC_CHECK_LIB([devmapper], [dm_task_create], [],
@ -887,6 +890,15 @@ fi
AC_SUBST([LIBDEVMAPPER]) AC_SUBST([LIBDEVMAPPER])
LIBGEOM=
if test x$host_kernel = xkfreebsd; then
AC_CHECK_LIB([geom], [geom_gettree], [],
[AC_MSG_ERROR([Your platform requires libgeom])])
LIBGEOM="-lgeom"
fi
AC_SUBST([LIBGEOM])
AC_CHECK_LIB([lzma], [lzma_code], AC_CHECK_LIB([lzma], [lzma_code],
[LIBLZMA="-llzma" [LIBLZMA="-llzma"
AC_DEFINE([HAVE_LIBLZMA], [1], AC_DEFINE([HAVE_LIBLZMA], [1],
@ -961,6 +973,7 @@ AM_CONDITIONAL([COND_APPLE_CC], [test x$TARGET_APPLE_CC = x1])
AM_CONDITIONAL([COND_ENABLE_EFIEMU], [test x$enable_efiemu = xyes]) AM_CONDITIONAL([COND_ENABLE_EFIEMU], [test x$enable_efiemu = xyes])
AM_CONDITIONAL([COND_HAVE_ASM_USCORE], [test x$HAVE_ASM_USCORE = x1]) AM_CONDITIONAL([COND_HAVE_ASM_USCORE], [test x$HAVE_ASM_USCORE = x1])
AM_CONDITIONAL([COND_CYGWIN], [test x$host_os = xcygwin])
# Output files. # Output files.
grub_CHECK_LINK_DIR grub_CHECK_LINK_DIR

View file

@ -1,7 +1,7 @@
AUTOMAKE_OPTIONS = subdir-objects AUTOMAKE_OPTIONS = subdir-objects
# AM_MAKEINFOFLAGS = --no-split --no-validate # AM_MAKEINFOFLAGS = --no-split --no-validate
info_TEXINFOS = grub.texi info_TEXINFOS = grub.texi grub-dev.texi
grub_TEXINFOS = fdl.texi grub_TEXINFOS = fdl.texi

BIN
docs/font_char_metrics.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View file

@ -0,0 +1 @@
Please fill this in.

1533
docs/grub-dev.texi Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -50,7 +50,7 @@ grub_script.yy.h: script/yylex.l
grub_script.yy.c: grub_script.yy.h grub_script.yy.c: grub_script.yy.h
rs_decoder.S: $(srcdir)/lib/reed_solomon.c rs_decoder.S: $(srcdir)/lib/reed_solomon.c
$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -I$(top_builddir) -S -DSTANDALONE -o $@ $< -g0 -mregparm=3 $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Os -I$(top_builddir) -S -DSTANDALONE -o $@ $< -g0 -mregparm=3
kern/i386/pc/startup.S: $(builddir)/rs_decoder.S kern/i386/pc/startup.S: $(builddir)/rs_decoder.S
@ -303,7 +303,7 @@ platform_DATA += moddep.lst
CLEANFILES += config.log syminfo.lst moddep.lst CLEANFILES += config.log syminfo.lst moddep.lst
$(MOD_FILES): %.mod : genmod.sh moddep.lst %.module$(EXEEXT) $(MOD_FILES): %.mod : genmod.sh moddep.lst %.module$(EXEEXT)
sh $^ $@ TARGET_OBJ2ELF=@TARGET_OBJ2ELF@ sh $^ $@
platform_DATA += $(MOD_FILES) platform_DATA += $(MOD_FILES)
CLEANFILES += $(MOD_FILES) CLEANFILES += $(MOD_FILES)

View file

@ -201,7 +201,7 @@ program = {
ldadd = 'kernel.img$(EXEEXT)'; ldadd = 'kernel.img$(EXEEXT)';
ldadd = '$(MODULE_FILES)'; ldadd = '$(MODULE_FILES)';
ldadd = '$(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; ldadd = '$(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
enable = emu; enable = emu;
}; };
@ -213,7 +213,7 @@ program = {
emu_nodist = symlist.c; emu_nodist = symlist.c;
ldadd = 'kernel.img$(EXEEXT)'; ldadd = 'kernel.img$(EXEEXT)';
ldadd = '$(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR)'; ldadd = '$(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
enable = emu; enable = emu;
}; };
@ -325,6 +325,7 @@ image = {
name = fwstart; name = fwstart;
mips_yeeloong = boot/mips/yeeloong/fwstart.S; mips_yeeloong = boot/mips/yeeloong/fwstart.S;
objcopyflags = '-O binary'; objcopyflags = '-O binary';
ldflags = '-static-libgcc -lgcc -Wl,-N,-S,-Ttext,0xbfc00000,-Bstatic';
enable = mips_yeeloong; enable = mips_yeeloong;
}; };
@ -906,6 +907,7 @@ module = {
module = { module = {
name = btrfs; name = btrfs;
common = fs/btrfs.c; common = fs/btrfs.c;
common = lib/crc.c;
}; };
module = { module = {
@ -1149,6 +1151,7 @@ module = {
module = { module = {
name = linux16; name = linux16;
i386_pc = loader/i386/pc/linux.c; i386_pc = loader/i386/pc/linux.c;
i386_pc = lib/cmdline.c;
enable = i386_pc; enable = i386_pc;
}; };
@ -1183,6 +1186,7 @@ module = {
mips = loader/mips/linux.c; mips = loader/mips/linux.c;
powerpc_ieee1275 = loader/powerpc/ieee1275/linux.c; powerpc_ieee1275 = loader/powerpc/ieee1275/linux.c;
sparc64_ieee1275 = loader/sparc64/ieee1275/linux.c; sparc64_ieee1275 = loader/sparc64/ieee1275/linux.c;
common = lib/cmdline.c;
enable = noemu; enable = noemu;
}; };
@ -1462,7 +1466,6 @@ module = {
name = ieee1275_fb; name = ieee1275_fb;
ieee1275 = video/ieee1275.c; ieee1275 = video/ieee1275.c;
enable = powerpc; enable = powerpc;
enable = sparc64;
}; };
module = { module = {

View file

@ -459,6 +459,8 @@ fd_probe_error_string: .asciz "Floppy"
1: 1:
/* perform read */ /* perform read */
movw $GRUB_BOOT_MACHINE_BUFFER_SEG, %bx movw $GRUB_BOOT_MACHINE_BUFFER_SEG, %bx
movw %bx, %es
xorw %bx, %bx
movw $0x201, %ax movw $0x201, %ax
movb $0, %ch movb $0, %ch
movb $0, %dh movb $0, %dh

View file

@ -178,8 +178,13 @@ real_code_2:
pushw %es pushw %es
popw %ds popw %ds
#if GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART + 4 < 0x200
movl $0x200, %ecx movl $0x200, %ecx
addl %ecx, %esi addl %ecx, %esi
#else
movl $(GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART + 4), %ecx
addl $0x200, %esi
#endif
movl $DATA_ADDR, %edi movl $DATA_ADDR, %edi
call LOCAL(move_memory) call LOCAL(move_memory)
@ -196,7 +201,11 @@ real_code_2:
1: 1:
movl %ss:(DATA_ADDR + GRUB_KERNEL_MACHINE_COMPRESSED_SIZE), %ecx movl %ss:(DATA_ADDR + GRUB_KERNEL_MACHINE_COMPRESSED_SIZE), %ecx
#if GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART + 4 < 0x200
addl $(GRUB_KERNEL_MACHINE_RAW_SIZE - 0x200), %ecx addl $(GRUB_KERNEL_MACHINE_RAW_SIZE - 0x200), %ecx
#else
addl $(GRUB_KERNEL_MACHINE_RAW_SIZE - (GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART + 4)), %ecx
#endif
2: 2:
call LOCAL(move_memory) call LOCAL(move_memory)

View file

@ -120,7 +120,7 @@ __start:
ori $t0, $zero, GRUB_SMBUS_SPD_MEMORY_TYPE_DDR2 ori $t0, $zero, GRUB_SMBUS_SPD_MEMORY_TYPE_DDR2
lui $a0, %hi(unimplemented_memory_type) lui $a0, %hi(unimplemented_memory_type)
bne $t0, $v0, fatal bne $t0, $v0, fatal
addiu $a0, $a0, %hi(unimplemented_memory_type) addiu $a0, $a0, %lo(unimplemented_memory_type)
/* And here is our goal: DDR2 controller initialisation. */ /* And here is our goal: DDR2 controller initialisation. */
lui $t0, %hi(GRUB_CPU_LOONGSON_CORECFG) lui $t0, %hi(GRUB_CPU_LOONGSON_CORECFG)

View file

@ -38,7 +38,7 @@ write_bases (void)
for (i = 0; i < GRUB_MACHINE_PCI_NUM_WIN; i++) for (i = 0; i < GRUB_MACHINE_PCI_NUM_WIN; i++)
reg |= (((base_win[i] >> GRUB_MACHINE_PCI_WIN_SHIFT) reg |= (((base_win[i] >> GRUB_MACHINE_PCI_WIN_SHIFT)
& GRUB_MACHINE_PCI_WIN_MASK) & GRUB_MACHINE_PCI_WIN_MASK)
>> (i * GRUB_MACHINE_PCI_WIN_MASK_SIZE)); << (i * GRUB_MACHINE_PCI_WIN_MASK_SIZE));
GRUB_MACHINE_PCI_IO_CTRL_REG = reg; GRUB_MACHINE_PCI_IO_CTRL_REG = reg;
} }

View file

@ -22,6 +22,10 @@
#include <grub/time.h> #include <grub/time.h>
#include <grub/ata.h> #include <grub/ata.h>
#include <grub/dl.h>
GRUB_MOD_LICENSE ("GPLv3+");
int int
grub_cs5536_find (grub_pci_device_t *devp) grub_cs5536_find (grub_pci_device_t *devp)
{ {

View file

@ -21,6 +21,8 @@
#include <grub/pci.h> #include <grub/pci.h>
#include <grub/mm.h> #include <grub/mm.h>
GRUB_MOD_LICENSE ("GPLv3+");
/* FIXME: correctly support 64-bit architectures. */ /* FIXME: correctly support 64-bit architectures. */
/* #if GRUB_TARGET_SIZEOF_VOID_P == 4 */ /* #if GRUB_TARGET_SIZEOF_VOID_P == 4 */
struct grub_pci_dma_chunk * struct grub_pci_dma_chunk *
@ -90,7 +92,14 @@ grub_pci_iterate (grub_pci_iteratefunc_t hook)
/* Check if there is a device present. */ /* Check if there is a device present. */
if (id >> 16 == 0xFFFF) if (id >> 16 == 0xFFFF)
continue; {
if (dev.function == 0)
/* Devices are required to implement function 0, so if
it's missing then there is no device here. */
break;
else
continue;
}
#ifdef GRUB_MACHINE_MIPS_YEELOONG #ifdef GRUB_MACHINE_MIPS_YEELOONG
/* Skip ghosts. */ /* Skip ghosts. */

View file

@ -24,6 +24,8 @@
#include <grub/usb.h> #include <grub/usb.h>
#include <grub/dl.h> #include <grub/dl.h>
GRUB_MOD_LICENSE ("GPLv3+");
static struct grub_usb_controller_dev usb_controller = static struct grub_usb_controller_dev usb_controller =
{ {

View file

@ -29,6 +29,8 @@
#include <grub/cs5536.h> #include <grub/cs5536.h>
#include <grub/loader.h> #include <grub/loader.h>
GRUB_MOD_LICENSE ("GPLv3+");
struct grub_ohci_hcca struct grub_ohci_hcca
{ {
/* Pointers to Interrupt Endpoint Descriptors. Not used by /* Pointers to Interrupt Endpoint Descriptors. Not used by

View file

@ -18,6 +18,9 @@
#include <grub/serial.h> #include <grub/serial.h>
#include <grub/usbserial.h> #include <grub/usbserial.h>
#include <grub/dl.h>
GRUB_MOD_LICENSE ("GPLv3+");
void void
grub_usbserial_fini (struct grub_serial_port *port) grub_usbserial_fini (struct grub_serial_port *port)

View file

@ -24,6 +24,8 @@
#include <grub/usb.h> #include <grub/usb.h>
#include <grub/usbserial.h> #include <grub/usbserial.h>
GRUB_MOD_LICENSE ("GPLv3+");
enum enum
{ {
GRUB_FTDI_MODEM_CTRL = 0x01, GRUB_FTDI_MODEM_CTRL = 0x01,

View file

@ -24,6 +24,8 @@
#include <grub/usb.h> #include <grub/usb.h>
#include <grub/usbserial.h> #include <grub/usbserial.h>
GRUB_MOD_LICENSE ("GPLv3+");
/* Convert speed to divisor. */ /* Convert speed to divisor. */
static grub_uint32_t static grub_uint32_t
is_speed_supported (unsigned int speed) is_speed_supported (unsigned int speed)

View file

@ -26,6 +26,8 @@
#include <grub/i386/io.h> #include <grub/i386/io.h>
#include <grub/time.h> #include <grub/time.h>
GRUB_MOD_LICENSE ("GPLv3+");
#define GRUB_UHCI_IOMASK (0x7FF << 5) #define GRUB_UHCI_IOMASK (0x7FF << 5)
#define N_QH 256 #define N_QH 256
@ -749,8 +751,7 @@ grub_uhci_detect_dev (grub_usb_controller_t dev, int port, int *changed)
else if (port == 1) else if (port == 1)
reg = GRUB_UHCI_REG_PORTSC2; reg = GRUB_UHCI_REG_PORTSC2;
else else
return grub_error (GRUB_ERR_OUT_OF_RANGE, return GRUB_USB_SPEED_NONE;
"UHCI Root Hub port does not exist");
status = grub_uhci_readreg16 (u, reg); status = grub_uhci_readreg16 (u, reg);

View file

@ -24,8 +24,10 @@
#include <grub/list.h> #include <grub/list.h>
#include <grub/term.h> #include <grub/term.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_usb_controller_dev_t grub_usb_list; static grub_usb_controller_dev_t grub_usb_list;
struct grub_usb_attach_desc *attach_hooks; static struct grub_usb_attach_desc *attach_hooks;
void void
grub_usb_controller_dev_register (grub_usb_controller_dev_t usb) grub_usb_controller_dev_register (grub_usb_controller_dev_t usb)

View file

@ -39,7 +39,7 @@ struct grub_usb_hub
grub_usb_device_t dev; grub_usb_device_t dev;
}; };
struct grub_usb_hub *hubs; static struct grub_usb_hub *hubs;
/* Add a device that currently has device number 0 and resides on /* Add a device that currently has device number 0 and resides on
CONTROLLER, the Hub reported that the device speed is SPEED. */ CONTROLLER, the Hub reported that the device speed is SPEED. */
@ -110,7 +110,7 @@ static grub_usb_err_t
grub_usb_add_hub (grub_usb_device_t dev) grub_usb_add_hub (grub_usb_device_t dev)
{ {
struct grub_usb_usb_hubdesc hubdesc; struct grub_usb_usb_hubdesc hubdesc;
grub_err_t err; grub_usb_err_t err;
int i; int i;
err = grub_usb_control_msg (dev, (GRUB_USB_REQTYPE_IN err = grub_usb_control_msg (dev, (GRUB_USB_REQTYPE_IN

View file

@ -97,7 +97,7 @@ grub_usb_control_msg (grub_usb_device_t dev,
if (! transfer) if (! transfer)
{ {
grub_dma_free (data_chunk); grub_dma_free (data_chunk);
return grub_errno; return GRUB_USB_ERR_INTERNAL;
} }
setupdata_chunk = grub_memalign_dma32 (32, sizeof (*setupdata)); setupdata_chunk = grub_memalign_dma32 (32, sizeof (*setupdata));
@ -105,7 +105,7 @@ grub_usb_control_msg (grub_usb_device_t dev,
{ {
grub_free (transfer); grub_free (transfer);
grub_dma_free (data_chunk); grub_dma_free (data_chunk);
return grub_errno; return GRUB_USB_ERR_INTERNAL;
} }
setupdata = grub_dma_get_virt (setupdata_chunk); setupdata = grub_dma_get_virt (setupdata_chunk);
@ -139,7 +139,7 @@ grub_usb_control_msg (grub_usb_device_t dev,
grub_free (transfer); grub_free (transfer);
grub_dma_free (setupdata_chunk); grub_dma_free (setupdata_chunk);
grub_dma_free (data_chunk); grub_dma_free (data_chunk);
return grub_errno; return GRUB_USB_ERR_INTERNAL;
} }
/* Build a Setup packet. XXX: Endianness. */ /* Build a Setup packet. XXX: Endianness. */

View file

@ -33,6 +33,8 @@
#include <grub/efi/api.h> #include <grub/efi/api.h>
#endif #endif
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] = { static const struct grub_arg_option options[] = {
{"exclude", 'x', 0, {"exclude", 'x', 0,
N_("Don't load host tables specified by comma-separated list."), N_("Don't load host tables specified by comma-separated list."),

View file

@ -36,6 +36,7 @@ typedef uint8_t grub_uint8_t;
#ifndef GRUB_DSDT_TEST #ifndef GRUB_DSDT_TEST
#include <grub/misc.h> #include <grub/misc.h>
#include <grub/time.h>
#include <grub/cpu/io.h> #include <grub/cpu/io.h>
#endif #endif
@ -324,6 +325,8 @@ grub_acpi_halt (void)
} }
} }
grub_millisleep (1500);
grub_printf ("ACPI shutdown failed\n"); grub_printf ("ACPI shutdown failed\n");
} }
#endif #endif

View file

@ -26,6 +26,8 @@
#include <grub/command.h> #include <grub/command.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t static grub_err_t
grub_cmd_blocklist (grub_command_t cmd __attribute__ ((unused)), grub_cmd_blocklist (grub_command_t cmd __attribute__ ((unused)),
int argc, char **args) int argc, char **args)

View file

@ -25,6 +25,8 @@
#include <grub/mm.h> #include <grub/mm.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t (*grub_loader_boot_func) (void); static grub_err_t (*grub_loader_boot_func) (void);
static grub_err_t (*grub_loader_unload_func) (void); static grub_err_t (*grub_loader_unload_func) (void);
static int grub_loader_noreturn; static int grub_loader_noreturn;

View file

@ -25,6 +25,8 @@
#include <grub/extcmd.h> #include <grub/extcmd.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] = static const struct grub_arg_option options[] =
{ {
{"dos", -1, 0, N_("Accept DOS-style CR/NL line endings."), 0, 0}, {"dos", -1, 0, N_("Accept DOS-style CR/NL line endings."), 0, 0},

View file

@ -24,6 +24,8 @@
#include <grub/command.h> #include <grub/command.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
#define BUFFER_SIZE 512 #define BUFFER_SIZE 512
static grub_err_t static grub_err_t

View file

@ -24,6 +24,8 @@
#include <grub/command.h> #include <grub/command.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t static grub_err_t
grub_cmd_source (grub_command_t cmd, int argc, char **args) grub_cmd_source (grub_command_t cmd, int argc, char **args)
{ {

View file

@ -24,6 +24,8 @@
#include <grub/command.h> #include <grub/command.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
#define GRUB_DATETIME_SET_YEAR 1 #define GRUB_DATETIME_SET_YEAR 1
#define GRUB_DATETIME_SET_MONTH 2 #define GRUB_DATETIME_SET_MONTH 2
#define GRUB_DATETIME_SET_DAY 4 #define GRUB_DATETIME_SET_DAY 4

View file

@ -23,6 +23,8 @@
#include <grub/i18n.h> #include <grub/i18n.h>
#include <grub/term.h> #include <grub/term.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] = static const struct grub_arg_option options[] =
{ {
{0, 'n', 0, N_("Do not output the trailing newline."), 0, 0}, {0, 'n', 0, N_("Do not output the trailing newline."), 0, 0},

View file

@ -24,6 +24,8 @@
#include <grub/command.h> #include <grub/command.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static struct grub_video_patch static struct grub_video_patch
{ {
const char *name; const char *name;

View file

@ -25,6 +25,8 @@
#include <grub/command.h> #include <grub/command.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_efi_guid_t acpi_guid = GRUB_EFI_ACPI_TABLE_GUID; static grub_efi_guid_t acpi_guid = GRUB_EFI_ACPI_TABLE_GUID;
static grub_efi_guid_t acpi2_guid = GRUB_EFI_ACPI_20_TABLE_GUID; static grub_efi_guid_t acpi2_guid = GRUB_EFI_ACPI_20_TABLE_GUID;
static grub_efi_guid_t smbios_guid = GRUB_EFI_SMBIOS_TABLE_GUID; static grub_efi_guid_t smbios_guid = GRUB_EFI_SMBIOS_TABLE_GUID;

View file

@ -23,6 +23,8 @@
#include <grub/efi/efi.h> #include <grub/efi/efi.h>
#include <grub/command.h> #include <grub/command.h>
GRUB_MOD_LICENSE ("GPLv3+");
#define ADD_MEMORY_DESCRIPTOR(desc, size) \ #define ADD_MEMORY_DESCRIPTOR(desc, size) \
((grub_efi_memory_descriptor_t *) ((char *) (desc) + (size))) ((grub_efi_memory_descriptor_t *) ((char *) (desc) + (size)))

View file

@ -18,12 +18,15 @@
*/ */
#include <grub/types.h> #include <grub/types.h>
#include <grub/mm.h> #include <grub/mm.h>
#include <grub/dl.h>
#include <grub/misc.h> #include <grub/misc.h>
#include <grub/normal.h> #include <grub/normal.h>
#include <grub/charset.h> #include <grub/charset.h>
#include <grub/efi/api.h> #include <grub/efi/api.h>
#include <grub/efi/efi.h> #include <grub/efi/efi.h>
GRUB_MOD_LICENSE ("GPLv3+");
struct guid_mapping struct guid_mapping
{ {
grub_efi_guid_t guid; grub_efi_guid_t guid;

View file

@ -23,6 +23,9 @@
#include <grub/charset.h> #include <grub/charset.h>
#include <grub/efi/api.h> #include <grub/efi/api.h>
#include <grub/efi/efi.h> #include <grub/efi/efi.h>
#include <grub/dl.h>
GRUB_MOD_LICENSE ("GPLv3+");
static void static void
disp_sal (void *table) disp_sal (void *table)

View file

@ -22,6 +22,9 @@
#include <grub/misc.h> #include <grub/misc.h>
#include <grub/extcmd.h> #include <grub/extcmd.h>
#include <grub/script_sh.h> #include <grub/script_sh.h>
#include <grub/dl.h>
GRUB_MOD_LICENSE ("GPLv3+");
grub_err_t grub_err_t
grub_extcmd_dispatcher (struct grub_command *cmd, int argc, char **args, grub_extcmd_dispatcher (struct grub_command *cmd, int argc, char **args,

View file

@ -29,6 +29,8 @@
#include <grub/fs.h> #include <grub/fs.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
/* Convert a LBA address to a CHS address in the INT 13 format. */ /* Convert a LBA address to a CHS address in the INT 13 format. */
/* Taken from grub1. */ /* Taken from grub1. */
/* XXX: use hardcoded geometry of C = 1024, H = 255, S = 63. /* XXX: use hardcoded geometry of C = 1024, H = 255, S = 63.

View file

@ -22,6 +22,8 @@
#include <grub/misc.h> #include <grub/misc.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t static grub_err_t
grub_cmd_halt (grub_command_t cmd __attribute__ ((unused)), grub_cmd_halt (grub_command_t cmd __attribute__ ((unused)),
int argc __attribute__ ((unused)), int argc __attribute__ ((unused)),

View file

@ -26,6 +26,8 @@
#include <grub/normal.h> #include <grub/normal.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] = { static const struct grub_arg_option options[] = {
{"hash", 'h', 0, N_("Specify hash to use."), N_("HASH"), ARG_TYPE_STRING}, {"hash", 'h', 0, N_("Specify hash to use."), N_("HASH"), ARG_TYPE_STRING},
{"check", 'c', 0, N_("Check hash list file."), N_("FILE"), ARG_TYPE_STRING}, {"check", 'c', 0, N_("Check hash list file."), N_("FILE"), ARG_TYPE_STRING},
@ -36,7 +38,7 @@ static const struct grub_arg_option options[] = {
{0, 0, 0, 0, 0, 0} {0, 0, 0, 0, 0, 0}
}; };
struct { const char *name; const char *hashname; } aliases[] = static struct { const char *name; const char *hashname; } aliases[] =
{ {
{"sha256sum", "sha256"}, {"sha256sum", "sha256"},
{"sha512sum", "sha512"}, {"sha512sum", "sha512"},

View file

@ -26,6 +26,8 @@
#include <grub/extcmd.h> #include <grub/extcmd.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] = { static const struct grub_arg_option options[] = {
{"apm", 'B', 0, N_("Set Advanced Power Management\n" {"apm", 'B', 0, N_("Set Advanced Power Management\n"
"(1=low, ..., 254=high, 255=off)."), "(1=low, ..., 254=high, 255=off)."),

View file

@ -26,6 +26,8 @@
#include <grub/normal.h> #include <grub/normal.h>
#include <grub/charset.h> #include <grub/charset.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t static grub_err_t
grub_cmd_help (grub_extcmd_context_t ctxt __attribute__ ((unused)), int argc, grub_cmd_help (grub_extcmd_context_t ctxt __attribute__ ((unused)), int argc,
char **args) char **args)

View file

@ -25,6 +25,8 @@
#include <grub/extcmd.h> #include <grub/extcmd.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] = { static const struct grub_arg_option options[] = {
{"skip", 's', 0, N_("Skip offset bytes from the beginning of file."), 0, {"skip", 's', 0, N_("Skip offset bytes from the beginning of file."), 0,
ARG_TYPE_INT}, ARG_TYPE_INT},

View file

@ -21,6 +21,8 @@
#include <grub/misc.h> #include <grub/misc.h>
#include <grub/cmos.h> #include <grub/cmos.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t static grub_err_t
parse_args (int argc, char *argv[], int *byte, int *bit) parse_args (int argc, char *argv[], int *byte, int *bit)
{ {

View file

@ -27,6 +27,8 @@
#include <grub/i386/cpuid.h> #include <grub/i386/cpuid.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
#define cpuid(num,a,b,c,d) \ #define cpuid(num,a,b,c,d) \
asm volatile ("xchgl %%ebx, %1; cpuid; xchgl %%ebx, %1" \ asm volatile ("xchgl %%ebx, %1; cpuid; xchgl %%ebx, %1" \
: "=a" (a), "=r" (b), "=c" (c), "=d" (d) \ : "=a" (a), "=r" (b), "=c" (c), "=d" (d) \

View file

@ -29,6 +29,7 @@
#include <grub/memory.h> #include <grub/memory.h>
#include <grub/machine/memory.h> #include <grub/machine/memory.h>
GRUB_MOD_LICENSE ("GPLv3+");
/* Real mode IVT slot (seg:off far pointer) for interrupt 0x13. */ /* Real mode IVT slot (seg:off far pointer) for interrupt 0x13. */
static grub_uint32_t *const int13slot = UINT_TO_PTR (4 * 0x13); static grub_uint32_t *const int13slot = UINT_TO_PTR (4 * 0x13);

View file

@ -24,6 +24,8 @@
#include <grub/machine/int.h> #include <grub/machine/int.h>
#include <grub/acpi.h> #include <grub/acpi.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] = static const struct grub_arg_option options[] =
{ {
{"no-apm", 'n', 0, N_("Do not use APM to halt the computer."), 0, 0}, {"no-apm", 'n', 0, N_("Do not use APM to halt the computer."), 0, 0},

View file

@ -22,6 +22,8 @@
#include <grub/command.h> #include <grub/command.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
int int
grub_apm_get_info (struct grub_apm_info *info) grub_apm_get_info (struct grub_apm_info *info)
{ {

View file

@ -29,6 +29,8 @@
#include <grub/command.h> #include <grub/command.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
#define BASE_TEMPO (60 * GRUB_TICKS_PER_SECOND) #define BASE_TEMPO (60 * GRUB_TICKS_PER_SECOND)
/* The speaker port. */ /* The speaker port. */

View file

@ -24,6 +24,8 @@
#include <grub/command.h> #include <grub/command.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t static grub_err_t
grub_cmd_pxe_unload (grub_command_t cmd __attribute__ ((unused)), grub_cmd_pxe_unload (grub_command_t cmd __attribute__ ((unused)),
int argc __attribute__ ((unused)), int argc __attribute__ ((unused)),

View file

@ -27,6 +27,8 @@
#include <grub/cpu/io.h> #include <grub/cpu/io.h>
#include <grub/loader.h> #include <grub/loader.h>
GRUB_MOD_LICENSE ("GPLv2+");
static char sendkey[0x20]; static char sendkey[0x20];
/* Length of sendkey. */ /* Length of sendkey. */
static int keylen = 0; static int keylen = 0;

View file

@ -24,6 +24,8 @@
#include <grub/command.h> #include <grub/command.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t static grub_err_t
grub_cmd_suspend (grub_command_t cmd __attribute__ ((unused)), grub_cmd_suspend (grub_command_t cmd __attribute__ ((unused)),
int argc __attribute__ ((unused)), int argc __attribute__ ((unused)),

View file

@ -24,6 +24,8 @@
#include <grub/cpu/io.h> #include <grub/cpu/io.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_extcmd_t cmd_read_byte, cmd_read_word, cmd_read_dword; static grub_extcmd_t cmd_read_byte, cmd_read_word, cmd_read_dword;
static grub_command_t cmd_write_byte, cmd_write_word, cmd_write_dword; static grub_command_t cmd_write_byte, cmd_write_word, cmd_write_dword;

View file

@ -28,6 +28,8 @@
#include <grub/i18n.h> #include <grub/i18n.h>
#include <grub/file.h> #include <grub/file.h>
GRUB_MOD_LICENSE ("GPLv3+");
static struct grub_keyboard_layout layout_us = { static struct grub_keyboard_layout layout_us = {
.keyboard_map = { .keyboard_map = {
/* Keyboard errors. Handled by driver. */ /* Keyboard errors. Handled by driver. */

View file

@ -23,6 +23,8 @@
#include <grub/term.h> #include <grub/term.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] = static const struct grub_arg_option options[] =
{ {
{"shift", 's', 0, N_("Check Shift key."), 0, 0}, {"shift", 's', 0, N_("Check Shift key."), 0, 0},

View file

@ -33,6 +33,8 @@
#include <grub/disk.h> #include <grub/disk.h>
#include <grub/partition.h> #include <grub/partition.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t static grub_err_t
legacy_file (const char *filename) legacy_file (const char *filename)
{ {
@ -83,9 +85,13 @@ legacy_file (const char *filename)
{ {
char *oldname = NULL; char *oldname = NULL;
char *newsuffix; char *newsuffix;
char *ptr;
for (ptr = buf; *ptr && grub_isspace (*ptr); ptr++);
oldname = entryname; oldname = entryname;
parsed = grub_legacy_parse (buf, &entryname, &newsuffix); parsed = grub_legacy_parse (ptr, &entryname, &newsuffix);
grub_free (buf);
buf = NULL; buf = NULL;
if (newsuffix) if (newsuffix)
{ {
@ -209,7 +215,7 @@ grub_cmd_legacy_source (struct grub_command *cmd,
grub_menu_t menu; grub_menu_t menu;
menu = grub_env_get_menu (); menu = grub_env_get_menu ();
if (menu && menu->size) if (menu && menu->size)
grub_show_menu (menu, 1); grub_show_menu (menu, 1, 0);
if (!extractor) if (!extractor)
grub_env_context_close (); grub_env_context_close ();
} }
@ -765,12 +771,12 @@ GRUB_MOD_INIT(legacycfg)
= grub_register_command ("extract_legacy_entries_source", = grub_register_command ("extract_legacy_entries_source",
grub_cmd_legacy_source, grub_cmd_legacy_source,
N_("FILE"), N_("FILE"),
N_("Parse legacy config in same context taking onl entries")); N_("Parse legacy config in same context taking only menu entries"));
cmd_configfile_extract cmd_configfile_extract
= grub_register_command ("extract_legacy_entries_configfile", = grub_register_command ("extract_legacy_entries_configfile",
grub_cmd_legacy_source, grub_cmd_legacy_source,
N_("FILE"), N_("FILE"),
N_("Parse legacy config in new context taking onl entries")); N_("Parse legacy config in new context taking only menu entries"));
cmd_kernel = grub_register_command ("legacy_kernel", cmd_kernel = grub_register_command ("legacy_kernel",
grub_cmd_legacy_kernel, grub_cmd_legacy_kernel,

View file

@ -28,6 +28,8 @@
#include <grub/extcmd.h> #include <grub/extcmd.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] = static const struct grub_arg_option options[] =
{ {
{"file", 'f', 0, N_("Specify filename."), 0, ARG_TYPE_PATHNAME}, {"file", 'f', 0, N_("Specify filename."), 0, ARG_TYPE_PATHNAME},

View file

@ -32,6 +32,8 @@
#include <grub/datetime.h> #include <grub/datetime.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] = static const struct grub_arg_option options[] =
{ {
{"long", 'l', 0, N_("Show a long list with more detailed information."), 0, 0}, {"long", 'l', 0, N_("Show a long list with more detailed information."), 0, 0},

View file

@ -25,6 +25,8 @@
#include <grub/i18n.h> #include <grub/i18n.h>
#include <grub/dl.h> #include <grub/dl.h>
GRUB_MOD_LICENSE ("GPLv3+");
static void static void
print_strn (grub_uint8_t *str, grub_size_t len) print_strn (grub_uint8_t *str, grub_size_t len)
{ {

View file

@ -22,6 +22,8 @@
#include <grub/i18n.h> #include <grub/i18n.h>
#include <grub/memory.h> #include <grub/memory.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const char *names[] = static const char *names[] =
{ {
[GRUB_MEMORY_AVAILABLE] = "available", [GRUB_MEMORY_AVAILABLE] = "available",

View file

@ -23,6 +23,8 @@
#include <grub/extcmd.h> #include <grub/extcmd.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
struct grub_pci_classname struct grub_pci_classname
{ {
int class; int class;

View file

@ -23,6 +23,8 @@
#include <grub/env.h> #include <grub/env.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_extcmd_t cmd_read_byte, cmd_read_word, cmd_read_dword; static grub_extcmd_t cmd_read_byte, cmd_read_word, cmd_read_dword;
static grub_command_t cmd_write_byte, cmd_write_word, cmd_write_dword; static grub_command_t cmd_write_byte, cmd_write_word, cmd_write_dword;

View file

@ -29,6 +29,8 @@
#include <grub/command.h> #include <grub/command.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
/* cat FILE */ /* cat FILE */
static grub_err_t static grub_err_t
grub_mini_cmd_cat (struct grub_command *cmd __attribute__ ((unused)), grub_mini_cmd_cat (struct grub_command *cmd __attribute__ ((unused)),

View file

@ -24,6 +24,8 @@
#include <grub/command.h> #include <grub/command.h>
#include <grub/cs5536.h> #include <grub/cs5536.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t static grub_err_t
grub_cmd_lsspd (grub_command_t cmd __attribute__ ((unused)), grub_cmd_lsspd (grub_command_t cmd __attribute__ ((unused)),
int argc __attribute__ ((unused)), int argc __attribute__ ((unused)),

View file

@ -31,6 +31,8 @@
#include <grub/command.h> #include <grub/command.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv2+");
static struct grub_parttool *parts = 0; static struct grub_parttool *parts = 0;
static int curhandle = 0; static int curhandle = 0;
static grub_dl_t mymod; static grub_dl_t mymod;

View file

@ -26,6 +26,8 @@
#include <grub/dl.h> #include <grub/dl.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_dl_t my_mod; static grub_dl_t my_mod;
static grub_err_t static grub_err_t

View file

@ -26,6 +26,8 @@
#include <grub/dl.h> #include <grub/dl.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_dl_t my_mod; static grub_dl_t my_mod;
struct pbkdf2_password struct pbkdf2_password

View file

@ -32,9 +32,11 @@
#include <grub/extcmd.h> #include <grub/extcmd.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] = static const struct grub_arg_option options[] =
{ {
{"set", 's', GRUB_ARG_OPTION_OPTIONAL, {"set", 's', 0,
N_("Set a variable to return value."), "VAR", ARG_TYPE_STRING}, N_("Set a variable to return value."), "VAR", ARG_TYPE_STRING},
{"driver", 'd', 0, N_("Determine driver."), 0, 0}, {"driver", 'd', 0, N_("Determine driver."), 0, 0},
{"partmap", 'p', 0, N_("Determine partition map type."), 0, 0}, {"partmap", 'p', 0, N_("Determine partition map type."), 0, 0},
@ -150,7 +152,7 @@ static grub_extcmd_t cmd;
GRUB_MOD_INIT (probe) GRUB_MOD_INIT (probe)
{ {
cmd = grub_register_extcmd ("probe", grub_cmd_probe, 0, N_("[DEVICE]"), cmd = grub_register_extcmd ("probe", grub_cmd_probe, 0, N_("DEVICE"),
N_("Retrieve device info."), options); N_("Retrieve device info."), options);
} }

View file

@ -26,6 +26,8 @@
#include <grub/command.h> #include <grub/command.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static char * static char *
grub_getline (void) grub_getline (void)
{ {

View file

@ -22,6 +22,8 @@
#include <grub/misc.h> #include <grub/misc.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t static grub_err_t
grub_cmd_reboot (grub_command_t cmd __attribute__ ((unused)), grub_cmd_reboot (grub_command_t cmd __attribute__ ((unused)),
int argc __attribute__ ((unused)), int argc __attribute__ ((unused)),

View file

@ -27,6 +27,8 @@
#include <grub/script_sh.h> #include <grub/script_sh.h>
#include <regex.h> #include <regex.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] = static const struct grub_arg_option options[] =
{ {
{ "set", 's', GRUB_ARG_OPTION_REPEATABLE, { "set", 's', GRUB_ARG_OPTION_REPEATABLE,

View file

@ -31,6 +31,8 @@
#include <grub/disk.h> #include <grub/disk.h>
#include <grub/partition.h> #include <grub/partition.h>
GRUB_MOD_LICENSE ("GPLv3+");
void void
FUNC_NAME (const char *key, const char *var, int no_floppy, FUNC_NAME (const char *key, const char *var, int no_floppy,
char **hints, unsigned nhints) char **hints, unsigned nhints)

View file

@ -27,6 +27,8 @@
#include <grub/search.h> #include <grub/search.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] = static const struct grub_arg_option options[] =
{ {
{"file", 'f', 0, N_("Search devices by a file."), 0, 0}, {"file", 'f', 0, N_("Search devices by a file."), 0, 0},

View file

@ -25,6 +25,8 @@
#include <grub/mm.h> #include <grub/mm.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
struct pci_register struct pci_register
{ {
const char *name; const char *name;
@ -32,7 +34,7 @@ struct pci_register
unsigned size; unsigned size;
}; };
struct pci_register pci_registers[] = static struct pci_register pci_registers[] =
{ {
{"VENDOR_ID", GRUB_PCI_REG_VENDOR , 2}, {"VENDOR_ID", GRUB_PCI_REG_VENDOR , 2},
{"DEVICE_ID", GRUB_PCI_REG_DEVICE , 2}, {"DEVICE_ID", GRUB_PCI_REG_DEVICE , 2},

View file

@ -25,6 +25,8 @@
#include <grub/extcmd.h> #include <grub/extcmd.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] = static const struct grub_arg_option options[] =
{ {
{"verbose", 'v', 0, N_("Verbose countdown."), 0, 0}, {"verbose", 'v', 0, N_("Verbose countdown."), 0, 0},

View file

@ -23,6 +23,8 @@
#include <grub/i18n.h> #include <grub/i18n.h>
#include <grub/misc.h> #include <grub/misc.h>
GRUB_MOD_LICENSE ("GPLv3+");
struct grub_term_autoload *grub_term_input_autoload = NULL; struct grub_term_autoload *grub_term_input_autoload = NULL;
struct grub_term_autoload *grub_term_output_autoload = NULL; struct grub_term_autoload *grub_term_output_autoload = NULL;
@ -210,11 +212,11 @@ grub_cmd_terminal_input (grub_command_t cmd __attribute__ ((unused)),
(void) GRUB_FIELD_MATCH (grub_term_inputs, struct abstract_terminal *, init); (void) GRUB_FIELD_MATCH (grub_term_inputs, struct abstract_terminal *, init);
(void) GRUB_FIELD_MATCH (grub_term_inputs, struct abstract_terminal *, fini); (void) GRUB_FIELD_MATCH (grub_term_inputs, struct abstract_terminal *, fini);
return handle_command (argc, args, return handle_command (argc, args,
(struct abstract_terminal **) &grub_term_inputs, (struct abstract_terminal **) (void *) &grub_term_inputs,
(struct abstract_terminal **) &grub_term_inputs_disabled, (struct abstract_terminal **) (void *) &grub_term_inputs_disabled,
grub_term_input_autoload, grub_term_input_autoload,
N_ ("Active input terminals:"), N_ ("Active input terminals:"),
N_ ("Available input terminals:")); N_ ("Available input terminals:"));
} }
static grub_err_t static grub_err_t
@ -225,11 +227,12 @@ grub_cmd_terminal_output (grub_command_t cmd __attribute__ ((unused)),
(void) GRUB_FIELD_MATCH (grub_term_outputs, struct abstract_terminal *, name); (void) GRUB_FIELD_MATCH (grub_term_outputs, struct abstract_terminal *, name);
(void) GRUB_FIELD_MATCH (grub_term_outputs, struct abstract_terminal *, init); (void) GRUB_FIELD_MATCH (grub_term_outputs, struct abstract_terminal *, init);
(void) GRUB_FIELD_MATCH (grub_term_outputs, struct abstract_terminal *, fini); (void) GRUB_FIELD_MATCH (grub_term_outputs, struct abstract_terminal *, fini);
return handle_command (argc, args, (struct abstract_terminal **) &grub_term_outputs, return handle_command (argc, args,
(struct abstract_terminal **) &grub_term_outputs_disabled, (struct abstract_terminal **) (void *) &grub_term_outputs,
grub_term_output_autoload, (struct abstract_terminal **) (void *) &grub_term_outputs_disabled,
N_ ("Active output terminals:"), grub_term_output_autoload,
N_ ("Available output terminals:")); N_ ("Active output terminals:"),
N_ ("Available output terminals:"));
} }
static grub_command_t cmd_terminal_input, cmd_terminal_output; static grub_command_t cmd_terminal_input, cmd_terminal_output;

View file

@ -27,6 +27,8 @@
#include <grub/command.h> #include <grub/command.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
/* A simple implementation for signed numbers. */ /* A simple implementation for signed numbers. */
static int static int
grub_strtosl (char *arg, char **end, int base) grub_strtosl (char *arg, char **end, int base)

View file

@ -29,6 +29,8 @@
#include <grub/command.h> #include <grub/command.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t static grub_err_t
grub_cmd_testload (struct grub_command *cmd __attribute__ ((unused)), grub_cmd_testload (struct grub_command *cmd __attribute__ ((unused)),
int argc, char *argv[]) int argc, char *argv[])

View file

@ -21,6 +21,8 @@
#include <grub/command.h> #include <grub/command.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t static grub_err_t
grub_cmd_true (struct grub_command *cmd __attribute__ ((unused)), grub_cmd_true (struct grub_command *cmd __attribute__ ((unused)),
int argc __attribute__ ((unused)), int argc __attribute__ ((unused)),

View file

@ -27,6 +27,8 @@
#include <grub/command.h> #include <grub/command.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const char *usb_classes[] = static const char *usb_classes[] =
{ {
"Unknown", "Unknown",

View file

@ -25,6 +25,8 @@
#include <grub/command.h> #include <grub/command.h>
#include <grub/i18n.h> #include <grub/i18n.h>
GRUB_MOD_LICENSE ("GPLv3+");
static unsigned height, width, depth; static unsigned height, width, depth;
static int static int

View file

@ -28,6 +28,8 @@
#include <grub/gfxmenu_view.h> #include <grub/gfxmenu_view.h>
#include <grub/env.h> #include <grub/env.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t static grub_err_t
grub_cmd_videotest (grub_command_t cmd __attribute__ ((unused)), grub_cmd_videotest (grub_command_t cmd __attribute__ ((unused)),
int argc, char **args) int argc, char **args)

View file

@ -34,6 +34,8 @@
#include <grub/i18n.h> #include <grub/i18n.h>
#include <grub/crypto.h> #include <grub/crypto.h>
GRUB_MOD_LICENSE ("GPLv3+");
/* This prefix is used by xnu and boot-132 to hash /* This prefix is used by xnu and boot-132 to hash
together with volume serial. */ together with volume serial. */
static grub_uint8_t hash_prefix[16] static grub_uint8_t hash_prefix[16]

View file

@ -26,6 +26,8 @@
#include <grub/scsi.h> #include <grub/scsi.h>
#include <grub/cs5536.h> #include <grub/cs5536.h>
GRUB_MOD_LICENSE ("GPLv3+");
/* At the moment, only two IDE ports are supported. */ /* At the moment, only two IDE ports are supported. */
static const grub_port_t grub_ata_ioaddress[] = { GRUB_ATA_CH0_PORT1, static const grub_port_t grub_ata_ioaddress[] = { GRUB_ATA_CH0_PORT1,
GRUB_ATA_CH1_PORT1 }; GRUB_ATA_CH1_PORT1 };

View file

@ -22,6 +22,7 @@
#include <grub/dl.h> #include <grub/dl.h>
#include <grub/mm.h> #include <grub/mm.h>
GRUB_MOD_LICENSE ("GPLv3+");
/* ATA pass through support, used by hdparm.mod. */ /* ATA pass through support, used by hdparm.mod. */
static grub_err_t static grub_err_t

View file

@ -24,6 +24,8 @@
#include <grub/misc.h> #include <grub/misc.h>
#include <grub/raid.h> #include <grub/raid.h>
GRUB_MOD_LICENSE ("GPLv3+");
#define NV_SIGNATURES 4 #define NV_SIGNATURES 4
#define NV_IDLE 0 #define NV_IDLE 0

View file

@ -28,6 +28,8 @@
#include <grub/err.h> #include <grub/err.h>
#include <grub/term.h> #include <grub/term.h>
GRUB_MOD_LICENSE ("GPLv3+");
static int cd_drive = 0; static int cd_drive = 0;
static int grub_biosdisk_rw_int13_extensions (int ah, int drive, void *dap); static int grub_biosdisk_rw_int13_extensions (int ah, int drive, void *dap);
@ -624,6 +626,11 @@ GRUB_MOD_INIT(biosdisk)
((cdrp->media_type & GRUB_BIOSDISK_CDTYPE_MASK) ((cdrp->media_type & GRUB_BIOSDISK_CDTYPE_MASK)
== GRUB_BIOSDISK_CDTYPE_NO_EMUL)) == GRUB_BIOSDISK_CDTYPE_NO_EMUL))
cd_drive = cdrp->drive_no; cd_drive = cdrp->drive_no;
/* Since diskboot.S rejects devices over 0x90 it must be a CD booted with
cdboot.S
*/
if (grub_boot_drive >= 0x90)
cd_drive = grub_boot_drive;
grub_disk_dev_register (&grub_biosdisk_dev); grub_disk_dev_register (&grub_biosdisk_dev);
} }

View file

@ -23,6 +23,8 @@
#include <grub/dl.h> #include <grub/dl.h>
#include <grub/ieee1275/ieee1275.h> #include <grub/ieee1275/ieee1275.h>
GRUB_MOD_LICENSE ("GPLv3+");
struct grub_nand_data struct grub_nand_data
{ {
grub_ieee1275_ihandle_t handle; grub_ieee1275_ihandle_t handle;

Some files were not shown because too many files have changed in this diff Show more