merge trunk

This commit is contained in:
Colin Watson committed 2011-04-21 10:36:09 +01:00
commit 2e0fbe00d2
319 files changed
+11843 -1294

No files matched your search

+3 -1
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
@@ -131,5 +130,8 @@ grub-core/gnulib/unistd.h
grub-core/gnulib/warn-on-use.h grub-core/gnulib/warn-on-use.h
grub-core/gnulib/wchar.h grub-core/gnulib/wchar.h
grub-core/gnulib/wctype.h grub-core/gnulib/wctype.h
grub-core/rs_decoder.S
widthspec.bin widthspec.bin
widthspec.h widthspec.h
docs/stamp-1
docs/version-dev.texi
+7
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.
+1751
View File
File diff suppressed because it is too large. Load diff
+5 -5
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 $@
+18 -14
View File
@@ -71,6 +71,10 @@ library = {
common = grub-core/fs/ufs2.c; common = grub-core/fs/ufs2.c;
common = grub-core/fs/ufs.c; common = grub-core/fs/ufs.c;
common = grub-core/fs/xfs.c; common = grub-core/fs/xfs.c;
common = grub-core/fs/zfs/zfs.c;
common = grub-core/fs/zfs/zfs_lzjb.c;
common = grub-core/fs/zfs/zfs_sha256.c;
common = grub-core/fs/zfs/zfs_fletcher.c;
common = grub-core/lib/arg.c; common = grub-core/lib/arg.c;
common = grub-core/lib/crypto.c; common = grub-core/lib/crypto.c;
common = grub-core/lib/envblk.c; common = grub-core/lib/envblk.c;
@@ -121,7 +125,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)\"';
}; };
@@ -134,7 +138,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 = {
@@ -146,7 +150,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 = {
@@ -158,7 +162,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 = {
@@ -170,7 +174,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)';
}; };
@@ -208,7 +212,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 = {
@@ -223,7 +227,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;
}; };
@@ -242,7 +246,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 = {
@@ -254,7 +258,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 = {
@@ -271,7 +275,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;
@@ -286,7 +290,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;
}; };
@@ -300,7 +304,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 = {
@@ -610,7 +614,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 = {
@@ -623,5 +627,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)';
}; };
+2 -8
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
@@ -51,9 +51,7 @@ New in 1.99:
* Add `sendkey' command (i386-pc only). * Add `sendkey' command (i386-pc only).
* ZFS support in `grub-install' and `grub-mkconfig'. Note: complete * ZFS support.
functionality requires external ZFS implementation (available from
grub-extras).
* Support 1.x versions of mdadm metadata. * Support 1.x versions of mdadm metadata.
@@ -85,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.
+4
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..."
+8
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
-6
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 = . ;
} }
+4
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
+19 -6
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.
if test -z "$target_alias"; then
case "$target_cpu"-"$platform" in case "$target_cpu"-"$platform" in
x86_64-efi) ;; x86_64-efi) ;;
x86_64-emu) ;; x86_64-emu) ;;
x86_64-*) target_cpu=i386 ;; x86_64-*) target_cpu=i386 ;;
powerpc64-ieee1275) target_cpu=powerpc ;; powerpc64-ieee1275) target_cpu=powerpc ;;
esac 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
+1 -1
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
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

+1
View File
@@ -0,0 +1 @@
Please fill this in.
+1533
View File
File diff suppressed because it is too large. Load diff
+817 -204
View File
File diff suppressed because it is too large. Load diff
+2 -2
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)
+18 -3
View File
@@ -200,7 +200,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;
}; };
@@ -212,7 +212,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;
}; };
@@ -324,6 +324,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;
}; };
@@ -1013,6 +1014,19 @@ module = {
common = fs/xfs.c; common = fs/xfs.c;
}; };
module = {
name = zfs;
common = fs/zfs/zfs.c;
common = fs/zfs/zfs_lzjb.c;
common = fs/zfs/zfs_sha256.c;
common = fs/zfs/zfs_fletcher.c;
};
module = {
name = zfsinfo;
common = fs/zfs/zfsinfo.c;
};
module = { module = {
name = pxe; name = pxe;
i386_pc = fs/i386/pc/pxe.c; i386_pc = fs/i386/pc/pxe.c;
@@ -1142,6 +1156,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;
}; };
@@ -1176,6 +1191,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;
}; };
@@ -1454,7 +1470,6 @@ module = {
name = ieee1275_fb; name = ieee1275_fb;
ieee1275 = video/ieee1275.c; ieee1275 = video/ieee1275.c;
enable = powerpc; enable = powerpc;
enable = sparc64;
}; };
module = { module = {
+2
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
+9
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)
+1 -1
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)
+1 -1
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;
} }
+4
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)
{ {
+9
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)
{
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; continue;
}
#ifdef GRUB_MACHINE_MIPS_YEELOONG #ifdef GRUB_MACHINE_MIPS_YEELOONG
/* Skip ghosts. */ /* Skip ghosts. */
+2
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 =
{ {
+2
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
+3
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)
+2
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,
+2
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)
+3 -2
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);
+3 -1
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)
+2 -2
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
+3 -3
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. */
+2
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."),
+3
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
+2
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)
+2
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;
+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[] =
{ {
{"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},
+2
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
+2
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)
{ {
+2
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
+24 -9
View File
@@ -1,7 +1,7 @@
/* echo.c - Command to display a line of text */ /* echo.c - Command to display a line of text */
/* /*
* GRUB -- GRand Unified Bootloader * GRUB -- GRand Unified Bootloader
* Copyright (C) 2006,2007 Free Software Foundation, Inc. * Copyright (C) 2006,2007,2010 Free Software Foundation, Inc.
* *
* GRUB is free software: you can redistribute it and/or modify * GRUB is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -21,6 +21,9 @@
#include <grub/misc.h> #include <grub/misc.h>
#include <grub/extcmd.h> #include <grub/extcmd.h>
#include <grub/i18n.h> #include <grub/i18n.h>
#include <grub/term.h>
GRUB_MOD_LICENSE ("GPLv3+");
static const struct grub_arg_option options[] = static const struct grub_arg_option options[] =
{ {
@@ -43,8 +46,14 @@ grub_cmd_echo (grub_extcmd_context_t ctxt, int argc, char **args)
for (i = 0; i < argc; i++) for (i = 0; i < argc; i++)
{ {
char *arg = *args; char *arg = *args;
/* Unescaping results in a string no longer than the original. */
char *unescaped = grub_malloc (grub_strlen (arg) + 1);
char *p = unescaped;
args++; args++;
if (!unescaped)
return grub_errno;
while (*arg) while (*arg)
{ {
/* In case `-e' is used, parse backslashes. */ /* In case `-e' is used, parse backslashes. */
@@ -57,11 +66,11 @@ grub_cmd_echo (grub_extcmd_context_t ctxt, int argc, char **args)
switch (*arg) switch (*arg)
{ {
case '\\': case '\\':
grub_printf ("\\"); *p++ = '\\';
break; break;
case 'a': case 'a':
grub_printf ("\a"); *p++ = '\a';
break; break;
case 'c': case 'c':
@@ -69,23 +78,23 @@ grub_cmd_echo (grub_extcmd_context_t ctxt, int argc, char **args)
break; break;
case 'f': case 'f':
grub_printf ("\f"); *p++ = '\f';
break; break;
case 'n': case 'n':
grub_printf ("\n"); *p++ = '\n';
break; break;
case 'r': case 'r':
grub_printf ("\r"); *p++ = '\r';
break; break;
case 't': case 't':
grub_printf ("\t"); *p++ = '\t';
break; break;
case 'v': case 'v':
grub_printf ("\v"); *p++ = '\v';
break; break;
} }
arg++; arg++;
@@ -94,10 +103,14 @@ grub_cmd_echo (grub_extcmd_context_t ctxt, int argc, char **args)
/* This was not an escaped character, or escaping is not /* This was not an escaped character, or escaping is not
enabled. */ enabled. */
grub_printf ("%c", *arg); *p++ = *arg;
arg++; arg++;
} }
*p = '\0';
grub_xputs (unescaped);
grub_free (unescaped);
/* If another argument follows, insert a space. */ /* If another argument follows, insert a space. */
if (i != argc - 1) if (i != argc - 1)
grub_printf (" " ); grub_printf (" " );
@@ -106,6 +119,8 @@ grub_cmd_echo (grub_extcmd_context_t ctxt, int argc, char **args)
if (newline) if (newline)
grub_printf ("\n"); grub_printf ("\n");
grub_refresh ();
return 0; return 0;
} }
+2
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;
+2
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;
+2
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)))
+3
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;
+3
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)
+3
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,
+2
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.
+2
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)),
+3 -1
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"},
+2
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)."),
+2
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)
+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[] = {
{"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},
+2
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)
{ {
+2
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) \
+1
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);
+2
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},
+2
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)
{ {
+2
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. */
+2
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)),
+2
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;
+2
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)),
+2
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;
+2
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. */
+2
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},
+10 -4
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,
+2
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},
+2
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},
+2
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)
{ {
+2
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",
+2
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;
+2
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;
+2
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)),
+2
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)),
+2
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;
+2
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
+2
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
+4 -2
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);
} }
+2
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)
{ {
+2
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)),
+2 -1
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,
@@ -87,7 +89,6 @@ set_matches (char **varnames, char *str, grub_size_t nmatches,
static grub_err_t static grub_err_t
grub_cmd_regexp (grub_extcmd_context_t ctxt, int argc, char **args) grub_cmd_regexp (grub_extcmd_context_t ctxt, int argc, char **args)
{ {
int argn = 0;
regex_t regex; regex_t regex;
int ret; int ret;
grub_size_t s; grub_size_t s;
+2
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)
+2
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},
+3 -1
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},
+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},
+7 -4
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,8 +212,8 @@ 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:"));
@@ -225,8 +227,9 @@ 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,
(struct abstract_terminal **) (void *) &grub_term_outputs_disabled,
grub_term_output_autoload, grub_term_output_autoload,
N_ ("Active output terminals:"), N_ ("Active output terminals:"),
N_ ("Available output terminals:")); N_ ("Available output terminals:"));
+2
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)
+2
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[])
+2
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)),
+2
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",
+2
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
+2
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)
-3
View File
@@ -266,7 +266,6 @@ match_files (const char *prefix, const char *suffix, const char *end,
const regex_t *regexp) const regex_t *regexp)
{ {
int i; int i;
int error;
char **files; char **files;
unsigned nfile; unsigned nfile;
char *dir; char *dir;
@@ -440,8 +439,6 @@ wildcard_expand (const char *s, char ***strs)
else if (*start == '/') /* no device part */ else if (*start == '/') /* no device part */
{ {
char **r;
unsigned n;
char *root; char *root;
char *prefix; char *prefix;
+2
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]
+2
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 };
+1
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
+2
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
+7
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);
} }
+2
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;
Loaded 100 of 319 files, more files were not shown because too many files have changed in this diff. Show more