Commit graph

3283 commits

Author SHA1 Message Date
Vladimir Serbinenko
40f290606d * grub-core/net/dns.c (hash): Use unsigned arithmetic. 2013-10-25 20:26:27 +02:00
Vladimir Serbinenko
c64577a554 * grub-core/io/gzio.c (test_zlib_header): Use undigned modulo rather
than signed.
2013-10-25 20:18:30 +02:00
Vladimir Serbinenko
6673d8e7b6 * grub-core/fs/ext2.c (EXT2_BLOCK_SIZE): Make unsigned. 2013-10-25 18:03:36 +02:00
Vladimir Serbinenko
a105d3755b * grub-core/commands/gptsync.c (lba_to_chs): Use proper types rather
than int.
2013-10-25 18:02:40 +02:00
Vladimir Serbinenko
af81ed880d * conf/Makefile.common (CPPFLAGS_KERNEL): Add -DGRUB_KERNEL=1.
* include/grub/dl.h (GRUB_MOD_INIT), (GRUB_MOD_FINI): Define
	functions when compiling for kernel.
2013-10-25 16:07:01 +02:00
Vladimir Serbinenko
ea899a5760 * grub-core/lib/progress.c (grub_file_progress_hook_real): Cast to
unsigned long long when using %llu.
2013-10-25 15:22:30 +02:00
Vladimir Serbinenko
c6dc6fa175 * grub-core/lib/progress.c (grub_file_progress_hook_real): Refresh
terminal after updating progress.
2013-10-25 11:57:36 +02:00
Vladimir Serbinenko
ad2dc00309 * grub-core/boot/i386/pc/startup_raw.S (grub_gate_a20): Remove
argument. We don't disable Gate A20 in this code.
2013-10-25 11:03:39 +02:00
Vladimir Serbinenko
b46684ae53 * grub-core/boot/i386/qemu/boot.S: Ensure that A20 is enabled.
Conceptually based on change in branch "vbe-on-coreboot".
2013-10-25 10:51:58 +02:00
Robert Millan
f70d5c0701 * grub-core/video/i386/pc/vbe.c (grub_video_vbe_setup): Replace
numeric constants with their symbolic equivalent.
	Taken from branch "vbe-on-coreboot".
2013-10-24 08:53:04 +02:00
Vladimir Serbinenko
238f048987 * grub-core/lib/progress.c (grub_file_progress_hook_real): Use
divmod64 for offset division.
2013-10-23 17:34:49 +02:00
Paulo Flabiano Smorigo
84a0e9699f Add progress module to display load progress of files.
* grub-core/lib/progress.c: New file.
	* grub-core/Makefile.core.def (progress): New module.
	* grub-core/kern/file.c (grub_file_open): File name added.
	* (grub_file_read): Progress hook added.
	* grub-core/fs/cbfs.c (grub_cbfs_read): Likewise.
	* grub-core/fs/cpio_common.c (grub_cpio_read): Likewise.
	* grub-core/net/net.c (grub_net_fs_read_real): Likewise.
	* include/grub/file.h (struct grub_file): Add progress module
	* members.
	* include/grub/term.h (struct grub_term_output): Likewise.
	* grub-core/osdep/unix/emuconsole.c (grub_console_term_output):
	Terminal velocity added.
	* grub-core/osdep/windows/emuconsole.c (grub_console_term_output):
	* Likewise.
	* grub-core/term/arc/console.c (grub_console_term_output): Likewise.
	* grub-core/term/efi/console.c (grub_console_term_output): Likewise.
	* grub-core/term/gfxterm.c (grub_video_term): Likewise.
	* grub-core/term/i386/coreboot/cbmemc.c (grub_cbmemc_term_output):
	* Likewise.
	* grub-core/term/i386/pc/console.c (grub_console_term_output):
	* Likewise.
	* grub-core/term/i386/pc/vga_text.c (grub_vga_text_term): Likewise.
	* grub-core/term/ieee1275/console.c (grub_console_term_output):
	* Likewise.
	* grub-core/term/morse.c (grub_audio_term_output): Likewise.
	* grub-core/term/serial.c (grub_serial_term_output): Likewise.
	* grub-core/term/spkmodem.c (grub_spkmodem_term_output): Likewise.
	* grub-core/term/uboot/console.c (uboot_console_term_output):
	* Likewise.
2013-10-22 16:42:20 -02:00
Vladimir 'phcoder' Serbinenko
0d711431c7 Verify signatures of signatures unless --skip-sig is specified. 2013-10-22 00:24:19 +02:00
Vladimir 'phcoder' Serbinenko
f8401f760c * grub-core/kern/misc.c (grub_vsnprintf_real): Remove needless explicit
\0 checking.

	Saves 70 bytes on compressed image.
2013-10-21 14:02:24 +02:00
Vladimir 'phcoder' Serbinenko
ac1feb61d2 * grub-core/kern/misc.c (grub_strtoull): Remove needless *ptr != 0
check.

	Saves 10 bytes on compressed image.
2013-10-21 13:40:05 +02:00
Vladimir 'phcoder' Serbinenko
00f72e890b * grub-core/kern/misc.c (grub_isprint): Move to ...
* include/grub/misc.h (grub_isprint): ... here. Make inline.

	Saves 20 bytes on compressed image due to remving exporting.
2013-10-21 13:25:56 +02:00
Vladimir 'phcoder' Serbinenko
067e6ae74d * grub-core/fs/ntfs.c (grub_ntfs_mount): Remove redundant check.
Saves 5 bytes on compressed image.
2013-10-21 13:14:38 +02:00
Vladimir 'phcoder' Serbinenko
64a6c791e1 * grub-core/fs/ntfs.c: Move common UTF-16 handling to a separate
function get_utf8.

	Saves 379 bytes on compressed image.
2013-10-21 13:04:41 +02:00
Vladimir 'phcoder' Serbinenko
979d9f521d * grub-core/fs/ntfs.c: Handle 48-bit MFT no. 2013-10-21 12:58:38 +02:00
Vladimir 'phcoder' Serbinenko
1437da5440 * grub-core/fs/ntfs.c (read_run_data): Rewrite using bitfields.
Saves 40 bytes on compressed image.
2013-10-21 04:05:23 +02:00
Vladimir 'phcoder' Serbinenko
d9ee2269c8 * grub-core/fs/ntfs.c (grub_ntfs_iterate_dir): Use grub_uint8_t for
mask rather than 64-bit type.

	Saves 20 bytes on compressed image.
2013-10-21 03:23:57 +02:00
Vladimir 'phcoder' Serbinenko
63efa602ff * grub-core/fs/ntfs.c (read_data): Move code for compressed data to ...
* grub-core/fs/ntfscomp.c (ntfscomp): ... here.
2013-10-21 02:48:19 +02:00
Vladimir 'phcoder' Serbinenko
2cc679adae * grub-core/kern/disk.c (grub_disk_write): Use malloc/free instead of
variable length arrays.

	Saves 50 bytes on compressed image.
2013-10-21 00:10:34 +02:00
Vladimir 'phcoder' Serbinenko
2e4659b810 * grub-core/loader/i386/bsd.c: Remove variable length arrays. 2013-10-20 23:45:43 +02:00
Vladimir 'phcoder' Serbinenko
2a40badf82 * grub-core/fs/ufs.c: Remove variable length arrays. 2013-10-20 23:07:50 +02:00
Vladimir 'phcoder' Serbinenko
1ba6b9b96f * grub-core/fs/ntfs.c: Add comment about fixed allocation size. 2013-10-20 18:48:06 +02:00
Vladimir 'phcoder' Serbinenko
f3e393411b * grub-core/fs/zfs.c: Remove variable length arrays.
Reduces zfs.mod by 160 bytes (208 compressed).
2013-10-20 18:42:40 +02:00
Vladimir 'phcoder' Serbinenko
7152393503 * grub-core/fs/zfs/zfs.c (check_pool_label): Fix memory leak. 2013-10-20 17:57:28 +02:00
Vladimir 'phcoder' Serbinenko
28153eb87a * grub-core/net/arp.c: Remove variable length arrays.
* grub-core/net/bootp.c: Likewise.
	* grub-core/net/dns.c: Likewise.
	* grub-core/net/icmp6.c: Likewise.
	* grub-core/net/net.c: Likewise.
2013-10-20 17:40:21 +02:00
Vladimir 'phcoder' Serbinenko
88ce4cd7f6 * grub-core/fs/ntfs.c: Remove variable length arrays.
Increases ntfs.mod by 64 bytes (but decreases by 3 when
	compressed).
2013-10-20 17:35:17 +02:00
Vladimir 'phcoder' Serbinenko
66123940c7 * grub-core/fs/hfs.c: Remove variable length arrays.
Reduces hfs.mod by 8 bytes (52 compressed).
2013-10-20 17:24:19 +02:00
Vladimir 'phcoder' Serbinenko
0927e5bdc8 * grub-core/fs/udf.c: Remove variable length arrays.
Increases udf.mod by 128 bytes (but decreases by 13 compressed when
	compressed).
2013-10-20 16:33:12 +02:00
Vladimir 'phcoder' Serbinenko
9c12ac9773 * grub-core/fs/iso9660.c: Remove variable length arrays.
Increases iso9660.mod by 200 bytes (but decreases by 79 compressed when
	compressed).
2013-10-20 16:21:02 +02:00
Vladimir 'phcoder' Serbinenko
97ec2d71d0 * grub-core/fs/nilfs2.c: Remove variable length arrays.
Increases xfs.mod by 24 bytes (but decreases by 115 compressed when
	compressed).
2013-10-20 16:17:41 +02:00
Vladimir 'phcoder' Serbinenko
156e4ea071 * grub-core/fs/xfs.c: Remove variable length arrays.
Reduces xfs.mod by 40 bytes (43 compressed).
2013-10-20 15:52:27 +02:00
Vladimir 'phcoder' Serbinenko
3b502c29a1 * grub-core/fs/fshelp.c: Remove variable length arrays.
Reduces fshelp.mod by 116 bytes (23 compressed).
2013-10-20 15:38:37 +02:00
Vladimir 'phcoder' Serbinenko
c7037f1d0f * grub-core/normal/completion.c: Remove variable length arrays.
* grub-core/normal/menu_entry.c: Likewise.

	Reduces normal.mod by 496 bytes.
2013-10-20 13:55:35 +02:00
Vladimir 'phcoder' Serbinenko
a07e6ad010 * grub-core/fs/minix.c: Remove variable length arrays. Reduces jfs.mod
by 356 bytes (158 compressed).
2013-10-20 13:26:37 +02:00
Vladimir 'phcoder' Serbinenko
2359bf887c * grub-core/fs/jfs.c: Remove variable length arrays. Reduces jfs.mod
by 364 bytes (169 compressed).
2013-10-20 13:20:12 +02:00
Vladimir 'phcoder' Serbinenko
d28e1163c3 * grub-core/fs/bfs.c: Remove variable length arrays. Reduces afs.mod and
bfs.mod size by 556 resp 740 bytes (288 resp 334 compressed).
	* include/grub/types.h (grub_unaligned_uint64_t): New type.
2013-10-20 13:11:40 +02:00
Vladimir 'phcoder' Serbinenko
e89c2d48a9 Lift 255x255 erminal sie restriction to 65535x65535. Also change from
bitmasks to small structures of size chosen to fit in registers.
2013-10-19 23:59:32 +02:00
Vladimir 'phcoder' Serbinenko
518864c05b * grub-core/osdep/unix/exec.c: Fix compilation error on emu. 2013-10-19 23:53:48 +02:00
Vladimir 'phcoder' Serbinenko
bbd2b5396b * grub-core/kern/misc.c (grub_vsnprintf_real): Fix formatting of
"(null)" string.
	Simplify expressions to save around 256 bytes in kernel.img.
	* tests/printf_unit_test.c (printf_test): Add "(null)" tests.
2013-10-19 23:52:09 +02:00
Vladimir 'phcoder' Serbinenko
99519c154c * grub-core/tests/video_checksum.c (grub_video_capture_write_bmp):
Use GRUB_UTIL_FD_O_* rather than O_*.
2013-10-19 23:48:24 +02:00
Vladimir 'phcoder' Serbinenko
2028576504 Add haiku-specific functions. 2013-10-19 16:39:38 +02:00
Vladimir 'phcoder' Serbinenko
887c0bb61a * grub-core/kern/emu/hostdisk.c: Remove few leftover includes. 2013-10-19 16:32:28 +02:00
Vladimir 'phcoder' Serbinenko
cd78a56fb2 Move stat () and device mode checking into OS-dependent files as
long as performance doesn't suffer.
2013-10-19 16:29:20 +02:00
Vladimir 'phcoder' Serbinenko
a4012f0764 Split make_system_path_relative_to_its_root into separate file
relpath.c from getroot.c as it's common between unix and haiku
	but otherwise haiku doesn't use any functions from unix getroot.c.
2013-10-19 16:21:08 +02:00
Vladimir 'phcoder' Serbinenko
31de274d29 * grub-core/osdep/aros/hostdisk.c (grub_util_is_directory):
New function.
	(grub_util_is_special_file): Likewise.
2013-10-19 16:14:30 +02:00
Vladimir 'phcoder' Serbinenko
40346de6d3 * grub-core/osdep/unix/getroot.c: Move exec functions to ...
* osdep/unix/exec.c: ... here. Add few additional exec_* variants.
2013-10-19 02:56:40 +02:00
Vladimir 'phcoder' Serbinenko
d3923ab956 * grub-core/lib/libgcrypt_wrap/cipher_wrap.h: Define size_t to
grub_size_t. This fixes the case when size_t mismatches grub_size_t.
2013-10-19 02:42:40 +02:00
Vladimir 'phcoder' Serbinenko
d0a116ee5a * grub-core/osdep/random.c: Use unix/random.c on haiku. Haiku uses
yarrow (by B. Schneier et al) for its /dev/urandom (similar to FreeBSD).
2013-10-19 02:30:05 +02:00
Vladimir 'phcoder' Serbinenko
b47fcae6cb * grub-core/osdep/generic/blocklist.c: Add missing include to string.h. 2013-10-19 02:24:40 +02:00
Vladimir 'phcoder' Serbinenko
0f7c00c1c6 * grub-core/disk/efi/efidisk.c (grub_efidisk_get_device_name): Handle
CD-ROM in case when it's declared as having subpartitions.
2013-10-19 02:23:08 +02:00
Vladimir 'phcoder' Serbinenko
29013cba15 Don't add -lm on haiku.
* configure.ac: Define BUILD_LIBM to -lm on most platforms
	and empty on haiku.
	* grub-core/Makefile.am (gentrigtables): Use $(BUILD_LIBM) rather than
	-lm.
2013-10-19 02:20:21 +02:00
Vladimir 'phcoder' Serbinenko
fc3182c799 * grub-core/kern/i386/pc/mmap.c (grub_machine_mmap_iterate): Pass
unknown types through.
2013-10-19 01:01:36 +02:00
Vladimir 'phcoder' Serbinenko
f90a3cc0a8 * grub-core/osdep/unix/getroot.c (grub_util_check_block_device): Remove.
(grub_util_check_char_device): Likewise.
	* include/grub/emu/getroot.h: Likewise.
2013-10-19 00:51:08 +02:00
Vladimir 'phcoder' Serbinenko
1e3e741940 * grub-core/lib/libgcrypt_wrap/cipher_wrap.h: Use define for defining
memset rather than inline static function.
2013-10-18 17:18:15 +02:00
Vladimir 'phcoder' Serbinenko
92c88fc896 * grub-core/lib/xzembed/xz_config.h: Enable all bcj filters when
not doing embedded decompressor.
2013-10-18 17:13:38 +02:00
Vladimir 'phcoder' Serbinenko
3cd910a212 * grub-core/disk/ldm.c: Rename variables and arguments to prevent
shadowing.
	* grub-core/kern/disk.c: Likewise.
	* grub-core/kern/misc.c: Likewise.
	* include/grub/parser.h: Likewise.
	* include/grub/script_sh.h: Likewise.
	* include/grub/zfs/zfs.h: Likewise.
2013-10-18 16:54:57 +02:00
Vladimir 'phcoder' Serbinenko
7b3aca00fa * grub-core/disk/luks.c (configure_ciphers): Fix spurious warning. 2013-10-18 16:51:08 +02:00
Vladimir 'phcoder' Serbinenko
97dfe7e46b * grub-core/fs/zfs/zfs_lz4.c: Check that __INTEL_COMPILER is
defined before trying to use it.
2013-10-18 16:49:17 +02:00
Vladimir 'phcoder' Serbinenko
bf919aa977 * grub-core/fs/affs.c (grub_affs_create_node): Fix uninited value
warning.
2013-10-18 16:47:30 +02:00
Vladimir 'phcoder' Serbinenko
757e3eb7c3 * grub-core/disk/dmraid_nvidia.c: Fix potentially uninited "layout". 2013-10-18 16:36:09 +02:00
Vladimir 'phcoder' Serbinenko
ea73acd2ce * grub-core/term/i386/pc/vga_text.c: Remove extra declaration of
cur_color.
2013-10-18 16:30:30 +02:00
Vladimir Testov
71237a6f0f * grub-core/tests/checksums.h: Regenerated due to progress bar
get_minimal_size changes.
2013-10-18 16:11:48 +04:00
BVK Chaitanya
3d46c22f5b Added `tr' command support.
* grub-core/commands/tr.c: New file.
	* grub-core/Makefile.core.def: Build rules for new module.

	* tests/grub_cmd_tr.in: New test.
	* Makefile.util.def: Build rules for new test.
2013-10-17 19:06:29 +02:00
Vladimir Testov
47e0a61f6f * grub-core/gfxmenu/gui_progress_bar.c: Sanity checks added. 2013-10-17 15:50:25 +04:00
Vladimir Testov
946fd07357 * grub-core/gfxmenu/gui_progress_bar.c: New option `highlight_overlay`
* docs/gurb.texi: Likewise.
2013-10-17 15:42:49 +04:00
Vladimir Testov
9c13c57623 * grub-core/gfxmenu/gui_progress_bar.c (draw_pixmap_bar): Fixed bug.
Pixmap highlighted section with east and west slices was displayed
        incorrectly due to negative width of the central slice.
2013-10-17 15:34:04 +04:00
Vladimir 'phcoder' Serbinenko
9688cae2eb * grub-core/script/yylex.l: Fix LSQBR2 and RSQBR2. It's not
currently used so this doesn't really have any effect.
	Reported by:  	Douglas Ray <dougray>
2013-10-17 01:28:24 +02:00
Hiroyuki YAMAMORI
ceca6ddf26 Handle Japanese special keys.
Reported by: Hiroyuki YAMAMORI.
	Codes supplied by: Hiroyuki YAMAMORI.
2013-10-17 00:49:05 +02:00
Vladimir Testov
ac48d334ab * grub-core/gfxmenu/gui_list.c: Scrollbar sanity checks added. 2013-10-15 18:16:06 +04:00
Vladimir Testov
b2b71bff36 * grub-core/gfxmenu/gui_list.c: New option item_pixmap_style.
* docs/grub.texi: Likewise.
2013-10-15 18:12:39 +04:00
Vladimir 'phcoder' Serbinenko
669fc44923 * grub-core/osdep/unix/hostdisk.c (grub_util_fd_read): Return correct
value in case of incomplete read.
	(grub_util_fd_write): Likewise.
2013-10-16 00:20:07 +02:00
Vladimir 'phcoder' Serbinenko
f7c4957068 * grub-core/osdep/unix/getroot.c (grub_guess_root_devices):
canonicalize file name before doing the rest.
2013-10-15 21:04:10 +02:00
Vladimir 'phcoder' Serbinenko
df1e64c98e Define grub_util_is_directory/regular/special_file and
use OS-dependent versions rather than to rely on stat().
2013-10-15 20:27:58 +02:00
Vladimir 'phcoder' Serbinenko
4b4eeb3cc1 Allow compilation with mingw64 albeit with warnings due to lack of
%llx/%llu.

	* grub-core/gnulib/msvc-inval.c: Use __cdecl rather than cdecl.
	* grub-core/lib/posix_wrap/wchar.h: Define wint_t.
	* grub-core/lib/posix_wrap/wctype.h: Define wctype_t.
	* include/grub/osdep/hostfile_windows.h: Don't define fseeko/ftello
	on mingw64.
	* include/grub/types.h: Allow sizeof (long) != sizeof (void *).
2013-10-15 18:03:19 +02:00
Vladimir 'phcoder' Serbinenko
f4e0adc0f9 Remove leftover references to some of the system headers. 2013-10-15 17:59:54 +02:00
Vladimir 'phcoder' Serbinenko
e012736478 * grub-core/disk/geli.c (grub_util_get_geli_uuid): Close handle after
read.
2013-10-15 17:55:20 +02:00
Vladimir 'phcoder' Serbinenko
20d535419f * grub-core/disk/cryptodisk.c: Use grub_util_fd_strerror instead
of strerror.
2013-10-15 17:52:43 +02:00
Vladimir 'phcoder' Serbinenko
5a869940de Split out blocklist retrieving from setup.c to
grub-core/osdep/blocklist.c and add windows implementation since
	generic version doesn't work on NTFS on Windows due to aggressive
	unflushable cache.
2013-10-15 17:02:26 +02:00
Vladimir 'phcoder' Serbinenko
c06c75201c Split grub-setup.c into frontend (grub-setup.c) and backend (setup.c)
files.
2013-10-15 16:16:04 +02:00
Vladimir 'phcoder' Serbinenko
8f53bb3fd2 * grub-core/osdep/windows/hostdisk.c (grub_util_fd_strerror):
Cut tailing newline. Remove arbitrary limitation. Always use
	grub_util_tchar_to_utf8.
2013-10-15 15:14:58 +02:00
Vladimir 'phcoder' Serbinenko
148f100768 * grub-core/kern/misc.c (grub_vsnprintf_real): Handle %% properly.
* tests/printf_unit_test.c (printf_test): Add %% tests.
	Reported by: Paulo Flabiano Smorigo.
2013-10-15 15:12:15 +02:00
Vladimir 'phcoder' Serbinenko
af3b06be14 * grub-core/osdep/windows/hostdisk.c (fsync) [__MINGW32__]: Really
implement fsync.
2013-10-15 15:06:20 +02:00
Vladimir 'phcoder' Serbinenko
f6a81f0aaf Add wrappers around rename, unlink, mkdir, opendir, readdir and
closedir to handle filename charset translation.
2013-10-15 14:11:34 +02:00
Vladimir 'phcoder' Serbinenko
d7750b324f * include/grub/emu/hostdisk.h: Move file operations to
* include/grub/emu/hostfile.h: ... here.
2013-10-15 13:56:10 +02:00
Vladimir 'phcoder' Serbinenko
2859196e5f * grub-core/osdep/windows/hostdisk.c (canonicalize_file_name): Handle
unicode path.
2013-10-15 13:34:03 +02:00
Vladimir 'phcoder' Serbinenko
c018c968cd * grub-core/tests/checksums.h: Regenerate due to swiss.sed change. 2013-10-15 13:28:19 +02:00
Vladimir 'phcoder' Serbinenko
7e45abcef4 Move cpu time retrieval to separate grub_util_get_cpu_time_ms
and remove export.h.
2013-10-15 13:13:53 +02:00
Vladimir 'phcoder' Serbinenko
23934da26e * grub-core/kern/emu/error.c: Removed.
* grub-core/Makefile.core.def (kernel): Don't add error.c and progname.c
	explicitly as it's already in libgnu.a.
2013-10-15 12:46:06 +02:00
Vladimir 'phcoder' Serbinenko
c11ebcc84f * grub-core/osdep/windows/emuconsole.c: Add missing config.h and
config-util.h include.
2013-10-15 12:43:52 +02:00
Vladimir 'phcoder' Serbinenko
70671037c8 Split emunet into platform-dependent and GRUB-binding parts. Keep
platform-dependent part in kernel for easy access to OS functions.
2013-10-15 11:55:20 +02:00
Vladimir 'phcoder' Serbinenko
25ac643a54 * grub-core/tests/video_checksum.c: Use grub_util_fd_* rather than
open/read/write.
2013-10-15 11:06:57 +02:00
Vladimir 'phcoder' Serbinenko
69ca587652 * grub-core/osdep/windows/emuconsole.c: New file. 2013-10-14 21:33:55 +02:00
Andrey Borzenkov
44016e527a * grub-core/disk/efi/efidisk.c (grub_efidisk_get_device_name):
Handle CD-ROMs.
2013-10-14 17:06:39 +02:00
Vladimir 'phcoder' Serbinenko
6de9ee86bf Pass-through unknown E820 types. It required reorganisation of mmap
module.
2013-10-14 16:33:44 +02:00
Vladimir 'phcoder' Serbinenko
b73249d260 Make grub_util_fd_seek match behaviour of other grub_util_fd_* and
fseeko.
2013-10-14 12:47:09 +02:00
qwertial
dac86b182c * grub-core/gdb_grub.in: Fix overflow and wrong field. 2013-10-14 03:40:20 +02:00
Vladimir 'phcoder' Serbinenko
6de292cb9b Define GRUB_UTIL_FD_O_* and always use them with grub_util_fd_open. 2013-10-14 02:11:59 +02:00
Vladimir 'phcoder' Serbinenko
21d85db12f * grub-core/Makefile.core.def: Add osdep/init.c on emu.
* grub-core/kern/emu/main.c: Add missing include.
	* grub-core/osdep/basic/init.c (grub_util_host_init) [!GRUB_UTIL]:
	Don't call grub_util_init_nls.
	* grub-core/osdep/windows/init.c (grub_util_host_init) [!GRUB_UTIL]:
	Likewise.
2013-10-14 02:06:43 +02:00
Vladimir 'phcoder' Serbinenko
bb338aaf24 Add a wrapper for fopen. On unix-like systems just pass-through. On
windows use unicode version.
2013-10-13 20:36:28 +02:00
Vladimir 'phcoder' Serbinenko
ae5540d3d4 Move set_program_name and init_nls to host_init. On windows
fix in this fuction console and argument charset as well.
2013-10-13 20:03:42 +02:00
Melki Christian
3414b6c0e2 * grub-core/term/at_keyboard.c [DEBUG_AT_KEYBOARD]: Fix compilation
error when enabling debug.
2013-10-12 08:11:19 +02:00
Vladimir 'phcoder' Serbinenko
ff2d4dc41c * grub-core/kern/arm/dl_helper.c: Use more proper %p for pointer. 2013-10-12 07:50:26 +02:00
Vladimir 'phcoder' Serbinenko
60d4f0bb45 * grub-core/fs/fat.c: Fix handling of exfat contiguous files. 2013-10-11 16:13:52 +02:00
Vladimir Testov
145e2369a7 * grub-core/gfxmenu/gui_list.c: New option scrollbar_thumb_overlay.
* docs/grub.texi: Likewise.
2013-10-10 14:37:19 +04:00
Vladimir 'phcoder' Serbinenko
ed8c0887f4 * conf/Makefile.extra-dist: Fix extra-dist list.
* grub-core/Makefile.core.def: Likewise.
2013-10-10 09:47:39 +02:00
Vladimir 'phcoder' Serbinenko
2fe53a22b8 * grub-core/osdep/aros/getroot.c: Change to //: prefix as discussed
with AROS devs.
	* grub-core/osdep/aros/hostdisk.c: Likewise.
2013-10-10 09:21:33 +02:00
Vladimir Testov
ad297ec734 * grub-core/gfxmenu/gui_list.c: New options for scrollbar padding:
scrollbar_left_pad, scrollbar_right_pad, scrollbar_top_pad,
       scrollbar_bottom_pad
       * docs/grub.texi: Likewise.
2013-10-09 16:55:16 +04:00
Vladimir Testov
6e9e5dc98b * grub-core/gfxmenu/gui_list.c (list_destroy): Fixed memory leak. 2013-10-09 10:44:11 +04:00
Vladimir 'phcoder' Serbinenko
37149a2f20 * include/grub/emu/hostdisk.h (grub_hostdisk_linux_find_partition):
Removed.
	* grub-core/osdep/linux/hostdisk.c (grub_hostdisk_linux_find_partition):
	Made static.
2013-10-09 07:16:20 +02:00
Vladimir 'phcoder' Serbinenko
caca1c70cf Move OS-specific driver configuration to grub_util_fd_open. This
moves OS-dependent parts from kern/emu/hostdisk.c to
	grub-core/osdep/*/hostdisk.c.
2013-10-09 07:04:25 +02:00
Vladimir 'phcoder' Serbinenko
b102ce6909 * grub-core/osdep/basic/random.c: New file. Abort on an attempt to
get random when no RNG is available.
	* grub-core/osdep/random.c: Use basic/random.c on OS out of whitelist.
2013-10-08 21:28:14 +02:00
Vladimir 'phcoder' Serbinenko
acbbe5cbad * include/grub/util/lvm.h: Removed. 2013-10-08 21:01:09 +02:00
Vladimir 'phcoder' Serbinenko
2112fb3fef * grub-core/kern/emu/misc.c (fsync) [__MINGW32__]: Move to ...
* grub-core/osdep/windows/hostdisk.c (fsync) [__MINGW32__]: ... here.
2013-10-08 20:05:24 +02:00
Vladimir 'phcoder' Serbinenko
79f78fbf06 * grub-core/osdep/windows/sleep.c: Add missing config.h. 2013-10-08 20:02:07 +02:00
Vladimir 'phcoder' Serbinenko
c2e6f70589 * grub-core/kern/emu/misc.c (grub_get_rtc): Remove (it's a leftover). 2013-10-08 19:53:57 +02:00
Vladimir 'phcoder' Serbinenko
620b52bf47 Couple missed files from previous commits. 2013-10-08 19:17:46 +02:00
Vladimir 'phcoder' Serbinenko
aabe433afe * grub-core/net/drivers/emu/emunet.c: Move to ..
* grub-core/osdep/linux/emunet.c: ..here.
2013-10-08 18:42:46 +02:00
Vladimir 'phcoder' Serbinenko
9a2c903f28 * util/ieee1275/ofpath.c: Move to ...
* grub-core/osdep/linux/ofpath.c: ..here, split stub into ...
	* grub-core/osdep/basic/ofpath.c: ..here.
2013-10-08 18:25:49 +02:00
Vladimir 'phcoder' Serbinenko
4a445f580b Move password-querying (util-version) routines to grub-core/osdep. 2013-10-08 17:51:39 +02:00
Vladimir 'phcoder' Serbinenko
c1ca424476 Move sleep routines to grub-core/osdep. 2013-10-08 17:38:46 +02:00
Vladimir 'phcoder' Serbinenko
672fa55e81 Move OS-dependent files to grub-core/osdep and document it. 2013-10-08 17:30:22 +02:00
Vladimir 'phcoder' Serbinenko
a5b0365ab2 * grub-core/kern/emu/misc.c (canonicalize_file_name): Move to ...
* grub-core/kern/emu/hostdisk_*.c (canonicalize_file_name): ... here.
2013-10-08 17:04:46 +02:00
Vladimir 'phcoder' Serbinenko
29072e994e * grub-core/kern/arm/misc.S: Remove leftover ARM and THUMB. 2013-10-08 17:03:19 +02:00
Vladimir 'phcoder' Serbinenko
c4cf25eef7 * grub-core/fs/zfs/zfs_lz4.c: Switch from ad-hoc endiannes and width
macros to GRUB ones.
2013-10-08 16:55:39 +02:00
Vladimir Testov
53a5f5c2f0 * grub-core/gfxmenu/gui_list.c (draw_scrollbar): Fixed rare
occasional bug. If there are too many boot entries or too low
       scrollbar height then we need to use another formula to calculate
       the position and size of the scrollbar thumb.
2013-10-08 18:49:35 +04:00
Vladimir Testov
c582736463 * grub-core/gfxmenu/gui_list.c: New option scrollbar-slice.
* docs/grub.texi: Likewise.
2013-10-08 18:31:53 +04:00
Vladimir Testov
dd2ed8b092 * grub-core/gfxmenu/gui_list.c: Draw the scrollbar in a separate
viewport.
2013-10-08 16:27:56 +04:00
Vladimir Testov
7286c38450 * grub-core/gfxmenu.c (list_get_minimal_size): Corrected minimal
width calculations.
2013-10-08 15:35:00 +04:00
Vladimir 'phcoder' Serbinenko
b726be7653 * grub-core/fs/ufs.c (grub_ufs_get_file_block): Give GRUB_ERR_BAD_FS
for quadruple indirect rather than GRUB_ERR_NOT_IMPLEMENTED_YET as
	it's FS and not GRUB limitation.
2013-10-07 20:07:19 +02:00
Vladimir 'phcoder' Serbinenko
a5f6ade676 * grub-core/kern/arm/efi/startup.S: Remove thumb leftover. 2013-10-07 20:04:54 +02:00
Vladimir 'phcoder' Serbinenko
3b0f3aa2a7 * grub-core/kern/arm/efi/init.c: Rewrite timer fucntion. 2013-10-07 19:23:14 +02:00
Vladimir 'phcoder' Serbinenko
47345010a4 Add AROS hostdisk and getroot routines. 2013-10-04 02:35:03 +02:00
Vladimir 'phcoder' Serbinenko
bf25f87931 Make cryptodisk and diskfilter probe data retrievable programmatically
and not just printable.
2013-10-04 01:43:47 +02:00
Vladimir 'phcoder' Serbinenko
c7c177f07f * grub-core/kern/arm/dl.c (do_relocations): Accept and ignore
R_ARM_V4BX.
2013-10-03 23:55:06 +02:00
Vladimir 'phcoder' Serbinenko
d71b45ae8e * grub-core/tests/video_checksum.c: Increase robustness to out of memory
condition.
	* grub-core/tests/fake_input.c: Likewise.
	* grub-core/tests/cmdline_cat_test.c: Likewise.
2013-10-03 23:38:18 +02:00
Vladimir 'phcoder' Serbinenko
e44b9a8349 * grub-core/video/capture.c: Do not do finalization when .fini
is called as there is explicit capture_end.
2013-10-03 23:33:58 +02:00
Vladimir 'phcoder' Serbinenko
4fa60739f2 * grub-core/term/gfxterm.c: Add flag "functional" to skip input when
changing windows to avoid crash.
2013-10-03 23:32:19 +02:00
Vladimir 'phcoder' Serbinenko
17c8bc378f * grub-core/kern/arm/cache.c: Add v5 write-through cache support. 2013-10-03 23:29:57 +02:00
Vladimir 'phcoder' Serbinenko
498d503316 * grub-core/gfxmenu/theme_loader.c (theme_set_string): Fix memory leak
and don't mark error strings for translation.
2013-10-03 23:23:00 +02:00
Vladimir 'phcoder' Serbinenko
7d93298ff6 * grub-core/disk/uboot/ubootdisk.c (uboot_disk_open): Use grub_error
properly in case of missing block size.
2013-10-03 23:20:00 +02:00
Vladimir 'phcoder' Serbinenko
b2cae20c11 * grub-core/lib/arm/setjmp.S: Add missing license section. 2013-10-03 19:50:08 +02:00
Vladimir Testov
ebc1da55cd * grub-core/gfxmenu/theme_loader.c: New global options for the
theme background image handling. desktop-image-scale-method,
       desktop-image-h-align, desktop-image-v-align.
       * grub-core/gfxmenu/view.c: Likewise.
       * include/gfxmenu_view.h: Likewise.
       * include/bitmap_scale.h: Proportional scale functions introduced.
       * grub-core/video/bitmap_scale.c: Likewise. Verification checks are
       put in a separate functions. GRUB_ERR_BUG is set for grub_error in
       cases of unexpected input variables for scale functions.
       * docs/grub.texi: Updated documentation for new options.
2013-10-02 18:17:33 +04:00
Vladimir 'phcoder' Serbinenko
c573914389 * grub-core/video/readers/png.c: Support narrow (4-/2-/1-bpp) PNG. 2013-10-02 13:22:56 +02:00
Vladimir Testov
be74aeb39e * grub-core/tests/checksums.h: Corrected due to changes in
bilinear interpolation function.
2013-10-01 18:00:53 +04:00
Vladimir Testov
d999ac72e2 * grub-core/video/bitmap_scale.c (scale_bilinear): Increased precision
to eliminate artefacts in bilinear interpolation.
2013-10-01 16:34:04 +04:00
Vladimir 'phcoder' Serbinenko
2b131610d0 * grub-core/video/readers/tga.c: Support paletted tga. 2013-09-28 19:22:20 +02:00
Vladimir 'phcoder' Serbinenko
de6e5ff89b * grub-core/video/readers/jpeg.c (grub_jpeg_decode_data): Remove
incorrect cbcr setting when in color mode.
2013-09-28 03:06:04 +02:00
Vladimir 'phcoder' Serbinenko
fa31ee9c2c * grub-core/video/readers/png.c: Support paletted images and clean up
greyscale support.
2013-09-28 03:04:34 +02:00
Vladimir 'phcoder' Serbinenko
e84f818865 * grub-core/term/terminfo.c (grub_terminfo_readkey): Fix
usage of wrong table which resulted in mishandling of 4-byte
	sequences.
2013-09-28 01:03:31 +02:00
Vladimir 'phcoder' Serbinenko
2237daf246 * grub-core/term/terminfo.c: Add Home and End key sequences. 2013-09-28 00:55:38 +02:00
Vladimir 'phcoder' Serbinenko
d72bff0997 * grub-core/video/readers/png.c (grub_png_decode_image_header):
Fix formula for computing total number of bytes.
2013-09-27 21:51:52 +02:00
Vladimir 'phcoder' Serbinenko
29648c5d84 * grub-core/video/readers/tga.c: Reorganize to separate RLE and
image processing, fix big-endian and support grayscale.
2013-09-27 21:49:08 +02:00
Vladimir 'phcoder' Serbinenko
4a87649207 * grub-core/video/fb/video_fb.c (grub_video_fb_create_render_target):
Correctly will with maximum transparency when using index color.
2013-09-27 21:44:03 +02:00
Vladimir 'phcoder' Serbinenko
3ccf16dff9 * grub-core/video/readers/png.c: Support grayscale 2013-09-27 12:04:09 +02:00
Vladimir 'phcoder' Serbinenko
e9c492a02e * grub-core/video/readers/jpeg.c: Support grayscale. 2013-09-27 11:13:36 +02:00
Jon McCune
0340bdbc22 * grub-core/commands/loadenv.c: Support skipping signature check
and variable names filtering.
2013-09-27 02:08:32 +02:00
Vladimir 'phcoder' Serbinenko
30b7f58f4e * grub-core/kern/emu/hostdisk_unix.c: Declare AROS as non-unix.
* grub-core/kern/emu/hostfs.c: Likewise.
	* util/getroot_unix.c: Likewise.
2013-09-24 19:19:31 +02:00
Vladimir 'phcoder' Serbinenko
bab7b1ebeb * include/grub/emu/hostdisk.h (GRUB_FD_STAT_IS_FUNTIONAL): New define.
Migrate all explicit defines to this new one.
2013-09-24 19:17:24 +02:00
Vladimir 'phcoder' Serbinenko
43b1c99d53 * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_open): Use
grub_util_fd_strerror when using grub_util_fd_*.
	(grub_util_fd_open_device): Likewise.
	(grub_util_biosdisk_read): Likewise.
	(grub_util_biosdisk_write): Likewise.
	* grub-core/kern/emu/hostdisk_unix.c (grub_util_fd_open): New function.
	(grub_util_fd_strerror): Likewise.
	(grub_util_fd_sync): Likewise.
	(grub_util_fd_close): Likewise.
	* grub-core/kern/emu/hostdisk_windows.c (grub_util_fd_sync): Likewise.
	(grub_util_fd_close): Likewise.
	(grub_util_fd_strerror): Likewise.
	* include/grub/emu/hostdisk.h (grub_util_fd_close): Make into real
	function proto rather than macro.
	(grub_util_fd_sync): Likewise.
	(grub_util_fd_open): Likewise.
	(grub_util_fd_strerror): New proto.
2013-09-24 19:08:34 +02:00
Vladimir 'phcoder' Serbinenko
bf645fda03 * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_open): Move struct
stat immediately to where it's used.
2013-09-24 18:57:19 +02:00
Vladimir 'phcoder' Serbinenko
9db826e149 * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_close): Fix
disk closing logic.
2013-09-24 18:36:51 +02:00
Vladimir 'phcoder' Serbinenko
3fff48ab45 * grub-core/kern/emu/hostdisk_windows.c (grub_util_get_windows_path):
Always return full path. Fixes a problem with mkrelpath.
2013-09-23 22:49:20 +02:00
starous@volny.cz
7c680e1f17 USB EHCI: SMI disabled in all cases 2013-09-23 20:30:52 +02:00
Massimo Maggi
890bdabe96 * grub-core/fs/zfs/zfs.c (check_pool_label): Check nvlist. 2013-09-23 18:50:07 +02:00
Melki Christian
d755342abe * grub-core/bus/usb/usbhub.c (poll_nonroot_hub): Fix the type of
"changed".
2013-09-23 14:39:13 +02:00
Josh Triplett
68b777070a * grub-core/boot/i386/pc/lnxboot.S: Re-add support for recording the
boot partition.
2013-09-23 14:31:42 +02:00
Vladimir 'phcoder' Serbinenko
621bed6990 * grub-core/video/efi_gop.c (grub_video_gop_setup): Fix a typo which
desactivated use of EDID at all.
2013-09-23 13:40:07 +02:00
neil
71764dc8ca * grub-core/loader/multiboot.c (grub_multiboot_set_console): Always use
video if no text is available.

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2013-09-23 13:35:33 +02:00
Vladimir 'phcoder' Serbinenko
affce7d417 * grub-core/genmod.sh.in: Remove ./ from TARGET_OBJ2ELF. Add quotes.
Based on patches from AROS.
2013-09-23 13:03:03 +02:00
Vladimir 'phcoder' Serbinenko
0e8daad0bd * grub-core/Makefile.am: Override STRIP and RANLIB.
* configure.ac: compute TARGET_RANLIB.
	* INSTALL: Document TARGET_RANLIB

	Based on patches from AROS.
2013-09-23 12:55:18 +02:00
Vladimir 'phcoder' Serbinenko
5dd8205424 * grub-core/lib/posix_wrap/sys/types.h: Use OpenBSD approach: it's
less nice but more portable.
	* grub-core/lib/posix_wrap/wchar.h: Likewise.
2013-09-23 12:03:56 +02:00
Vladimir 'phcoder' Serbinenko
a47a78be88 * include/grub/cryptodisk.h (grub_cryptodisk): Use grub_util_fd_t
for cheat_fd.
	* grub-core/disk/cryptodisk.c (grub_cryptodisk_open): Use grub_util_*
	functions.
	(grub_cryptodisk_cheat_insert): Likewise.
	(grub_cryptodisk_close): Likewise.
2013-09-23 11:58:19 +02:00
Vladimir 'phcoder' Serbinenko
7e518ca84f Use Winapi on both cygwin and mingw32 to share more code between both. 2013-09-23 11:21:09 +02:00
Vladimir 'phcoder' Serbinenko
3ff4063dd3 * grub-core/kern/emu/hostdisk.c: Disentagle into a series of OS-specific
files rather than one file with loads of #if's.
	* util/getroot.c: Likewise.
2013-09-22 07:36:17 +02:00
Vladimir 'phcoder' Serbinenko
287faafe8d * grub-core/lib/posix_wrap/sys/types.h: Use stddef on *BSD. 2013-09-22 03:29:51 +02:00
starous@volny.cz
306950e137 USB EHCI QH handling patch 2013-09-21 15:39:51 +02:00
Vladimir 'phcoder' Serbinenko
63653cfdae * grub-core/disk/diskfilter.c: Handle non-md UUIDs.
* grub-core/disk/lvm.c: Add LVM UUIDs.
	* util/getroot.c: Use LVM UUIDs whenever possible.
2013-09-20 20:37:03 +02:00
Leif Lindholm
e70d6736ff * kern/arm/cache.S: Correct access to ilinesz/dlinesz variables.
Clean up stack manipulation (sync_caches_armv*)
2013-09-19 09:21:24 +02:00
Vladimir 'phcoder' Serbinenko
386701a8fe Handle the case of partitioned LVM properly.
* grub-core/kern/emu/hostdisk.c (grub_util_get_dm_node_linear_info):
	Stop on meeting LVM, mpath or DMRAID.
	(grub_hostdisk_os_dev_to_grub_drive): Canonicalize os device.
	(read_device_map): Likewise.
	* util/getroot.c (convert_system_partition_to_system_disk): Assume that
	device is full disk rather than erroring out on LVM and similar cases.
2013-09-19 08:48:54 +02:00
Vladimir 'phcoder' Serbinenko
1bc783bd39 * grub-core/kern/mm.c (grub_mm_init_region): Skip regions less than
4K before the end.
	Reported by: Leif Lindholm
2013-09-18 20:23:47 +02:00
Pawel Wojtalczyk
436ad5c3f4 * grub-core/term/efi/console.c (grub_console_getkey): Accept VT100-style
codes.

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2013-09-18 18:58:09 +02:00
Colin Watson
607319c9ab * grub-core/disk/efi/efidisk.c (grub_efidisk_get_device_name_iter):
Remove no-longer-true __attribute__ ((unused)) on disk parameter.
2013-09-18 15:43:58 +01:00
Melki Christian
897c3bc634 * grub-core/bus/usb/usb.c (grub_usb_device_initialize): Add condition
to break endless loop.
2013-09-18 13:27:05 +02:00
Vladimir 'phcoder' Serbinenko
64463dfde4 * grub-core/lib/xzembed/xz_dec_lzma2.c: Make -Wattributes not cause
error.
2013-08-23 08:58:34 +02:00
Vladimir 'phcoder' Serbinenko
6b87c10a0b * grub-core/lib/crypto.c (grub_password_get) [GRUB_UTIL]: Add
windows variant.
	* util/grub-mkpasswd-pbkdf2.c: Add windows flavour for retrieving random
	data.
2013-08-22 20:14:07 +02:00
Vladimir 'phcoder' Serbinenko
7b780018f5 Handle grub-pe2elf and grub-mkfont for cases when build != host.
* Makefile.am (build-grub-mkfont): Don't include gnulib.
	(build-grub-gen-asciih): Likewise.
	(build-grub-gen-widthspec): Likewise.
	* Makefile.util.def (grub-pe2elf): Remove.
	* config.h.in [GRUB_BUILD]: Use build rather than host constants.
	* configure.ac: Separate tests for build.
	Move ./build-grub-pe2elf to grub-core.
	Fix typo.
	* grub-core/Makefile.am (build-grub-pe2elf): New target.
	* grub-core/kern/emu/misc.c (xasprintf): Don't compile if GRUB_BUILD is
	defined.
	* include/grub/types.h [GRUB_BUILD]: Use build rather than host
	constants.
	* util/grub-mkfont.c [GRUB_BUILD]: Simplify not to rely on argp.
	* util/grub-pe2elf.c: Simplify not to rely on getopt.
	* util/misc.c (program_name) [GRUB_BUILD]: Define to static string.
2013-08-22 17:00:59 +02:00
Vladimir 'phcoder' Serbinenko
984cfd8a79 * grub-core/kern/emu/hostdisk.c (grub_util_get_fd_size): Adapt for
mingw32 as well based on grub_util_get_disk_size.
	* util/misc.c (grub_util_get_disk_size): Removed. all users switched to
	grub_util_get_fd_size.
	(sync): Removed.
	(fsync): Moved to ...
	* grub-core/kern/emu/misc.c (fsync): ... here.
2013-08-22 16:50:12 +02:00
Vladimir 'phcoder' Serbinenko
f82d79c984 * include/grub/mm.h (grub_extend_alloc): Remove.
* grub-core/loader/i386/pc/plan9.c: Use own version of
	grub_extend_alloc with appropriate types.
2013-08-22 16:44:20 +02:00
Vladimir 'phcoder' Serbinenko
3c7eac445b Fix dependencies on cygwin.
* gentpl.py: Support variable dependencies. Add $TARGET_OBJ2ELF to
	dependencies when used and defined.
	* grub-core/Makefile.core.def (regexp): Add dependency on libgnulib.a.
2013-08-22 16:25:10 +02:00
Vladimir 'phcoder' Serbinenko
bdb5ba47d8 * include/grub/zfs/spa.h (zio_cksum): Add explicit members for mac.
* grub-core/fs/zfs/zfs.c (zio_read): Don't use casts to retrieve mac.
2013-08-22 16:20:32 +02:00
Vladimir 'phcoder' Serbinenko
ed7fbf43c2 * grub-core/kern/emu/mm.c (grub_memalign): Don't define if there is no
implementation available to cause compile-time rather than runtime
	error.
2013-08-22 16:16:29 +02:00
Vladimir 'phcoder' Serbinenko
8ed358e0ee * include/grub/crypto.h: Don't declare gcry_log_bug, gcry_log_printf
and gcry_log_bug.
	* grub-core/lib/libgcrypt_wrap/mem.c: Include g10lib.h
2013-08-22 16:03:47 +02:00
Vladimir 'phcoder' Serbinenko
fc97214f7e * INSTALL: Document cross-compilation.
* acinclude.m4: Determine whether nm support -P and --defined-only.
	* configure.ac: Add TARGET_ to all variables pertaining to target
	that don't have it yet.
	* gentpl.py: Likewise.
	* grub-core/Makefile.am: Likewise.
	* grub-core/genmod.sh.in: Likewise.
	* grub-core/gensyminfo.sh.in: Handle OpenBSD and other non-GNU nm
	as well.
2013-08-22 01:56:28 +02:00
Ilya Bakulin
0031b22993 * grub-core/kern/emu/hostdisk.c: Add conditionals for OpenBSD.
* util/getroot.c: Likewise.
2013-08-21 21:05:01 +02:00
Vladimir 'phcoder' Serbinenko
54ea2f4401 * grub-core/disk/ahci.c: Add needed explicit cast.
* grub-core/lib/backtrace.c: Likewise.
	* grub-core/net/ip.c: Likewise.
	* grub-core/net/tcp.c: Likewise.
	* grub-core/net/udp.c: Likewise.
2013-08-21 21:02:14 +02:00
Vladimir 'phcoder' Serbinenko
3c601f8c81 * grub-core/lib/posix_wrap/wchar.h: Fix typo. 2013-08-21 21:01:11 +02:00
sutre@tahoe
ad1fe3f91f Always fill bootdisk info and improve check for NetBSD disklabel. 2013-08-16 19:41:33 +02:00
Vladimir 'phcoder' Serbinenko
d5c1eef106 * grub-core/lib/posix_wrap/wchar.h: Fix wchar_t and mbstate_t conflict
on NetBSD and OpenBSD.
2013-08-16 14:10:37 +02:00
Vladimir Testov
03dafa17df * grub-core/gfxmenu/gui_list.c: Baseline misplacement fixed. 2013-08-15 16:13:51 +04:00
Vladimir Testov
224a55bb07 * grub-core/gfxmenu/gui_list.c: The number of color mappings is
reduced. Inheritant options are processed during the theme loading.
2013-08-15 16:12:11 +04:00
Vladimir Testov
58ec39c6a7 * grub-core/gfxmenu/gui_list.c: Minimal width fixed. 2013-08-15 16:10:45 +04:00
Avik Sil
369508b3cb * grub-core/net/tftp.c: Send tftp ack packet before closing the socket. 2013-08-14 20:32:42 -03:00
Avik Sil
412ce9165c * grub-core/net/drivers/ieee1275/ofnet.c: Get proper mac address when using qemu. 2013-08-14 18:03:01 -03:00
Andrey Borzenkov
c6ed362a3f * grub-core/disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Remove
unused attribute from pull argument.
2013-08-14 20:52:19 +04:00
Vladimir 'phcoder' Serbinenko
f0b94ded6d * grub-core/kern/emu/misc.c (grub_device_mapper_supported): Move from
here ...
	* grub-core/kern/emu/hostdisk.c (grub_device_mapper_supported): ... to
	here.
2013-08-14 17:55:15 +02:00
Vladimir 'phcoder' Serbinenko
7c9d0c39af Fix handling of build-time grub-bin2h and grub-mkfont when doing
full Canadian cross. Tested with build=x86_64, host=arm,
	target=ppc-ieee1275.
2013-08-14 10:56:55 +02:00
Vladimir 'phcoder' Serbinenko
2af2353b0a * grub-core/kern/i386/coreboot/init.c: Fix compilation on
i386-multiboot.
2013-08-14 10:43:10 +02:00
Vladimir 'phcoder' Serbinenko
797abd0a23 * grub-core/kern/vga_init.c: Fix compilation on qemu-mips.
* grub-core/kern/mips/qemu_mips/init.c: Likewise.
2013-08-14 09:50:57 +02:00
Grégoire Sutre
418f86c659 Prevent shadowing of stdlib's devname(3) on BSD. 2013-08-12 11:49:33 +02:00
Vladimir Testov
b47434612c * docs/grub.texi: Introduce terminal window position options:
terminal-left: terminal window's left position
        terminal-top: terminal window's top position
        terminal-width: terminal window's width
        terminal-height: terminal window's height
        * grub-core/gfxmenu/theme-loader.c: Likewise.
        * include/grub/gfxmenu_view.h: Likewise.
        * po/exlude.pot: Likewise.
        * grub-core/gfxmenu/view.c: Likewise.
        Also updated minimal window size.
        Also terminal_sanity_check function has been introduced.
2013-08-08 12:55:24 +04:00
Vladimir 'phcoder' Serbinenko
748a4533f5 * grub-core/tests/checksums.h: Update (1-pixel difference in marker
position).
2013-08-02 23:19:17 +02:00
Vladimir 'phcoder' Serbinenko
a62ae90c2b * grub-core/term/gfxterm.c (grub_virtual_screen_setup): Start with
standard rather than noral color, in line with other terminals.
2013-08-02 22:58:16 +02:00
Vladimir 'phcoder' Serbinenko
4ed4139290 * grub-core/partmap/dfly.c: Simplify dprintfs for easier gettext
analysis.
2013-08-02 22:56:20 +02:00
Vladimir 'phcoder' Serbinenko
3719fbc57f * grub-core/loader/arm/linux.c: Change printf to dprintf. 2013-08-02 22:52:51 +02:00
Vladimir 'phcoder' Serbinenko
459b1d9171 * grub-core/fs/zfs/zfs.c (check_feature): Cleanup and remove
inappropriate printf.
2013-08-02 22:45:41 +02:00
Vladimir 'phcoder' Serbinenko
d65be02b89 * grub-core/commands/nativedisk.c (get_uuid): Handle
GRUB_DISK_DEVICE_UBOOTDISK_ID.
2013-07-25 16:31:18 +02:00
Vladimir Testov
ba8bc620d1 * grub-core/gfxmenu/widget-box.c: Fixed draw function. Now it takes
maximum of NW, N, NE heights instead of N's height and maximum of
       NW, W, SW widths instead of W's width. (So the box will be always
       correctly drawn)
2013-07-25 18:15:15 +04:00
Grégoire Sutre
4f0ad02936 Unbreak access to netbsd and openbsd partitions. 2013-07-20 18:06:57 +02:00
Vladimir 'phcoder' Serbinenko
bd744218c0 Fix arm-uboot compilation problem 2013-07-17 19:03:11 +02:00
Vladimir 'phcoder' Serbinenko
ae27e4d323 Merge mainline into arm 2013-07-16 18:43:43 +02:00
Vladimir 'phcoder' Serbinenko
88f8d1463f * grub-core/loader/multiboot_elfxx.c: Check eip after v2p translation
and not before.
	Reported by: Leon Drugi.
2013-07-16 18:37:44 +02:00
Vladimir 'phcoder' Serbinenko
3f42504c15 * grub-core/kern/powerpc/ieee1275/startup.S: Handle unaligned bss.
Reported by: Paulo Flabiano Smorigo.
2013-07-16 07:41:53 +02:00
Vladimir Testov
d110499b22 * grub-core/gfxmenu/gui_list.c: USe viewport when drawing strings. 2013-07-14 23:10:27 +02:00
Vladimir Testov
a8674ad37b * grub-core/gfxmenu/gui_list.c: Fix height calculation. 2013-07-14 23:02:37 +02:00
Vladimir 'phcoder' Serbinenko
286fe4b379 * grub-core/fs/zfs/zfs.c: Stylistic fixes. 2013-07-14 22:48:23 +02:00
Vladimir 'phcoder' Serbinenko
1bd57aa343 * grub-core/fs/zfs/zfs.c: Run emacs indent on file. 2013-07-14 22:45:51 +02:00
Vladimir 'phcoder' Serbinenko
b2182299a7 * grub-core/fs/zfs/zfs.c: Remove brackets around return value. 2013-07-14 22:33:39 +02:00
Andrey Borzenkov
7a87d69fcf * grub-core/net/bootp.c: Export net_* variables.
* grub-core/net/net.c: Likewise.
2013-07-14 22:59:00 +04:00
Vladimir 'phcoder' Serbinenko
795b3dc094 * grub-core/fs/zfs/zfs_lz4.c: Add missing packed attribute. 2013-07-14 16:29:33 +02:00
Vladimir 'phcoder' Serbinenko
68714c4392 * grub-core/fs/zfs/zfs.c (nvlist_next_nvpair): Fix improper cast. 2013-07-14 16:24:18 +02:00
Vladimir 'phcoder' Serbinenko
af211babd8 * grub-core/fs/zfs/zfs_lz4.c: Remove restrict keyword. 2013-07-14 16:05:14 +02:00
Massimo Maggi
0036f02d7b * grub-core/fs/zfs/zfs.c (nvlist_next_nvpair): Error is encode_size
<= 0.
2013-07-14 14:22:02 +02:00
Massimo Maggi
6d0ddff3d9 * grub-core/fs/zfs/zfs.c: Split nvpair iterators into separate
functions.
2013-07-14 14:17:36 +02:00
Massimo Maggi
038016f48a * grub-core/fs/zfs/zfs_lz4.c: New file.
* grub-core/fs/zfs/zfs.c: Tie up lz4 decompression.
2013-07-14 14:12:58 +02:00
Massimo Maggi
776bdce291 * grub-core/fs/zfs/zfs.c: Check for feature compatibility. 2013-07-14 14:10:42 +02:00
Massimo Maggi
c71dbd40a9 * grub-core/fs/zfs/zfs.c (uberblock_verify): Accept version 5000.
(check_pool_label): Likewise.
	* include/grub/zfs/zfs.h: Rewrite SPA_VERSION_* macros.
2013-07-14 14:01:27 +02:00
Massimo Maggi
53618046da * grub-core/fs/zfs/zfsinfo.c (print_vdev_info): Fix RAIDZ reporting. 2013-07-14 13:49:01 +02:00
Vladimir 'phcoder' Serbinenko
9c28da2a89 Remove early sm712 init as there is no reason for it (the "watchdog"
effect was due to wrong GPIO map).
2013-07-11 16:24:35 +02:00
Vladimir 'phcoder' Serbinenko
139072b83a * grub-core/commands/pcidump.c: Remove static variables. 2013-07-11 16:11:03 +02:00
Vladimir 'phcoder' Serbinenko
c6a61bda9b * grub-core/commands/sleep.c: Refresh screen before sleeping. 2013-07-11 16:02:22 +02:00
Vladimir 'phcoder' Serbinenko
efa8640adb * grub-core/bus/usb/usbhub.c: Fix recheck logic. 2013-07-11 14:52:46 +02:00
Vladimir 'phcoder' Serbinenko
a2371e19b3 * grub-core/normal/charset.c (bidi_line_wrap): Fix spurios warning. 2013-07-11 13:34:20 +02:00
Andrey Borzenkov
a4c89b1731 * grub-core/disk/diskfilter.c: Forgot to remove comment
from previous commit.
2013-06-16 16:35:20 +04:00
Andrey Borzenkov
5b06b53cbd * grub-core/term/gfxterm.c (grub_virtual_screen_setup): Use
grub_term_normal_color, do not hardcode GRUB_TERM_DEFAULT_NORMAL_COLOR.
2013-06-16 16:24:05 +04:00
Andrey Borzenkov
aa62a5b7f1 * grub-core/disk/diskfilter.c (scan_devices): Iteratively
rescan diskfilter devices until nothing new is found.
2013-06-16 16:12:50 +04:00
Vladimir 'phcoder' Serbinenko
4aa237c8a4 Fix casts when compiling coreboot-specific code for 64-bit EFI. 2013-06-16 04:19:38 +02:00
Vladimir 'phcoder' Serbinenko
93d8479b70 Don't try to detect cbfs on *-emu. 2013-06-16 04:06:41 +02:00
Vladimir 'phcoder' Serbinenko
837222cc30 * grub-core/term/gfxterm.c: USe right background color when scrolling. 2013-06-16 03:53:07 +02:00
Vladimir 'phcoder' Serbinenko
99c971afd3 Add support for processed coreboot payload chainloading. 2013-06-16 02:54:37 +02:00
Vladimir 'phcoder' Serbinenko
e6930a454d Enable coreboot information commands even when not loaded as
coreboot payload (e.g. when loaded from SeaBIOS-as-payload).
2013-06-16 01:57:55 +02:00
Vladimir 'phcoder' Serbinenko
5027af38cf Support for cbfs. Also factor out the part which is common
for all archives to a separate module. This splits tar from cpio
	as they are very different but keeps cpio, cpio_be, odc and newc
	together since they're very similar.
2013-06-16 00:06:13 +02:00
Vladimir 'phcoder' Serbinenko
3d84cb1793 Move flavour-specific parts out of common cpio.c file and
rename remaining to cpio_common.c
2013-06-14 20:44:59 +02:00
Andrey Borzenkov
356670f1f2 * grub-core/script/execute.c (grub_script_execute_sourcecode): Split
off new function grub_script_execute_new_scope. Change callers to use
	either of them as appropriate.
	* grub-core/commands/eval.c: New command eval.
	* docs/grub.texi (Commands): Document it.
2013-06-07 18:40:37 +02:00
Andrey Borzenkov
593e430cd6 * grub-core/script/execute.c (grub_script_execute_sourcecode): Split
off new function grub_script_execute_new_scope. Change callers to use
	either of them as appropriate.
	* grub-core/commands/eval.c: New command eval.
	* docs/grub.texi (Commands): Document it.
2013-06-07 18:36:42 +02:00
Andrey Borzenkov
63c2984922 * grub-core/kern/corecmd.c (grub_core_cmd_set): Use grub_env_get
to fetch values when listing.
2013-06-07 18:25:19 +02:00
Andrey Borzenkov
cc28411296 Fix make dist on non-pc. 2013-06-07 18:23:08 +02:00
Francesco Lavra
d60c9a81ac Fix ARM cpuid probing 2013-06-07 16:56:24 +02:00
Francesco Lavra
b8578da640 * grub-core/kern/corecmd.c (grub_core_cmd_ls): Fix handling of paths
without a device name.
2013-06-07 16:28:13 +02:00
Vladimir 'phcoder' Serbinenko
96dbe64813 * grub-core/disk/diskfilter.c (insert_array): Fix order to discover
ambigouos RAID before discovering RAIDs on top of it.
	Reported by: bodom.
2013-06-07 15:41:10 +02:00
Vladimir 'phcoder' Serbinenko
ccfc0bdb53 Fix typo (failback vs fallback). 2013-06-07 15:35:16 +02:00
Josh Triplett
e40b459617 * grub-core/normal/cmdline.c (grub_cmdline_get): Fix Ctrl-u
handling to copy the killed characters to the kill buffer as
	UCS4 stored as grub_uint32_t rather than as 8-bit characters
	stored as char.  Eliminates UCS4 truncation and corruption
	observed when killing characters with Ctrl-u and yanking them
	back with Ctrl-y.
2013-05-31 00:59:02 +02:00
Vladimir 'phcoder' Serbinenko
fc4c4fddf6 Detach optional parts of gfxterm and integrate in with coreboot init. 2013-05-31 00:42:33 +02:00
Vladimir 'phcoder' Serbinenko
6570b2050e Move blit and fill dispatcher to appropriate files to decrease export
and relocation overhead.
2013-05-30 22:06:28 +02:00
Vladimir 'phcoder' Serbinenko
b8323067e8 * grub-core/font/font.c, include/grub/font.h: Inline simple font
functions.
2013-05-30 21:58:24 +02:00
Vladimir 'phcoder' Serbinenko
3cc1878faf * grub-core/Makefile.am: Fix compilation problem with some
automake versions.
2013-05-30 21:55:18 +02:00
Vladimir 'phcoder' Serbinenko
4fd42c53f3 * grub-core/commands/acpihalt.c: Fix handling of DSDT in presence of
SSDT.
2013-05-30 21:32:01 +02:00
Vladimir 'phcoder' Serbinenko
2a800dc3f3 Remove libfdt 2013-05-17 13:58:47 +02:00
Francesco Lavra
c6a8472baf Own fdt parsing implementation 2013-05-17 13:45:22 +02:00
Vladimir 'phcoder' Serbinenko
470038745c Fix a bug and stick nearer to the specification, introduce armv6_unified. 2013-05-17 13:05:28 +02:00
Vladimir 'phcoder' Serbinenko
390df92f0b Detect cache type on runtime rather than compile time 2013-05-17 01:33:22 +02:00
Leif Lindholm
c59fe1d776 Leif's BSS fix 2013-05-16 16:30:41 +02:00
Leif Lindholm
72a21cf09b Leif's ARMv6 cache support 2013-05-16 16:23:31 +02:00
Vladimir 'phcoder' Serbinenko
5bac5d9ad6 * grub-core/partmap/dfly.c: New partition map. 2013-05-16 16:18:37 +02:00
Vladimir 'phcoder' Serbinenko
141430a295 * grub-core/lib/dtc/libfdt-grub.diff: Remove extraneous uintptr_t
declaration.
2013-05-16 16:17:05 +02:00
Radosław Szymczyszyn
1e908b34a6 * grub-core/partmap/dfly.c: New partition map. 2013-05-15 17:26:49 +02:00
Vladimir 'phcoder' Serbinenko
1359e4740a * grub-core/kern/corecmd.c (grub_core_cmd_ls): Fix empty path
checking.
	Reported by: Francesco Lavra.
2013-05-15 10:11:25 +02:00
Vladimir 'phcoder' Serbinenko
cdce14fad4 Progressively skip menu elements on small terminals rather
than crashing.
2013-05-14 08:57:18 +02:00
Vladimir 'phcoder' Serbinenko
c8d6cc3cf0 * grub-core/normal/cmdline.c (grub_cmdline_get): Fix off-by-one error
to avoid losing last column.
2013-05-14 08:54:18 +02:00
Paulo Flabiano Smorigo
a9c0b699c0 * grub-core/net/bootp.c (grub_cmd_bootp): Check if there is any card
present.
	* include/grub/err.h (grub_err_t): New enum value GRUB_ERR_NET_NO_CARD.
2013-05-11 11:25:29 +02:00
Leif Lindholm
854f383c28 Move common function to dl_helper.c 2013-05-11 10:42:11 +02:00
Vladimir 'phcoder' Serbinenko
8e71d87482 merge mainline into arm 2013-05-11 10:24:24 +02:00
Vladimir 'phcoder' Serbinenko
709ad61b07 * grub-core/tests/setjmp_test.c: Ignore missing noreturn. 2013-05-11 10:17:19 +02:00
Vladimir 'phcoder' Serbinenko
d128901ace * grub-core/fs/hfspluscomp.c (grub_hfsplus_compress_attr): Add packed
attribute since structure is not necessarily aligned.
2013-05-11 09:59:59 +02:00
Vladimir 'phcoder' Serbinenko
0f7e980b29 Redirect xasprintf to grub_xvasprintf rather than having #ifdef's
for vasprintf presence.
2013-05-10 20:57:32 +02:00
Vladimir 'phcoder' Serbinenko
0dc11c08d7 * grub-core/commands/testspeed.c: Reuse formatting string to decrease
new strings to translate.
2013-05-10 16:25:36 +02:00
Vladimir 'phcoder' Serbinenko
0ef7478b5b * grub-core/net/net.c (grub_net_open_real): Autoload network modules. 2013-05-10 14:17:10 +02:00
Vladimir 'phcoder' Serbinenko
8200fa1597 * grub-core/term/terminfo.c: Rename ANSI_C0 to ANSI_CSI to avoid
misnomer.
2013-05-10 14:07:41 +02:00
Vladimir 'phcoder' Serbinenko
0e7b2e3217 New test: cmdline and cat. 2013-05-08 11:49:25 +02:00
Vladimir 'phcoder' Serbinenko
16f7c8f6d3 * grub-core/commands/cat.c: Show UTF-8 characters. 2013-05-08 11:09:08 +02:00
Vladimir 'phcoder' Serbinenko
e56d9637ae * grub-core/term/efi/console.c: Fix compile error. 2013-05-07 20:40:00 +02:00
Vladimir 'phcoder' Serbinenko
8098f65556 Compressed HFS+ support. 2013-05-07 15:46:17 +02:00
Vladimir 'phcoder' Serbinenko
16940e077c * grub-core/commands/videoinfo.c: Use "paletted" rather than "packed
pixel".
2013-05-07 14:44:05 +02:00
Vladimir 'phcoder' Serbinenko
c5dbc13d28 Menu color test. 2013-05-07 14:38:29 +02:00
Vladimir 'phcoder' Serbinenko
011f8ae8d2 * grub-core/tests/setjmp_test.c: New test. 2013-05-07 12:28:59 +02:00
Vladimir 'phcoder' Serbinenko
2aa072d76a New variables 'net_default_*' to determine MAC/IP of default interface. 2013-05-07 12:05:36 +02:00
Vladimir 'phcoder' Serbinenko
fb2666b560 Simplify few strings. 2013-05-07 11:44:15 +02:00
Vladimir 'phcoder' Serbinenko
d22840ec12 Mark few forgotten strings for translation. 2013-05-07 11:41:47 +02:00
Vladimir 'phcoder' Serbinenko
e34092fdf1 * grub-core/loader/linux.c: Use grub_dprintf for debug statements
rather than printf.
2013-05-07 11:38:49 +02:00
Vladimir 'phcoder' Serbinenko
47cf82b461 * grub-core/video/readers/jpeg.c: Use grub_dprintf for debug statements
rather than printf.
	* grub-core/video/readers/tga.c: Likewise.
2013-05-07 11:37:11 +02:00
Vladimir 'phcoder' Serbinenko
1eed0e6ebc * tests/priority_queue_unit_test.cc: New test. 2013-05-07 11:30:48 +02:00
Vladimir 'phcoder' Serbinenko
c5b7697bbb * grub-core/font/font.c: Use grub_dprintf for debug statements rather
than printf.
2013-05-07 11:26:15 +02:00
Bean
fa2923436b * grub-core/commands/testspeed.c: New command testspeed. 2013-05-05 18:16:48 +02:00
Vladimir 'phcoder' Serbinenko
310d42144b Factor-out human-size printing. 2013-05-05 11:31:53 +02:00
Vladimir 'phcoder' Serbinenko
85002bf34a Agglomerate more mallocs to speed-up gfxterm. 2013-05-04 22:23:23 +02:00
Vladimir 'phcoder' Serbinenko
22b06e9685 Speed-up gfxterm by slightly agglomerating mallocs. 2013-05-04 15:07:13 +02:00
Vladimir 'phcoder' Serbinenko
b7c036bce3 More video checks. 2013-05-04 14:00:14 +02:00
Vladimir 'phcoder' Serbinenko
92323d1fb0 Speed-up gfxterm by saving intermediate results in index+alpha
format.
2013-05-04 13:58:30 +02:00
Vladimir 'phcoder' Serbinenko
0fb356a385 * grub-core/tests/lib/functional_test.c: Don't stop on first failed
test.
2013-05-04 13:54:08 +02:00
Vladimir 'phcoder' Serbinenko
44dea3f9a9 * grub-core/normal/menu_text.c (menu_clear_timeout): Clear second
line of timeout as it may contain the rest of long line.
2013-05-04 13:52:21 +02:00
Vladimir 'phcoder' Serbinenko
14af86e41b * grub-core/normal/main.c: Fix freed memory dereference. 2013-05-04 13:50:16 +02:00
Vladimir 'phcoder' Serbinenko
03f7c8c304 Fix several memory leaks. 2013-05-04 13:47:10 +02:00
Vladimir 'phcoder' Serbinenko
c686014c1b * grub-core/normal/menu.c (run_menu): Fix timeout reference point. 2013-05-04 13:43:07 +02:00
Vladimir 'phcoder' Serbinenko
0788a69514 * grub-core/gettext/gettext.c: Try $lang.gmo as well. 2013-05-04 13:40:52 +02:00
Vladimir 'phcoder' Serbinenko
daf01d61ff Fix test -a and -o precedence.
Reported by: adrian15.
2013-05-04 13:38:59 +02:00
Vladimir 'phcoder' Serbinenko
82ae74d7bd * grub-core/font/font.c (grub_font_construct_glyph): Fix memory leak. 2013-05-04 13:11:57 +02:00
Andrey Borzenkov
8cec7bd40b Rename grub-core/tests/checksums.c into grub-core/tests/checksums.h
and add it as source to functional_test module.
2013-05-03 18:39:17 +04:00
Leif Lindholm
b385e0723b Leif's API fixes 2013-05-03 15:07:39 +02:00
Vladimir 'phcoder' Serbinenko
aa73d688e7 * grub-core/tests/video_checksum.c: Don't set GENERATE_MODE. 2013-05-03 14:50:05 +02:00
Leif Lindholm
bb9f92b9b1 Leif's build fixes 2013-05-03 14:41:08 +02:00
Vladimir 'phcoder' Serbinenko
c104b6f93e New series of tests for gfxterm and gfxmenu. 2013-05-03 14:09:55 +02:00
Vladimir 'phcoder' Serbinenko
7391c4d5ac * grub-core/gfxmenu/gfxmenu.c (grub_gfxmenu_try): Allow specifying
the theme path relative to $prefix/themes.
2013-05-03 14:08:51 +02:00
Vladimir 'phcoder' Serbinenko
cff501187c * grub-core/video/fb/fbblit.c (grub_video_fbblit_blend_BGR888_RGBA8888):
Fix order bug.
	(grub_video_fbblit_blend_RGB888_RGBA8888): Likewise.
2013-05-03 14:07:30 +02:00
Vladimir 'phcoder' Serbinenko
a4f9a5ff92 * grub-core/gfxmenu/view.c (grub_gfxmenu_view_new): Clear
grub_gfxmenu_timeout_notifications.
	(grub_gfxmenu_view_destroy): Likewise.
2013-05-03 14:02:49 +02:00
Vladimir 'phcoder' Serbinenko
b5a2114d76 * grub-core/normal/term.c (print_ucs4_real): Fix startwidth in dry run. 2013-05-03 13:56:45 +02:00
Vladimir 'phcoder' Serbinenko
a8905e8ae8 Several fixes to ieee1275 and big-endian video. 2013-05-02 22:30:20 +02:00
Vladimir 'phcoder' Serbinenko
813c16222f Add missing exports on mips. 2013-05-02 18:10:11 +02:00
Vladimir 'phcoder' Serbinenko
3f3e7326b7 * grub-core/tests/videotest_checksum.c (videotest_checksum): Error out
if no unifont is found.
	Restore original keyboard.
2013-05-02 18:08:42 +02:00
Vladimir 'phcoder' Serbinenko
095accd14b * grub-core/loader/i386/linux.c (grub_linux_setup_video): Add
GRUB_VIDEO_ADAPTER_CAPTURE: to handled drived ids.
2013-05-02 18:06:39 +02:00
Vladimir 'phcoder' Serbinenko
5036166022 First automated video test (running videotest and comparing results) 2013-05-02 14:39:03 +02:00
Vladimir 'phcoder' Serbinenko
cd0f6eec7b * grub-core/commands/videotest.c: Reduce flickering and draw 6 squares
instead of 2 to have full RGB/CMY test pattern.
2013-05-02 14:34:13 +02:00
Vladimir 'phcoder' Serbinenko
583e5b645c * include/grub/arc/arc.h: Account for missing "other" peripheral on
ARCS. All users updated.
2013-04-30 17:40:31 +02:00
Vladimir 'phcoder' Serbinenko
aa7bcb99df * grub-core/kern/mips/loongson/init.c: Support halt for loongson 2E. 2013-04-30 17:37:37 +02:00
Vladimir 'phcoder' Serbinenko
95ef1a54cf * grub-core/partmap/amiga.c: Fix size of checksummed block. 2013-04-30 17:34:29 +02:00
Vladimir Testov
3476e0ef42 * grub-core/gfxmenu/circular_progress.c: Set start_angle in degrees
with syntax "XXX deg"/"XXX °".
2013-04-29 15:32:56 +02:00
Vladimir 'phcoder' Serbinenko
96f33fed86 Make PCI init in i386-qemu port more robust. 2013-04-29 15:09:39 +02:00
Vladimir Testov
dc5a311a1e * grub-core/gfxmenu/gui_list.c: Refresh first_shown_entry value when
cached view is reused.
	* grub-core/gfxmenu/view.c: Call the refresh procedure for all
	open boot menus.
2013-04-29 13:40:11 +02:00
Vladimir 'phcoder' Serbinenko
e2f27a8c53 Enforce disabling of firmware disk drivers when native drivers kick in. 2013-04-29 12:16:46 +02:00
Vladimir 'phcoder' Serbinenko
ef9d8cd510 * grub-core/commands/nativedisk.c: Customize the list of modules on
platform. Don't try to search for disks already using native drivers.
2013-04-29 12:14:57 +02:00
Vladimir 'phcoder' Serbinenko
f7bf6c31f3 * grub-core/bus/usb/uhci.c: Fix DMA handling and enable on all PCI
platforms.
2013-04-29 12:05:19 +02:00
Vladimir 'phcoder' Serbinenko
bdc4add8ca * grub-core/script/execute.c (grub_script_arglist_to_argv): Fix
handling of variables containing backslash.
2013-04-29 12:02:26 +02:00
Vladimir 'phcoder' Serbinenko
0e90dee8e8 * grub-core/kern/mips/arc/init.c: Fix prefix detection. 2013-04-29 11:59:18 +02:00
Vladimir 'phcoder' Serbinenko
e0aacf2433 * grub-core/lib/arg.c (grub_arg_show_help): Fix a NULL pointer
dereference.
	Reported by: qwertial.
2013-04-29 11:57:51 +02:00
Vladimir 'phcoder' Serbinenko
adb7d667fc * grub-core/commands/nativedisk.c: Ignore unknown filesystem error. 2013-04-28 18:52:53 +02:00
Vladimir 'phcoder' Serbinenko
7cd0df84f1 New command `nativedisk'. 2013-04-28 15:31:33 +02:00
Vladimir 'phcoder' Serbinenko
02adbb932d * grub-core/io/lzopio.c: Use GRUB_PROPERLY_ALIGNED_ARRAY.
* grub-core/loader/i386/bsd.c: Likewise.
2013-04-28 15:18:50 +02:00
Vladimir 'phcoder' Serbinenko
9fb0fd4f35 * grub-core/disk/ahci.c: Fix compilation for amd64 (format warnings). 2013-04-28 15:17:43 +02:00
Vladimir 'phcoder' Serbinenko
178c276419 * grub-core/kern/file.c: Use const char * rather than casting to
non-const.
2013-04-28 14:06:57 +02:00
Vladimir 'phcoder' Serbinenko
eadfad244e * grub-core/commands/probe.c: Add missing grub_device_close. 2013-04-28 13:54:32 +02:00
Vladimir 'phcoder' Serbinenko
f97ec54645 * grub-core/term/morse.c: Macroify dih and dah. 2013-04-28 13:27:51 +02:00
Vladimir 'phcoder' Serbinenko
141e2a7816 * grub-core/term/ns8250.c: Systematically probe ports by writing
to SR before using them.
2013-04-27 22:47:57 +02:00
Vladimir 'phcoder' Serbinenko
c796a107b6 * grub-core/disk/ahci.c (grub_ahci_pciinit): Fix handling of empty
ports.
2013-04-27 21:49:14 +02:00
Leon Drugi
43168646d8 * grub-core/loader/multiboot_mbi2.c (grub_multiboot_load): Fix cast in
BSS clearing.
2013-04-27 21:16:55 +02:00
Vladimir 'phcoder' Serbinenko
17f9fd29d3 Implement grub_machine_get_bootlocation for ARC. 2013-04-27 19:12:11 +02:00
Vladimir 'phcoder' Serbinenko
dc2a6c8b0e Improve AHCI detection and command issuing. 2013-04-27 17:18:02 +02:00
Vladimir 'phcoder' Serbinenko
f25a2ba6b8 Fix pseries test. 2013-04-27 14:11:12 +02:00
Vladimir 'phcoder' Serbinenko
a6393224c4 Make 'make check' work on emu. 2013-04-27 02:00:16 +02:00
Vladimir 'phcoder' Serbinenko
db99fbe83f Replace libcurses with our own vt100 handling for the ease of testing
and decreasing prerequisites.
2013-04-27 00:02:23 +02:00
Vladimir 'phcoder' Serbinenko
b24ca7cd89 * grub-core/Makefile.core.def: Fix grub-emu and grub-emu-lite sources. 2013-04-26 23:47:46 +02:00
Vladimir 'phcoder' Serbinenko
7f63a64fa0 Enable mipsel-arc. 2013-04-25 22:42:35 +02:00
Vladimir 'phcoder' Serbinenko
b04b5990df Add serial on ARC platform. 2013-04-25 22:40:03 +02:00
Vladimir 'phcoder' Serbinenko
88d2f3022e * grub-core/boot/powerpc/bootinfo.txt.in: Missing update from previous
commit.
2013-04-25 03:26:41 +02:00
Vladimir 'phcoder' Serbinenko
65a6b30b47 * grub-core/term/ieee1275/console.c (grub_console_dimensions): Ignore
bogus SLOF values.
2013-04-25 00:45:29 +02:00
Vladimir 'phcoder' Serbinenko
d1989e2e1d * grub-core/term/arc/console.c: Assume that console is 80x24 vt100 if
it's serial.
2013-04-24 18:39:00 +02:00
Vladimir 'phcoder' Serbinenko
a59a9826fd * grub-core/normal/menu_text.c (print_entry): Put an asterisk
in front of chosen entry to mark it even if highlighting is lost.
2013-04-24 15:07:24 +02:00
Vladimir 'phcoder' Serbinenko
1a40f80c98 * grub-core/loader/i386/linux.c (grub_linux_boot): Default to
gfxpayload=keep if cbfb is active.
2013-04-24 14:53:00 +02:00
Vladimir 'phcoder' Serbinenko
e343549ca9 * grub-core/disk/ata.c (grub_ata_real_open): Use grub_error properly. 2013-04-24 14:47:14 +02:00
Vladimir 'phcoder' Serbinenko
45fbd9a23f Add missing video ids to coreboot and ieee1275 video. 2013-04-24 14:44:15 +02:00
Vladimir 'phcoder' Serbinenko
cdeb832472 * grub-core/kern/dl.c (grub_dl_resolve_symbols): Handle malloc failure. 2013-04-24 13:58:31 +02:00
Vladimir 'phcoder' Serbinenko
8528c879e3 Move mips-arc link address. Previous link address was chosen
in belief that RAM on SGI platforms grows down while in fact it
	grows up from an unusual base.
2013-04-24 13:54:17 +02:00
Vladimir 'phcoder' Serbinenko
17fca5734b * grub-core/disk/arc/arcdisk.c (grub_arcdisk_iterate_iter):
Fix a type which prevented CD-ROM and floppy boot.
2013-04-21 13:06:22 +02:00
Vladimir 'phcoder' Serbinenko
d178788e71 Support coreboot framebuffer.
* grub-core/video/i386/coreboot/cbfb.c: New file.
2013-04-21 13:02:10 +02:00
Vladimir 'phcoder' Serbinenko
fe4c3e7e67 * grub-core/kern/mm.c (grub_mm_init_region): Fix condition for
detecting too small regions.
2013-04-20 17:39:49 +02:00
Vladimir 'phcoder' Serbinenko
ec2dd17919 * grub-core/Makefile.core.def (legacycfg): Enable on EFI. 2013-04-20 13:46:58 +02:00
Vladimir 'phcoder' Serbinenko
872dac835c * grub-core/lib/efi/relocator.c (grub_relocator_firmware_alloc_region):
Remove dprintf.
	* grub-core/lib/relocator.c (malloc_in_range): Likewise.
2013-04-20 13:39:04 +02:00
Vladimir 'phcoder' Serbinenko
90ec4b7f6c * grub-core/kern/ieee1275/init.c (grub_claim_heap): Improve handling
of GRUB_IEEE1275_FLAG_FORCE_CLAIM.
	* grub-core/loader/powerpc/ieee1275/linux.c
	(grub_linux_claimmap_iterate): Handle GRUB_IEEE1275_FLAG_FORCE_CLAIM.
2013-04-19 15:27:09 +02:00
Vladimir 'phcoder' Serbinenko
f32555dd93 * grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options):
Look for /boot-rom as well as /rom/boot-rom.
2013-04-19 15:14:28 +02:00
Vladimir 'phcoder' Serbinenko
386497990a * grub-core/commands/videotest.c (grub_cmd_videotest): Fix error
handling when creating text_layer failed.
	* grub-core/video/video.c (grub_video_create_render_target):
	Set result to 0 on error.
	(grub_video_delete_render_target): Do not dereference NULL.
2013-04-19 15:09:15 +02:00
Vladimir 'phcoder' Serbinenko
aeace7f71c * grub-core/kern/elfXX.c (grub_elfXX_load): Handle
GRUB_ELF_LOAD_FLAGS_30BITS and GRUB_ELF_LOAD_FLAGS_62BITS.
	* grub-core/loader/powerpc/ieee1275/linux.c (grub_linux_load32),
	(grub_linux_load64): Mask out 2 high bits.
2013-04-19 15:05:11 +02:00
Vladimir 'phcoder' Serbinenko
daaa64bd90 Add support for pseries and other bootinfo machines to grub-mkrescue.
Tested by: Paulo Flabiano Smorigo.
2013-04-19 00:36:23 +02:00
Vladimir 'phcoder' Serbinenko
b193e10034 * grub-core/disk/efi/efidisk.c: Detect floppies by ACPI ID.
It improves performance in qemu.
2013-04-17 19:05:57 +02:00
Andrey Borzenkov
284df0e263 * grub-core/disk/efi/efidisk.c: Really limit transfer chunk size. 2013-04-16 22:10:59 +02:00
Peter Jones
a7e03923fa * grub-core/disk/efi/efidisk.c: Limit disk read or write chunk to 0x500
sectors.
	Based on patch by Peter Jones.
2013-04-15 09:12:14 +02:00
Vladimir 'phcoder' Serbinenko
cbe57a487b * grub-core/kern/ieee1275/openfw.c (grub_ieee1275_devalias_next): Make
source and destination differ.
2013-04-15 00:40:19 +02:00
Vladimir 'phcoder' Serbinenko
21aecce0f9 * grub-core/disk/ieee1275/ofdisk.c: Fix CD-ROM and boot device
detection.
2013-04-15 00:38:39 +02:00
Vladimir 'phcoder' Serbinenko
25092d2922 * grub-core/lib/posix_wrap/sys/types.h: Make WORDS_BIGENDIAN definition
match config-util.h to avoid warnings and increase compatibility.
2013-04-14 19:57:15 +02:00
Vladimir 'phcoder' Serbinenko
cc2fa5ec1e * grub-core/loader/i386/linux.c: Remove useless leftover pointer. 2013-04-14 19:01:23 +02:00
Vladimir 'phcoder' Serbinenko
b49fe8792a Move GRUB out of system area when using xorriso 1.2.9 or later. 2013-04-14 18:53:14 +02:00
Vladimir 'phcoder' Serbinenko
8ca86b3a03 Support mkrescue on sparc64. 2013-04-14 17:10:55 +02:00
Vladimir 'phcoder' Serbinenko
aa1af9bbda Allow IEEE1275 ports on path even if it wasn't detected automatically.
Needed on OpenBIOS due to incomplete device tree.
2013-04-14 17:01:31 +02:00
Vladimir 'phcoder' Serbinenko
ac4fea7998 * grub-core/disk/ieee1275/ofdisk.c: Iterate over bootpath even if it
would be otherwise excluded.
2013-04-14 16:55:20 +02:00
Vladimir 'phcoder' Serbinenko
87206f2cf1 * grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options):
Inline name defines used only once.
2013-04-14 16:52:49 +02:00
Vladimir 'phcoder' Serbinenko
fe22b071dc Fix memory leaks in ofnet.
Reported by: Francesco Lavra.
2013-04-13 20:12:11 +02:00
Vladimir 'phcoder' Serbinenko
fa8058da9e Fix few memory leaks. Reported by Francesco Lavra 2013-04-13 20:07:37 +02:00
Vladimir 'phcoder' Serbinenko
bbdd6305db Handle Japanese special keys.
Reported by: Hiroyuki YAMAMORI.
	Codes supplied by: Hiroyuki YAMAMORI.
2013-04-12 22:26:38 +02:00
Vladimir 'phcoder' Serbinenko
d70dbab77a * grub-core/bus/usb/ehci.c (grub_ehci_fini_hw): Ignore errors, not
much we can do about it anyway.
2013-04-12 20:51:11 +02:00
Aleš Nesrsta
51a4c3e3b0 Fix handling of split transfers. 2013-04-12 20:42:46 +02:00
Vladimir 'phcoder' Serbinenko
92c8f58d97 * grub-core/net/http.c: Fix bad free. 2013-04-12 20:17:53 +02:00
Vladimir 'phcoder' Serbinenko
b7d17a492f * grub-core/net/drivers/ieee1275/ofnet.c: Don't attempt to send more
than buffer size.
2013-04-12 19:25:16 +02:00
Vladimir 'phcoder' Serbinenko
c86c39abef Add uboot net 2013-04-12 16:55:38 +02:00
Vladimir 'phcoder' Serbinenko
28af3d867c Relocations cleanup 2013-04-12 16:53:58 +02:00
Vladimir 'phcoder' Serbinenko
4e13e84e56 Fix timer units 2013-04-12 16:51:33 +02:00
Vladimir 'phcoder' Serbinenko
b624c94856 Simplify init assembly 2013-04-12 16:50:58 +02:00
Vladimir 'phcoder' Serbinenko
04e80baa32 Report disk size 2013-04-12 16:50:21 +02:00
Vladimir 'phcoder' Serbinenko
5121223465 Turn off QEMU ACPI-way since new releases don't have shutdown port
anymore.
2013-04-12 14:49:33 +02:00
Vladimir 'phcoder' Serbinenko
dbc56d8f0b Support i386-ieee1275 grub-mkrescue and make check on it. 2013-04-12 01:29:45 +02:00
Vladimir 'phcoder' Serbinenko
a79b8a1584 Merge powerpc grub-mkrescue flavour with common. Use xorriso HFS+
feature for it.
2013-04-11 23:15:26 +02:00
Vladimir 'phcoder' Serbinenko
053cfcddf1 Import new gnulib. 2013-04-11 21:12:46 +02:00
Vladimir 'phcoder' Serbinenko
93cd84df63 Use ACPI shutdown intests as traditional port was removed. 2013-04-11 21:09:43 +02:00
Vladimir 'phcoder' Serbinenko
49818a594a Fix missing PVs if they don't contain "interesting" LV. Closes #38677.
Fix few warining messages and leaks while on it.
2013-04-11 00:08:27 +02:00
Vladimir 'phcoder' Serbinenko
d5e2a158e1 Fix ia64-efi image generation on big-endian machines. Deduplicate
some code while on it.
	Reported by: Leif Lindholm.
2013-04-09 19:19:19 +02:00
Andrey Borzenkov
18866643f7 * grub-core/Makefile.core.def: Add kern/elfXX.c to elf module
as extra_dist.
2013-04-08 19:57:56 +02:00
Andrey Borzenkov
ca53deb88f * grub-core/term/i386/pc/console.c: Fix cursor moving algorithm. 2013-04-08 19:51:33 +02:00
Vladimir 'phcoder' Serbinenko
47043f959f * grub-core/normal/term.c: Few more fixes for menu entry editor
rendering.
	Reported by: Andrey Borzenkov <arvidjaar@gmail.com>
2013-04-08 14:35:26 +02:00
Vladimir 'phcoder' Serbinenko
73a04e69b7 merge mainline into arm 2013-04-07 18:08:00 +02:00
Vladimir 'phcoder' Serbinenko
a321606813 * grub-core/normal/term.c: Few more fixes for menu entry editor
rendering.
	Reported by: Andrey Borzenkov <arvidjaar@gmail.com>
2013-04-07 17:48:22 +02:00
Leif Lindholm
389b31cd71 Initial import of Leif's work 2013-04-07 02:41:07 +02:00
Vladimir 'phcoder' Serbinenko
eeada7b1da Use GRUB_PROPERLY_ALIGNED_ARRAY in grub-core/disk/cryptodisk.c and
grub-core/disk/geli.c.
2013-04-05 13:26:10 +02:00
Vladimir 'phcoder' Serbinenko
de73de1748 * grub-core/commands/acpi.c: Use sizeof rather than hardcoding the size. 2013-04-05 11:01:19 +02:00
Vladimir 'phcoder' Serbinenko
1865baa72c Replace 8 with GRUB_CHAR_BIT in several places when appropriate. 2013-04-05 10:59:26 +02:00
Vladimir 'phcoder' Serbinenko
ce7d92a9f2 Add new defines GRUB_RSDP_SIGNATURE_SIZE and GRUB_RSDP_SIGNATURE. 2013-04-05 10:56:43 +02:00
Vladimir 'phcoder' Serbinenko
52eab6562d * grub-core/commands/verify.c: Use GRUB_CHAR_BIT. 2013-04-05 10:52:13 +02:00
Peter Jones
efe0cddae8 * grub-core/disk/efi/efidisk.c: Handle partitions on non-512B disks.
Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2013-04-04 10:35:50 +02:00
Vladimir 'phcoder' Serbinenko
f75835bdad Use TSC as a possible time source on i386-ieee1275. 2013-04-04 09:55:44 +02:00
Vladimir 'phcoder' Serbinenko
2cd5ce6cdb * grub-core/bus/usb/usbtrans.c (grub_usb_bulk_readwrite_packetize):
Init err.
2013-04-04 08:56:45 +02:00
Vladimir 'phcoder' Serbinenko
be00894104 * grub-core/lib/posix_wrap/locale.h [GRUB_UTIL]: Include host locale.h. 2013-04-04 08:54:02 +02:00
Vladimir 'phcoder' Serbinenko
1a78d573c7 * grub-core/commands/verify.c: Save verified file to avoid it being
tampered with after verification was done.
2013-04-03 17:32:33 +02:00
Vladimir 'phcoder' Serbinenko
db8ff59f61 * grub-core/term/i386/pc/console.c (grub_console_getwh): Decrease
reported width by one to compensate for curesor algorithm problem.
2013-04-03 15:21:51 +02:00
Vladimir 'phcoder' Serbinenko
91bf46b188 Fix screen corruption in menu entry editor and simplify the code
flow while on it.
2013-04-03 15:19:34 +02:00
Vladimir Testov
07f392ebef * grub-core/gfxmenu/gui_progress_bar.c: Handle padding sizes. 2013-04-03 09:34:08 +02:00
Vladimir Testov
c3578acfbb * grub-core/gfxmenu/gui_circular_progress.c: Take both width and height
into account when calculating radius.
2013-04-03 09:20:29 +02:00
Vladimir Testov
9efd73ec66 * grub-core/gfxmenu/view.c: Fix off-by-one error. 2013-04-03 08:53:58 +02:00
Vladimir Testov
4985ddaa7a * grub-core/gfxmenu/gui_circular_progress.c: Fix off-by-one error. 2013-04-03 08:51:13 +02:00
Radosław Szymczyszyn
8c3635ff24 * grub-core/partmap/apple.c (apple_partition_map_iterate): Add
missing closing bracket.
2013-04-01 02:58:47 +02:00
Andrey Borzenkov
40f1c0007c * grub-core/commands/verify.c: Fix hash algorithms values for
the first three hashes - they start with 1, not with 0.
2013-04-01 01:43:04 +02:00
Vladimir 'phcoder' Serbinenko
e75fdee420 * grub-core/kern/efi/mm.c (grub_efi_finish_boot_services):
Try terminating EFI services several times due to quirks in some
	implementations.
2013-03-26 11:34:56 +01:00
Colin Watson
33028f4c0b * grub-core/commands/acpihalt.c (skip_ext_op): Add support for
skipping Event, Device, Processor, PowerRes, ThermalZone, and
	  BankField extended opcodes.
	  (get_sleep_type): Add minimal scope handling (just enough to
	  handle setting the scope to the root path).
	  (grub_acpi_halt): Parse any SSDTs as well as the DSDT.
	* include/grub/acpi.h: Add enumeration values for Event, Device,
	  Processor, PowerRes, ThermalZone, and BankField extended opcodes.
2013-03-26 11:29:52 +01:00
Vladimir Testov
33871a10a8 * grub-core/gfxmenu/font.c (grub_font_get_string_width): Fix
memory leak.
2013-03-26 08:26:01 +01:00
Vladimir 'phcoder' Serbinenko
8990963a7f * grub-core/disk/ahci.c: Give more time for AHCI request. 2013-03-25 10:32:56 +01:00
Vladimir 'phcoder' Serbinenko
daae8f9e6d * grub-core/normal/menu.c: Wait if there were errors shown at "boot"
command.
2013-03-25 10:32:06 +01:00
Vladimir 'phcoder' Serbinenko
6a7fb94bfb Replace the region at 0 from coreboot tables to available in BSD
memory map.
2013-03-25 10:23:04 +01:00
Vladimir 'phcoder' Serbinenko
30d6b1b290 * grub-core/Makefile.core.def (vga): Disable on coreboot and multiboot
platforms.
2013-03-24 14:01:51 +01:00
Vladimir 'phcoder' Serbinenko
23c9cc0490 * grub-core/Makefile.core.def (vbe): Disable on coreboot and multiboot
platforms.
2013-03-24 13:07:51 +01:00
Vladimir 'phcoder' Serbinenko
ce50dbd746 Add new 'proc' filesystem framework and put luks_script into it. 2013-03-24 13:05:59 +01:00
Vladimir 'phcoder' Serbinenko
d975e8d59c * grub-core/term/at_keyboard.c: Increase robustness on coreboot
and qemu.
2013-03-23 16:54:36 +01:00
Vladimir 'phcoder' Serbinenko
e73ba5e8ca * grub-core/fs/zfs/zfs.c: Fix incorrect handling of special volumes. 2013-03-22 22:18:38 +01:00
Vladimir 'phcoder' Serbinenko
92750e4c60 Add ability to generate newc additions on runtime. 2013-03-22 21:01:28 +01:00
Vladimir 'phcoder' Serbinenko
0ec45a682c * grub-core/commands/i386/coreboot/cbls.c: Fix typos and wrong
description.
2013-03-22 14:06:48 +01:00
Vladimir 'phcoder' Serbinenko
d7a6506e30 * grub-core/commands/verify.c (hashes): Add several hashes
from the spec.
2013-03-20 17:24:39 +01:00
Vladimir 'phcoder' Serbinenko
8fe05def12 Slight improve in USB-related boot-time checkpoints. 2013-03-20 17:21:13 +01:00
Vladimir 'phcoder' Serbinenko
524e2766d8 * grub-core/commands/boottime.c: Fix copyright header. 2013-03-20 17:16:35 +01:00
Vladimir 'phcoder' Serbinenko
cc19857a2a New commands cbmemc, lscoreboot, coreboot_boottime to inspect
coreboot tables content. Support for cbmemc.
2013-03-20 17:13:31 +01:00
Vladimir 'phcoder' Serbinenko
ef8810e9f3 Fix a conflict between ports structures with 2 controllers of
same kind.
2013-03-20 17:07:08 +01:00
Vladimir 'phcoder' Serbinenko
f6df57d216 Initialize USB ports in parallel to speed-up boot. 2013-03-19 23:06:44 +01:00
Vladimir 'phcoder' Serbinenko
d745dda77e Fix USB devices not being detected when requested
due to delayed attach.
2013-03-19 20:35:21 +01:00
Vladimir 'phcoder' Serbinenko
e744219bb6 Implement boot time analysis framework. 2013-03-19 20:25:09 +01:00
Vladimir 'phcoder' Serbinenko
e5a2dd7b55 remove get_endpoint_descriptor and change all functions needing
descriptor to just receive it as argument rather than endpoint
	address.
2013-03-19 11:19:36 +01:00
Vladimir 'phcoder' Serbinenko
5dd6f58789 Better estimate the maximum USB transfer size. 2013-03-19 08:17:51 +01:00
Vladimir 'phcoder' Serbinenko
2f1071d57e Resend a packet if we got the wrong buffer in status. 2013-03-17 13:33:16 +01:00
Vladimir 'phcoder' Serbinenko
46ecfc49b6 * grub-core/loader/i386/bsdXX.c (grub_openbsd_find_ramdisk): Use
multiplication rather than division.
2013-03-10 20:37:41 +01:00
Vladimir 'phcoder' Serbinenko
ea811130ea * grub-core/lib/arg.c (grub_arg_list_alloc): Use shifts rather
than divisions.
2013-03-10 20:08:15 +01:00
Vladimir 'phcoder' Serbinenko
d2789cf0b8 * grub-core/commands/verify.c (grub_verify_signature): Use unsigned
operations to have intended shifts and not divisions.
2013-03-10 19:39:14 +01:00
Vladimir 'phcoder' Serbinenko
a9c94590dd * grub-core/loader/i386/pc/plan9.c (fill_disk): Fix types to use
intended shifts rather than division.
2013-03-10 19:27:50 +01:00
Vladimir 'phcoder' Serbinenko
21344ef620 * grub-core/video/i386/pc/vbe.c
(grub_video_vbe_print_adapter_specific_info): Replace division by
	shifts.
2013-03-10 18:49:05 +01:00
Vladimir 'phcoder' Serbinenko
3f2b4d1a81 Adjust types in gdb module to have intended unsigned shifts rather than
signed divisions.
2013-03-10 18:36:39 +01:00
Vladimir 'phcoder' Serbinenko
3dac5878ec * grub-core/fs/hfs.c (grub_hfs_read_file): Avoid divmod64 since the
maximum size is 4G - 1 on hfs
2013-03-10 18:27:53 +01:00
Vladimir 'phcoder' Serbinenko
5341c0fbfc Avoid costly 64-bit division in grub_get_time_ms on most platforms. 2013-03-10 17:45:38 +01:00
Vladimir 'phcoder' Serbinenko
fc3ff2a2ad * grub-core/fs/fshelp.c (grub_fshelp_log2blksize): Remove now unused
function.
2013-03-10 14:27:04 +01:00
Andrey Borzenkov
81455e8e7a * grub-core/fs/iso9660.c (add_part): Remove always_inline attribute
causing gcc error with gcc 4.7.1.
2013-03-07 09:11:36 +01:00
Nickolai Zeldovich
efd4f11754 * grub-core/commands/acpi.c (grub_acpi_create_ebda): Don't
dereference null pointer. While the code is technically correct, gcc
	may eliminate a null check if pointer is already dereferenced.
2013-03-07 08:52:29 +01:00
Nickolai Zeldovich
e11645f434 * grub-core/normal/crypto.c (read_crypto_list): Fix incorrect
OOM check.
	* grub-core/normal/term.c (read_terminal_list): Likewise.
2013-03-07 08:41:27 +01:00
Vladimir 'phcoder' Serbinenko
774683685f Lift up core size limits on some platforms. Fix potential memory
corruption with big core on small memory systems. Document remaining
	limits.
2013-03-07 08:17:24 +01:00
Vladimir 'phcoder' Serbinenko
f6b58fe538 * grub-core/term/terminfo.c (grub_terminfo_cls): Issue an explicit
gotoxy to 0,0.
2013-03-05 20:00:51 +01:00
Vladimir 'phcoder' Serbinenko
19ce697dfd Remove all trampoline support. Add -Wtrampolines when
present. Remove symbols used for trampolines to make
	link fail if trampolines are present.
2013-03-03 15:57:30 +01:00
Vladimir 'phcoder' Serbinenko
73b5d90fe2 * grub-core/script/execute.c (grub_script_arglist_to_argv): Move
append out of its parent.
2013-03-03 15:26:29 +01:00
Vladimir 'phcoder' Serbinenko
cb758e96cc * grub-core/commands/regexp.c (set_matches): Move setvar out of its
parent.
2013-03-03 15:24:02 +01:00
Vladimir 'phcoder' Serbinenko
3188131f72 * grub-core/kern/env.c, include/grub/env.h: Change iterator through
all vars to a macro. All users updated.
2013-03-03 01:34:27 +01:00
Vladimir 'phcoder' Serbinenko
e42b251403 * grub-core/disk/ieee1275/nand.c: Fix compilation on
i386-ieee1275.
2013-03-03 01:30:55 +01:00
Vladimir 'phcoder' Serbinenko
6e4146c41e Move to more hookless approach in IEEE1275 devices handling. 2013-03-02 23:51:19 +01:00
Vladimir 'phcoder' Serbinenko
99fcda8a7b * grub-core/kern/term.c (grub_term_normal_color),
(grub_term_highlight_color): Add back lost defaults.
2013-03-02 23:23:51 +01:00
Vladimir 'phcoder' Serbinenko
73bf57e2c8 Make elfload not use hooks. Opt for flags and iterators instead. 2013-03-02 16:45:57 +01:00
Vladimir 'phcoder' Serbinenko
7f8c105f61 * grub-core/lib/ia64/longjmp.S: Fix the name of longjmp function.
* grub-core/lib/ia64/setjmp.S: Fix the name of setjmp function.
2013-03-02 15:31:17 +01:00
Vladimir 'phcoder' Serbinenko
396d4091e7 * grub-core/script/execute.c (gettext_append): Remove nested functions. 2013-03-02 12:17:52 +01:00
Vladimir 'phcoder' Serbinenko
19e29ee1a9 * grub-core/normal/charset.c (grub_bidi_logical_to_visual): Add
hook pass-through parameter. All users updated and unnested.
2013-03-02 11:47:59 +01:00
Vladimir 'phcoder' Serbinenko
74a2742144 * grub-core/commands/loadenv.c (grub_cmd_list_env): Move print_var
out of its parent.
2013-03-02 11:45:01 +01:00
Vladimir 'phcoder' Serbinenko
b46d4213d5 * grub-core/fs/hfs.c: Remove nested functions. 2013-03-02 11:31:00 +01:00
Vladimir 'phcoder' Serbinenko
e114c3cc54 * grub-core/fs/hfsplus.c (grub_hfsplus_btree_iterate_node): Pass
the context through.
	(grub_hfsplus_iterate_dir): Move nested function out of its parent.
2013-03-01 14:02:27 +01:00
Vladimir 'phcoder' Serbinenko
ca9c260868 * grub-core/kern/emu/hostdisk.c (read_device_map): Remove nested
function.
2013-03-01 13:46:24 +01:00
Vladimir 'phcoder' Serbinenko
5d983f5fc2 * grub-core/gentrigtables.c: Make tables const. 2013-03-01 11:15:09 +01:00
Vladimir 'phcoder' Serbinenko
3056d3e752 Remove nested functions from videoinfo iterators. 2013-03-01 11:11:36 +01:00
Vladimir 'phcoder' Serbinenko
e230377407 * grub-core/loader/i386/pc/linux.c (grub_cmd_linux): Fix compilation
for 64-bit platforms.
2013-03-01 10:39:41 +01:00
Vladimir 'phcoder' Serbinenko
f42e3a2f67 * grub-core/disk/efi/efidisk.c: Transform iterate_child_devices into
a FOR_CHILDREN macro.
2013-03-01 10:37:11 +01:00
Vladimir 'phcoder' Serbinenko
be174e5ef3 * grub-core/kern/main.c (grub_set_prefix_and_root): Strip trailing
platform from firmware path.
2013-03-01 10:35:51 +01:00
Vladimir 'phcoder' Serbinenko
0789b67232 Enable linux16 on non-BIOS systems for i.a. memtest.
* grub-core/loader/i386/pc/linux.c (grub_cmd_linux): Handle hole at 0
	correctly.
	* grub-core/Makefile.core.def (linux16): Enable on all x86 flavours.
2013-02-28 22:48:41 +01:00
Vladimir 'phcoder' Serbinenko
005a9c32df * grub-core/kern/i386/coreboot/mmap.c (grub_linuxbios_table_iterate):
Fix end of table condition.
2013-02-28 13:16:39 +01:00
Vladimir 'phcoder' Serbinenko
ff2b3cd928 * grub-core/lib/arg.c (grub_arg_show_help): Move showargs
out of its parent.
2013-02-28 11:00:59 +01:00
Vladimir 'phcoder' Serbinenko
4fc40ff8f3 * grub-core/fs/jfs.c: Remove nested functions. 2013-02-28 10:51:32 +01:00
Vladimir 'phcoder' Serbinenko
be42d97a79 * grub-core/fs/minix.c: Remove nested functions. 2013-02-28 10:50:01 +01:00
Vladimir 'phcoder' Serbinenko
99373ce472 * grub-core/fs/iso9660.c: Remove nested functions. 2013-02-28 10:30:35 +01:00
Vladimir 'phcoder' Serbinenko
5aec2afe2f * grub-core/commands/parttool.c (grub_cmd_parttool): Move show_help out
of parent function.
2013-02-28 09:43:25 +01:00
Vladimir 'phcoder' Serbinenko
43c918828d * grub-core/loader/machoXX.c: Remove nested functions. 2013-02-27 20:56:23 +01:00
Colin Watson
4eb8b75659 Remove nested functions from disk and file read hooks.
* include/grub/disk.h (grub_disk_read_hook_t): New type.
	(struct grub_disk): Add read_hook_data member.
	* include/grub/file.h (struct grub_file): Likewise.
	* include/grub/fshelp.h (grub_fshelp_read_file): Add read_hook_data
	argument.

	Update all callers.
2013-02-27 17:19:15 +01:00
Andrey Borzenkov
df6da5a52d * grub-core/partmap/msdos.c (grub_partition_msdos_iterate):
Fix off by one error in enumerating extended partitions.
2013-02-27 10:02:39 +01:00
Andrey Borzenkov
21aecde5f6 * grub-core/disk/efi/efidisk.c(grub_efidisk_get_device_name): Fix
memory leak if device name is not found.
2013-02-26 22:45:00 +01:00
Andrey Borzenkov
f1a19118e5 * grub-core/normal/menu_entry.c (update_screen): remove
unused variable `off' which caused scroll down arrow to be always shown.
2013-02-25 22:53:40 +01:00
Andrey Borzenkov
958bfd2067 * grub-core/normal/menu_entry.c (insert_string): fix off by one
access to unallocated memory.
2013-02-25 22:42:25 +01:00
Andrey Borzenkov
b7b78edb1c * Makefile.util.def: Add partmap/msdos.c to common library.
* include/grub/msdos_partition.h: Add GRUB_PC_PARTITION_TYPE_LDM
	* grub-core/disk/ldm.c: Check for existence of
	GRUB_PC_PARTITION_TYPE_LDM.
2013-02-25 22:11:06 +01:00
Vladimir 'phcoder' Serbinenko
28d468d6f2 * grub-core/normal/misc.c (grub_normal_print_device_info): Use KiB to display
sizes and display sector size.
2013-02-25 10:45:19 +01:00
Vladimir 'phcoder' Serbinenko
d55ffb0249 Implement new command cmosdump. 2013-02-24 19:44:17 +01:00
Vladimir 'phcoder' Serbinenko
b5ea6ce03a Support Openfirmware disks with non-512B sectors.
* grub-core/disk/ieee1275/ofdisk.c (grub_ofdisk_open): Get the block
	size of the disk.
	* (grub_ofdisk_get_block_size): New function.
	* (grub_ofdisk_prepare): Use the correct block size.
	* (grub_ofdisk_read): Likewise.
	* (grub_ofdisk_write): Likewise.
	* include/grub/ieee1275/ofdisk.h (grub_ofdisk_get_block_size):
	New proto.
2013-02-19 09:10:26 +01:00
Vladimir 'phcoder' Serbinenko
cc0e476fe8 * grub-core/commands/lsacpi.c: Fix types on 64-bit platform. 2013-02-06 17:37:29 +01:00
Vladimir 'phcoder' Serbinenko
c5dbdc3357 * grub-core/disk/cryptodisk.c (grub_cryptodisk_scan_device): Don't stop
on first error.
2013-02-04 15:36:03 +01:00
Vladimir 'phcoder' Serbinenko
3f078c0fca * grub-core/fs/fshelp.c (find_file): Set oldnode to zero after
freeing it.
2013-02-01 21:51:09 +01:00
Vladimir 'phcoder' Serbinenko
66a93674b2 Implement USBDebug (full USB stack variant). 2013-02-01 21:49:29 +01:00
Vladimir 'phcoder' Serbinenko
c9f0c1346e * grub-core/commands/lsacpi.c: Show more info. Hide some boring parts
unless they have unexpected values.
2013-02-01 21:45:39 +01:00
Vladimir 'phcoder' Serbinenko
cfe1288b8d * grub-core/bus/usb/usb.c (grub_usb_device_attach): Add missing
grub_print_error.
2013-02-01 21:43:49 +01:00
Vladimir 'phcoder' Serbinenko
e42b99698c * grub-core/bus/usb/serial/common.c (grub_usbserial_attach): Fix missing
zero-out of port structure.
2013-02-01 21:32:17 +01:00
Vladimir 'phcoder' Serbinenko
cf94fd6209 * grub-core/fs/xfs.c (grub_xfs_read_block): Fix computation in presence
of extended attributes.
2013-01-30 09:22:43 +01:00
Vladimir 'phcoder' Serbinenko
af18fdb4df * grub-core/normal/menu_text.c (grub_menu_init_page): Fix behaviour
when menu highlight color isn't set.
2013-01-27 16:12:05 +01:00
C. Masloch
08bcec5020 Improve FreeDOS direct loading support compatibility.
* include/grub/i386/relocator.h (grub_relocator16_state):
	New member ebp.
	* grub-core/lib/i386/relocator.c (grub_relocator16_ebp): New extern
	variable.
	(grub_relocator16_boot): Handle %ebp.
	* grub-core/lib/i386/relocator16.S: Likewise.
	* grub-core/loader/i386/pc/freedos.c:
	Load BPB to pass kernel which partition to load from.
	Check that kernel file is not too large.
	Set register dl to BIOS unit number as well.
2013-01-27 16:07:25 +01:00
Vladimir 'phcoder' Serbinenko
e661c180ea * grub-core/lib/libgcrypt_wrap/cipher_wrap.h: Include sys/types.h rather
than defining WORDS_BIGENDIAN manually.
2013-01-22 07:46:29 +01:00
Colin Watson
d44892fed9 * grub-core/font/font.c (blit_comb: do_blit): Make static instead of
nested.
(blit_comb: add_device_width): Likewise.
2013-01-21 21:03:26 +00:00
Colin Watson
5fdbaed168 Remove nested functions from USB iterators.
* include/grub/usb.h (grub_usb_iterate_hook_t): New type.
(grub_usb_controller_iterate_hook_t): Likewise.
(grub_usb_iterate): Add hook_data argument.
(grub_usb_controller_iterate): Likewise.
(struct grub_usb_controller_dev.iterate): Likewise.

Update all implementations and callers.
2013-01-21 21:02:24 +00:00
Vladimir 'phcoder' Serbinenko
18288f17ac Improve spkmodem reliability by adding a separator between bytes. 2013-01-21 21:05:33 +01:00
Vladimir 'phcoder' Serbinenko
ec5010a3eb Improve spkmomdem reliability by adding a separator between bytes. 2013-01-21 20:03:15 +01:00
Vladimir 'phcoder' Serbinenko
bc1369732f Make color variables global instead of it being per-terminal. 2013-01-21 17:53:41 +01:00
Vladimir 'phcoder' Serbinenko
7d8848f363 * grub-core/commands/ls.c (grub_ls_print_devices): Add missing
asterisk.
2013-01-21 17:46:24 +01:00
Colin Watson
ed12a00309 Fix powerpc and sparc64 build failures caused by un-nesting memory
map iterators.
2013-01-21 14:41:06 +00:00
Colin Watson
6a0db4492c * grub-core/disk/arc/arcdisk.c (grub_arcdisk_iterate): Fix
parameter declarations.
2013-01-21 13:59:28 +00:00
Vladimir 'phcoder' Serbinenko
ccd86b215f * grub-core/commands/lsmmap.c: Fix unused variable on emu. 2013-01-21 14:57:35 +01:00
Colin Watson
115c2cc180 * grub-core/partmap/msdos.c (embed_signatures): Add the signature of
an Acer registration utility with several sightings in the wild.
Reported by: Rickard Westman.  Fixes Ubuntu bug #987022.
2013-01-21 11:10:25 +00:00
Colin Watson
fc524edf65 Remove nested functions from filesystem directory iterators.
* include/grub/fs.h (grub_fs_dir_hook_t): New type.
(struct grub_fs.dir): Add hook_data argument.

Update all implementations and callers.
2013-01-21 01:33:46 +00:00
Colin Watson
6a0debbd91 * grub-core/loader/i386/linux.c (grub_cmd_initrd): Don't add the
initrd size to addr_min, since the initrd will be allocated after
this address.
2013-01-20 23:03:35 +00:00
Vladimir 'phcoder' Serbinenko
b879aa7b47 Split long USB transfers into short ones. 2013-01-20 22:45:53 +01:00
Colin Watson
6c724b85b4 Remove nested functions from ELF iterators. 2013-01-20 15:54:09 +00:00
Colin Watson
25239370fd Remove nested functions from device iterators.
* include/grub/arc/arc.h (grub_arc_iterate_devs_hook_t): New type.
(grub_arc_iterate_devs): Add hook_data argument.
* include/grub/ata.h (grub_ata_dev_iterate_hook_t): New type.
(struct grub_ata_dev.iterate): Add hook_data argument.
* include/grub/device.h (grub_device_iterate_hook_t): New type.
(grub_device_iterate): Add hook_data argument.
* include/grub/disk.h (grub_disk_dev_iterate_hook_t): New type.
(struct grub_disk_dev.iterate): Add hook_data argument.
(grub_disk_dev_iterate): Likewise.
* include/grub/gpt_partition.h (grub_gpt_partition_map_iterate):
Likewise.
* include/grub/msdos_partition.h (grub_partition_msdos_iterate):
Likewise.
* include/grub/partition.h (grub_partition_iterate_hook_t): New
type.
(struct grub_partition_map.iterate): Add hook_data argument.
(grub_partition_iterate): Likewise.
* include/grub/scsi.h (grub_scsi_dev_iterate_hook_t): New type.
(struct grub_scsi_dev.iterate): Add hook_data argument.

Update all callers.
2013-01-20 15:52:15 +00:00
Colin Watson
6c0314d638 Fix typos for "developer" and "development". 2013-01-20 13:24:47 +00:00
Vladimir 'phcoder' Serbinenko
17334a6b6a Rewrite spkmodem to use PIT for timing. Double the speed. 2013-01-17 20:06:52 +01:00
Vladimir 'phcoder' Serbinenko
7d462559da Add new command pcidump. 2013-01-16 20:44:11 +01:00
Vladimir 'phcoder' Serbinenko
b78d6c32e3 New terminal outputs using serial: morse and spkmodem. 2013-01-16 20:39:54 +01:00
Vladimir 'phcoder' Serbinenko
34f71cb866 Improve bidi handling in entry editor. 2013-01-16 13:41:16 +01:00
Vladimir 'phcoder' Serbinenko
4542e71b8b * grub-core/script/lexer.c (grub_script_lexer_init): Rename getline
argument to prevent name collision.
2013-01-16 09:06:11 +01:00
Colin Watson
09fd6d8293 Remove nested functions from script reading and parsing.
* grub-core/kern/parser.c (grub_parser_split_cmdline): Add
getline_data argument, passed to getline.
* grub-core/kern/rescue_parser.c (grub_rescue_parse_line): Add
getline_data argument, passed to grub_parser_split_cmdline.
* grub-core/script/lexer.c (grub_script_lexer_yywrap): Pass
lexerstate->getline_data to lexerstate->getline.
(grub_script_lexer_init): Add getline_data argument, saved in
lexerstate->getline_data.
* grub-core/script/main.c (grub_normal_parse_line): Add getline_data
argument, passed to grub_script_parse.
* grub-core/script/script.c (grub_script_parse): Add getline_data
argument, passed to grub_script_lexer_init.
* include/grub/parser.h (grub_parser_split_cmdline): Update
prototype.  Update all callers to pass appropriate getline data.
(struct grub_parser.parse_line): Likewise.
(grub_rescue_parse_line): Likewise.
* include/grub/reader.h (grub_reader_getline_t): Add void *
argument.
* include/grub/script_sh.h (struct grub_lexer_param): Add
getline_data member.
(grub_script_parse): Update prototype.  Update all callers to pass
appropriate getline data.
(grub_script_lexer_init): Likewise.
(grub_normal_parse_line): Likewise.

* grub-core/commands/legacycfg.c (legacy_file_getline): Add unused
data argument.
* grub-core/kern/parser.c (grub_parser_execute: getline): Make
static instead of nested.  Rename to ...
(grub_parser_execute_getline): ... this.
* grub-core/kern/rescue_reader.c (grub_rescue_read_line): Add unused
data argument.
* grub-core/normal/main.c (read_config_file: getline): Make static
instead of nested.  Rename to ...
(read_config_file_getline): ... this.
(grub_normal_read_line): Add unused data argument.
* grub-core/script/execute.c (grub_script_execute_sourcecode:
getline): Make static instead of nested.  Rename to ...
(grub_script_execute_sourcecode_getline): ... this.
* util/grub-script-check.c (main: get_config_line): Make static
instead of nested.
2013-01-15 12:03:25 +00:00
Colin Watson
d0d4b8a063 Remove nested functions from memory map iterators.
* grub-core/efiemu/mm.c (grub_efiemu_mmap_iterate): Add hook_data
argument, passed to hook.
* grub-core/kern/i386/coreboot/mmap.c
(grub_linuxbios_table_iterate): Likewise.
(grub_machine_mmap_iterate: iterate_linuxbios_table): Make static
instead of nested.
(grub_machine_mmap_iterate): Add hook_data argument.
* grub-core/kern/i386/multiboot_mmap.c (grub_machine_mmap_iterate):
Add hook_data argument, passed to hook.
* grub-core/kern/i386/pc/mmap.c (grub_machine_mmap_iterate):
Likewise.
* grub-core/kern/i386/qemu/mmap.c (grub_machine_mmap_iterate):
Likewise.
* grub-core/kern/ieee1275/mmap.c (grub_machine_mmap_iterate):
Likewise.
* grub-core/kern/mips/arc/init.c (grub_machine_mmap_iterate):
Likewise.
* grub-core/kern/mips/loongson/init.c (grub_machine_mmap_iterate):
Likewise.
* grub-core/kern/mips/qemu_mips/init.c (grub_machine_mmap_iterate):
Likewise.
* grub-core/mmap/efi/mmap.c (grub_efi_mmap_iterate): Likewise.
(grub_machine_mmap_iterate): Likewise.
* grub-core/mmap/mmap.c (grub_mmap_iterate): Likewise.
* include/grub/efiemu/efiemu.h (grub_efiemu_mmap_iterate): Update
prototype.
* include/grub/memory.h (grub_memory_hook_t): Add data argument.
Remove NESTED_FUNC_ATTR from here and from all users.
(grub_mmap_iterate): Update prototype.
(grub_efi_mmap_iterate): Update prototype.  Update all callers to
pass appropriate hook data.
(grub_machine_mmap_iterate): Likewise.

* grub-core/commands/acpi.c (grub_acpi_create_ebda: find_hook): Make
static instead of nested.
* grub-core/commands/lsmmap.c (grub_cmd_lsmmap: hook): Likewise.
Rename to ...
(lsmmap_hook): ... this.
* grub-core/efiemu/mm.c (grub_efiemu_mmap_init: bounds_hook):
Likewise.
(grub_efiemu_mmap_fill: fill_hook): Likewise.
* grub-core/kern/i386/coreboot/init.c (grub_machine_init:
heap_init): Likewise.
* grub-core/kern/i386/pc/init.c (grub_machine_init: hook): Likewise.
Rename to ...
(mmap_iterate_hook): ... this.
* grub-core/kern/ieee1275/init.c (grub_claim_heap: heap_init):
Likewise.
* grub-core/lib/ieee1275/relocator.c
(grub_relocator_firmware_get_max_events: count): Likewise.
(grub_relocator_firmware_fill_events: fill): Likewise.  Rename
to ...
(grub_relocator_firmware_fill_events_iter): ... this.
* grub-core/lib/relocator.c (grub_relocator_alloc_chunk_align:
hook): Likewise.  Rename to ...
(grub_relocator_alloc_chunk_align_iter): ... this.
* grub-core/loader/i386/bsd.c (generate_e820_mmap: hook): Likewise.
Rename to ...
(generate_e820_mmap_iter): ... this.
* grub-core/loader/i386/linux.c (find_mmap_size: hook): Likewise.
Rename to ...
(count_hook): ... this.
(grub_linux_boot: hook): Likewise.  Rename to ...
(grub_linux_boot_mmap_find): ... this.
(grub_linux_boot: hook_fill): Likewise.  Rename to ...
(grub_linux_boot_mmap_fill): ... this.
* grub-core/loader/i386/multiboot_mbi.c (grub_fill_multiboot_mmap:
hook): Likewise.  Rename to ...
(grub_fill_multiboot_mmap_iter): ... this.
* grub-core/loader/multiboot.c (grub_get_multiboot_mmap_count:
hook): Likewise.  Rename to ...
(count_hook): ... this.
* grub-core/loader/multiboot_mbi2.c (grub_fill_multiboot_mmap:
hook): Likewise.  Rename to ...
(grub_fill_multiboot_mmap_iter): ... this.
* grub-core/loader/powerpc/ieee1275/linux.c
(grub_linux_claimmap_iterate: alloc_mem): Likewise.
* grub-core/loader/sparc64/ieee1275/linux.c (alloc_phys: choose):
Likewise.  Rename to ...
(alloc_phys_choose): ... this.
(determine_phys_base: get_physbase): Likewise.
* grub-core/mmap/i386/mmap.c (grub_mmap_malign_and_register:
find_hook): Likewise.
* grub-core/mmap/i386/pc/mmap.c (preboot: fill_hook): Likewise.
(malloc_hook: count_hook): Likewise.
* grub-core/mmap/i386/uppermem.c (grub_mmap_get_lower: hook):
Likewise.  Rename to ...
(lower_hook): ... this.
(grub_mmap_get_upper: hook): Likewise.  Rename to ...
(upper_hook): ... this.
(grub_mmap_get_post64: hook): Likewise.  Rename to ...
(post64_hook): ... this.
* grub-core/mmap/mips/uppermem.c (grub_mmap_get_lower: hook):
Likewise.  Rename to ...
(lower_hook): ... this.
(grub_mmap_get_upper: hook): Likewise.  Rename to ...
(upper_hook): ... this.
* grub-core/mmap/mmap.c (grub_mmap_iterate: count_hook): Likewise.
(grub_mmap_iterate: fill_hook): Likewise.
(fill_mask): Pass addr and mask within a single struct.
(grub_cmd_badram: hook): Make static instead of nested.  Rename
to ...
(badram_iter): ... this.
(grub_cmd_cutmem: hook): Likewise.  Rename to ...
(cutmem_iter): ... this.
2013-01-15 12:02:35 +00:00
Vladimir 'phcoder' Serbinenko
22099030ad * grub-core/kern/emu/hostdisk.c (read_device_map): Explicitly
delimit path in strings using quotes.
	* util/getroot.c (grub_guess_root_devices): Likewise.
	(grub_make_system_path_relative_to_its_root): Likewise.
	* util/grub-probe.c (probe): Likewise.
	* util/ieee1275/ofpath.c (find_obppath): Likewise.
	(xrealpath): Likewise.
2013-01-13 22:45:16 +01:00
Vladimir 'phcoder' Serbinenko
4a9950ecb0 Fix compilation with older compilers.
* grub-core/Makefile.core.def (mpi): Add mpi-inline.c.
	* grub-core/lib/libgcrypt_wrap/cipher_wrap.h: Remove redundant
	declarations.
	* grub-core/lib/posix_wrap/string.h: Include sys/types.h.
	* grub-core/lib/posix_wrap/sys/types.h: Add common types.
	* grub-core/lib/xzembed/xz_dec_lzma2.c (dict_put): Replace byte
	identifier with b.
	* grub-core/lib/xzembed/xz_dec_stream.c (dec_vli): Likewise.
	* include/grub/crypto.h: Add type defines.
	* util/import_gcrypth.sed: Remove duplicate type defines.
2013-01-13 21:06:25 +01:00
Vladimir 'phcoder' Serbinenko
adcc602041 New command list_trusted.
* grub-core/commands/verify.c (grub_cmd_list): New function.
2013-01-13 17:49:05 +01:00
Colin Watson
ca3a74469a Remove nested functions from PCI iterators.
* grub-core/bus/pci.c (grub_pci_iterate): Add hook_data argument,
passed to hook.  Update all callers to pass appropriate hook data.
* grub-core/bus/emu/pci.c (grub_pci_iterate): Likewise.
* include/grub/pci.h (grub_pci_iteratefunc_t): Add data argument.
Remove NESTED_FUNC_ATTR from here and from all users.
(grub_pci_iterate): Update prototype.
* grub-core/bus/cs5536.c (grub_cs5536_find: hook): Make static
instead of nested.  Rename to ...
(grub_cs5536_find_iter): ... this.
* grub-core/kern/efi/mm.c (stop_broadcom: find_card): Likewise.
* grub-core/kern/mips/loongson/init.c (init_pci: set_card):
Likewise.
* grub-core/kern/vga_init.c (grub_qemu_init_cirrus: find_card):
Likewise.
* grub-core/video/bochs.c (grub_video_bochs_setup: find_card):
Likewise.
* grub-core/video/cirrus.c (grub_video_cirrus_setup: find_card):
Likewise.
* grub-core/video/efi_uga.c (find_framebuf: find_card): Likewise.
* grub-core/video/radeon_fuloong2e.c
(grub_video_radeon_fuloong2e_setup: find_card): Likewise.
* grub-core/video/sis315pro.c (grub_video_sis315pro_setup:
find_card): Likewise.
* grub-core/video/sm712.c (grub_video_sm712_setup: find_card):
Likewise.
2013-01-13 01:10:41 +00:00
Vladimir 'phcoder' Serbinenko
f8e98fee04 * grub-core/commands/verify.c: Mark messages for translating. 2013-01-12 16:31:17 +01:00
Vladimir 'phcoder' Serbinenko
055b36b6a6 * grub-core/lib/libgcrypt_wrap/mem.c (gcry_x*alloc): Make out of memory
fatal.
2013-01-12 16:27:37 +01:00
Vladimir 'phcoder' Serbinenko
f7ff879bd2 * grub-core/lib/libgcrypt_wrap/mem.c (_gcry_log_bug): Make gcrypt bugs
fatal.
2013-01-12 16:21:06 +01:00
Vladimir 'phcoder' Serbinenko
5e3b8dcbb5 Import gcrypt public-key cryptography and implement signature checking. 2013-01-11 21:32:42 +01:00
Vladimir 'phcoder' Serbinenko
535714bdcf * grub-core/fs/ntfs.c: Ue more appropriate types.
* grub-core/fs/ntfscomp.c: Likewise.
	* include/grub/ntfs.h: Likewise.
2013-01-11 07:41:05 +01:00
Vladimir 'phcoder' Serbinenko
3e4f356646 Support Apple FAT binaries on non-Apple platforms.
* include/grub/macho.h (GRUB_MACHO_FAT_EFI_MAGIC): New define.
	* include/grub/i386/macho.h (GRUB_MACHO_CPUTYPE_IS_HOST_CURRENT):
	Likewise.
	* grub-core/loader/efi/chainloader.c (grub_cmd_chainloader): Parse
	Apple FAT binaries.
2013-01-10 12:50:01 +01:00
Vladimir 'phcoder' Serbinenko
4dedb13f51 * grub-core/kern/disk.c (grub_disk_write): Fix sector number on 4K
sector devices.
2013-01-10 08:09:26 +01:00
Colin Watson
f8861eaf9f * grub-core/io/bufio.c (grub_bufio_open): Use grub_zalloc instead of
explicitly zeroing elements.
* grub-core/io/gzio.c (grub_gzio_open): Likewise.
* grub-core/io/lzopio.c (grub_lzopio_open): Remove explicit zeroing
of elements in a structure already allocated using grub_zalloc.
* grub-core/io/xzio.c (grub_xzio_open): Likewise.
2013-01-07 10:45:05 +00:00
Vladimir 'phcoder' Serbinenko
c6f1e92f0b * grub-core/fs/minix.c (grub_minix_read_file): Simplify arithmetics. 2013-01-07 11:27:18 +01:00
Vladimir 'phcoder' Serbinenko
f797ec85a0 * grub-core/fs/ext2.c (grub_ext2_read_block): Use shifts rather than
divisions.
2013-01-05 18:37:34 +01:00
Vladimir 'phcoder' Serbinenko
033d0b4b0b * grub-core/fs/ntfs.c: Eliminate useless divisions in favor of shifts.
* grub-core/fs/ntfscomp.c: Likewise.
	* include/grub/ntfs.h (grub_ntfs_data): Replace spc with log_spc.
	(grub_ntfs_comp): Likewise.
2013-01-05 17:36:04 +01:00
Vladimir 'phcoder' Serbinenko
21d1b9a029 * grub-core/fs/nilfs2.c (-grub_nilfs2_palloc_groups_per_desc_block):
Rename to ...
	(grub_nilfs2_palloc_log_groups_per_desc_block): ... this. Return log
	of groups_per_block. All users updated.
2013-01-05 16:53:04 +01:00
Vladimir 'phcoder' Serbinenko
10ca8645cc * grub-core/disk/diskfilter.c (grub_diskfilter_write): Call
grub_error properly.
	* grub-core/disk/ieee1275/nand.c (grub_nand_write): Likewise.
	* grub-core/disk/loopback.c (grub_loopback_write): Likewise.
2013-01-05 15:10:46 +01:00
Vladimir 'phcoder' Serbinenko
dadddb7665 * grub-core/fs/iso9660.c (grub_iso9660_susp_iterate): Avoid hang if
entry->len = 0.
2013-01-03 21:27:00 +01:00
Colin Watson
c3fc8394a0 * grub-core/tests/lib/test.c (grub_test_run): Return non-zero on
test failures, so that a failing unit test correctly causes 'make
check' to fail.
2013-01-02 16:42:48 +00:00
Colin Watson
45d26abb40 Fix failing printf test.
* grub-core/kern/misc.c (grub_vsnprintf_real): Parse '-', '.', and
'$' in the correct order when collecting type information.
2013-01-02 12:48:31 +00:00
Colin Watson
5c67ea6cd9 Remove several trivially-unnecessary uses of nested functions.
* grub-core/commands/i386/pc/sendkey.c
(grub_cmd_sendkey: find_key_code, find_ascii_code): Make static
instead of nested.
* grub-core/commands/legacycfg.c (legacy_file: getline): Likewise.
Rename to ...
(legacy_file_getline): ... this.
* grub-core/commands/loadenv.c (grub_cmd_load_env: set_var):
Likewise.
* grub-core/kern/corecmd.c (grub_core_cmd_set: print_env): Likewise.
* grub-core/kern/fs.c (grub_fs_probe: dummy_func): Likewise.  Rename
to ...
(probe_dummy_iter): ... this.
* grub-core/kern/i386/coreboot/mmap.c
(grub_linuxbios_table_iterate: check_signature): Likewise.
* grub-core/kern/parser.c (grub_parser_split_cmdline:
check_varstate): Likewise.  Mark inline.
* grub-core/lib/arg.c (find_short: fnd_short): Likewise.  Pass
an additional parameter.
(find_long: fnd_long): Likewise.  Pass two additional parameters.
* grub-core/lib/crc.c (init_crc32c_table: reflect): Likewise.
* grub-core/lib/crc64.c (init_crc64_table: reflect): Likewise.
* grub-core/lib/ieee1275/cmos.c (grub_cmos_find_port: hook):
Likewise.  Rename to ...
(grub_cmos_find_port_iter): ... this.
* grub-core/lib/ieee1275/datetime.c (find_rtc: hook): Likewise.
Rename to ...
(find_rtc_iter): ... this.

* grub-core/normal/menu_entry.c (run): Fold nested editor_getsource
function directly into the function body, since it is only called
once.
2012-12-31 17:31:38 +00:00
Colin Watson
33a68ac643 * grub-core/bus/usb/ehci.c (grub_ehci_pci_iter): Remove incorrect
__attribute__ ((unused)).
* grub-core/video/bochs.c (find_card): Likewise.
* grub-core/video/cirrus.c (find_card): Likewise.
* grub-core/video/radeon_fuloong2e.c (find_card): Likewise.
* grub-core/video/sis315pro.c (find_card): Likewise.
* grub-core/video/sm712.c (find_card): Likewise.
2012-12-30 09:57:58 +00:00
Colin Watson
7024b3c0c2 Backport gnulib fixes for C11. Fixes Savannah bug #37738.
* grub-core/gnulib/stdio.in.h (gets): Warn on use only if
HAVE_RAW_DECL_GETS.
* m4/stdio_h.m4 (gl_STDIO_H): Check for gets.
2012-12-28 06:43:35 +00:00
Vladimir 'phcoder' Serbinenko
ce96d01c93 * grub-core/disk/cryptodisk.c (grub_cmd_cryptomount): Strip brackets
around device name if necessarry.
2012-12-10 19:15:51 +01:00
Paulo Flabiano Smorigo
64ebd2f4b9 * grub-core/kern/ieee1275/init.c (grub_machine_get_bootlocation): Use
dynamic allocation for the bootpath buffer.
2012-12-10 16:23:16 +01:00
Dr. Tilmann Bubeck
74b2fe3e4f * grub-core/gfxmenu/view.c (init_terminal): Avoid making terminal
window too small.
2012-12-10 16:14:12 +01:00
Vladimir 'phcoder' Serbinenko
969b804f2a * grub-core/term/gfxterm.c (grub_virtual_screen_setup): Get font as
argument rather than font name. All users updated.
	(grub_gfxterm_set_window): Likewise.
2012-12-10 16:07:33 +01:00
Vladimir 'phcoder' Serbinenko
cc1ce5f9b4 * grub-core/fs/ufs.c (grub_ufs_dir): Stop if direntlen is 0 to avoid
infinite loop on corrupted FS.
2012-12-10 09:22:40 +01:00
Vladimir 'phcoder' Serbinenko
e77a16ca02 Fix big-endian mtime.
* grub-core/fs/ufs.c (grub_ufs_inode): Split improperly attached
	together sec and usec.
	(grub_ufs_dir): Use correct byteswapping for UFS time.
2012-12-08 21:14:08 +01:00
Vladimir 'phcoder' Serbinenko
d9c48c7b7c Support big-endian UFS1.
* Makefile.util.def (libgrubmods): Add ufs_be.c
	* grub-core/Makefile.core.def (ufs1_be): New module.
	* grub-core/fs/ufs_be.c: New file.
	* grub-core/fs/ufs.c: Declare grub_ufs_to_le* and use them throughout
	the file.
2012-12-08 20:56:58 +01:00
Paulo Flabiano Smorigo
48ff08895d * grub-core/net/bootp.c (parse_dhcp_vendor): Fix double increment. 2012-11-28 14:14:20 +01:00
Christoph Junghans
a31b11bd96 * grub-core/Makefile.am (moddep.lst): Use $(AWK) rather than awk.
Fixes Savannah bug #37558.
2012-10-12 15:37:49 +01:00
Colin Watson
e8a5d5d4da * grub-core/commands/configfile.c (GRUB_MOD_INIT): Correct
description of extract_entries_configfile.
2012-10-12 15:34:33 +01:00
Christoph Junghans
9e0bee42cd * grub-core/Makefile.am (moddep.lst): Use $(AWK) instead of awk 2012-10-12 15:04:02 +02:00
Colin Watson
39525c22be * grub-core/loader/i386/linux.c (allocate_pages): Fix spelling of
preferred_address.
(grub_cmd_linux): Likewise.
* grub-core/net/icmp6.c (struct prefix_option): Fix spelling of
preferred_lifetime.  Update all users.
2012-10-05 13:09:19 +01:00
Vladimir 'phcoder' Serbinenko
b78c312722 * grub-core/fs/affs.c (grub_affs_mount): Support AFFS bootblock in
sector 1.
2012-09-26 09:33:41 +02:00
Colin Watson
794c8c3375 Fix grub-emu build on FreeBSD.
* Makefile.util.def (grub-mount): Add LIBGEOM to ldadd.
* grub-core/net/drivers/emu/emunet.c: Only include Linux-specific
headers on Linux.
(GRUB_MOD_INIT): Return immediately on non-Linux platforms; this
implementation is currently Linux-specific.
* util/getroot.c (exec_pipe): Define only on Linux or when either
libzfs or libnvpair is unavailable.
(find_root_devices_from_poolname): Remove unused path variable.
2012-09-22 21:19:58 +01:00
Colin Watson
86d08fdb18 * grub-core/partmap/msdos.c (pc_partition_map_embed): Revert
incorrect off-by-one fix from 2011-02-12.  A 62-sector core image
should fit before end == 63.
2012-09-19 02:44:54 +01:00
Vladimir 'phcoder' Serbinenko
7ddffdadea * grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set
GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN on mac.
	* grub-core/term/ieee1275/console.c (grub_console_init_lately): Use
	ieee1275-nocursor if GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN is set.
	* grub-core/term/terminfo.c (grub_terminfo_set_current): Add new type
	ieee1275-nocursor.
	* include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): New value
	GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN.
2012-09-18 11:52:19 +02:00
Vladimir 'phcoder' Serbinenko
4e09245441 * grub-core/loader/i386/linux.c (grub_cmd_linux): Fix incorrect
le-conversion.
	Reported by: BURETTE, Bernard.
2012-09-18 11:44:29 +02:00
Colin Watson
dfd39dbdea * grub-core/term/terminfo.c: Only fix up powerpc key repeat on
IEEE1275 machines.  Fixes powerpc-emu compilation.
* include/grub/terminfo.h: Likewise.
2012-09-14 11:23:36 +01:00
Vladimir 'phcoder' Serbinenko
3bfa763c48 * include/grub/efi/api.h (grub_efi_runtime_services): Make vendor_guid
a const pointer.
	* grub-core/efiemu/runtime/efiemu.c (efiemu_memcpy): Make from a
	const pointer.
	(efiemu_set_variable): Make vendor_guid a const pointer.
2012-09-12 08:31:05 +02:00
Vladimir 'phcoder' Serbinenko
592fd0e4d6 * grub-core/disk/diskfilter.c (free_array) [GRUB_UTIL]: Fix memory leak.
* util/getroot.c (grub_find_device): Likewise.
	(get_mdadm_uuid): Likewise.
	(grub_util_is_imsm): Likewise.
	(grub_util_pull_device): Likewise.
	* util/grub-probe.c (probe): Likewise.
2012-09-11 07:53:26 +02:00
Benoit Gschwind
801a3027be * grub-core/loader/efi/appleloader.c (devpath_8): New var.
(devs): Add devpath_8.
2012-09-10 09:34:29 +02:00
Peter Jones
c5052c81ab * grub-core/Makefile.core.def (efifwsetup): New module.
* grub-core/commands/efi/efifwsetup.c: New file.
	* grub-core/kern/efi/efi.c (grub_efi_set_variable): New function
	* include/grub/efi/api.h (GRUB_EFI_OS_INDICATIONS_BOOT_TO_FW_UI):
	New define.
	* include/grub/efi/efi.h (grub_efi_set_variable): New proto.
2012-09-08 09:40:24 +02:00
Vladimir 'phcoder' Serbinenko
64498f2538 * grub-core/disk/ieee1275/ofdisk.c (scan): Check function return value.
* grub-core/lib/ieee1275/datetime.c (grub_get_datetime): Likewise.
	(grub_set_datetime): Likewise.
2012-09-05 08:56:08 +02:00
Vladimir 'phcoder' Serbinenko
9cc836a27b * grub-core/script/yylex.l: Ignore unused-function and sign-compare
warnings.
2012-09-05 08:51:31 +02:00
Vladimir 'phcoder' Serbinenko
bcfcea0174 * grub-core/partmap/dvh.c (grub_dvh_is_valid): Add missing byteswap. 2012-09-05 08:47:39 +02:00
Vladimir 'phcoder' Serbinenko
a40994852d * grub-core/fs/xfs.c (grub_xfs_read_block): Make keys a const pointer. 2012-09-05 08:45:07 +02:00
starous
39b27f1eaf EHCI and OHCI PCI bus master 2012-07-22 21:09:30 +02:00
Vladimir 'phcoder' Serbinenko
7bd29c01f0 New command `lsefi'.
* grub-core/Makefile.core.def (lsefi): New module.
	* grub-core/commands/efi/lsefi.c: New file.
	* include/grub/efi/api.h: Add more GUIDs.
2012-07-22 19:59:06 +02:00
Vladimir 'phcoder' Serbinenko
ac625d8f79 * grub-core/loader/i386/bsd.c (grub_bsd_elf32_size_hook): Fix mask.
(grub_bsd_elf32_hook): Likewise.
	(grub_bsd_elf64_size_hook): Likewise.
	(grub_bsd_elf64_hook): Likewise.
	(grub_bsd_load_elf): Likewise.
2012-07-22 16:30:48 +02:00
Vladimir 'phcoder' Serbinenko
e73bb80170 * grub-core/lib/xzembed/xz_dec_stream.c (hash_validate): Fix behaviour
if hash function is unavailable.
	(dec_stream_header): Likewise.
2012-07-22 16:27:03 +02:00
Vladimir 'phcoder' Serbinenko
e81db8b5fd * grub-core/normal/autofs.c (autoload_fs_module): Save and restore
filter state.
2012-07-22 16:23:46 +02:00
Vladimir 'phcoder' Serbinenko
d187a1c3d7 Fix coreboot compilation.
* grub-core/term/i386/pc/vga_text.c (grub_vga_text_init): Rename to ...
	(grub_vga_text_init_real): ... this.
	(grub_vga_text_fini): Rename to ...
	(grub_vga_text_fini_real): ... this.
2012-07-22 16:21:24 +02:00
Vladimir 'phcoder' Serbinenko
91a05f64e6 * grub-core/Makefile.am: Fix path to boot/i386/pc/startup_raw.S. 2012-07-07 14:29:01 +02:00
Vladimir 'phcoder' Serbinenko
6af96df768 * grub-core/lib/legacy_parse.c: Support clear and testload. 2012-07-02 11:31:31 +02:00
Vladimir 'phcoder' Serbinenko
4d569e12e3 * grub-core/term/efi/serial.c: Support 1.5 stop bits. 2012-07-02 11:30:04 +02:00
Vladimir 'phcoder' Serbinenko
073b57bb8e * grub-core/fs/ext2.c: Experimental support for 64-bit. 2012-07-02 11:28:42 +02:00
Vladimir 'phcoder' Serbinenko
a706f4cc6b * grub-core/net/tftp.c (ack): Fix endianness problem.
(tftp_receive): Likewise.
	Reported by: Michael Davidsaver.
2012-07-02 11:22:50 +02:00
Vladimir 'phcoder' Serbinenko
a18f3b98c6 * include/grub/list.h (FOR_LIST_ELEMENTS_SAFE): New macro.
* include/grub/command.h (FOR_COMMANDS_SAFE): Likewise.
	* grub-core/commands/help.c (grub_cmd_help): Use FOR_COMMANDS_SAFE.
2012-07-02 11:19:22 +02:00
Vladimir 'phcoder' Serbinenko
3569288126 * grub-core/loader/i386/linux.c (find_efi_mmap_size): Don't decrease
efi_mmap_size.
	Reported by: Stuart Hayes.
2012-07-02 11:14:37 +02:00
Vladimir 'phcoder' Serbinenko
e80fdf7d2e missing file from last commit 2012-06-28 15:36:48 +02:00
Vladimir 'phcoder' Serbinenko
c35fc5bd15 Add monochrome text support (mda_text, aka `hercules' in grub-legacy).
* grub-core/Makefile.core.def (mda_text): New module.
	* grub-core/lib/legacy_parse.c (grub_legacy_parse): Support `hercules'.
	* grub-core/term/i386/vga_common.c (grub_console_cur_color): Moved to ..
	* grub-core/term/i386/pc/vga_text.c (cur_color): ... here
	* grub-core/term/i386/pc/console.c (grub_console_cur_color): ... and
	here.
	* grub-core/term/i386/vga_common.c (grub_console_getwh): Moved to ..
	* grub-core/term/i386/pc/vga_text.c (grub_console_getwh): ... here
	* grub-core/term/i386/pc/console.c (grub_console_getwh): ... and
	here.
	* grub-core/term/i386/vga_common.c (grub_console_setcolorstate): Moved
	to ..
	* grub-core/term/i386/pc/vga_text.c (grub_console_setcolorstate):
	... here
	* grub-core/term/i386/pc/console.c (grub_console_setcolorstate): ... and
	here.
	* grub-core/term/i386/vga_common.c: Removed.
	* include/grub/i386/vga_common.h: Likewise.
	* include/grub/vga.h (grub_vga_cr_bw_write): New function.
	(grub_vga_cr_bw_read): Likewise.
	* include/grub/vgaregs.h (GRUB_VGA_IO_CR_BW_INDEX): New enum value.
	(GRUB_VGA_IO_CR_BW_DATA): Likewise.
	* grub-core/term/i386/pc/vga_text.c [MODE_MDA]: Call
	grub_vga_cr_bw_read/grub_vga_cr_bw_write instead of
	grub_vga_cr_read/grub_vga_cr_write.
	(grub_vga_text_setcolorstate) [MODE_MDA]: Ignore color.
2012-06-28 15:27:54 +02:00
Vladimir 'phcoder' Serbinenko
5f91f70146 * configure.ac: Bump version to 2.00.
* grub-core/normal/main.c (features): Add feature_200_final.
2012-06-28 02:06:36 +02:00
Vladimir 'phcoder' Serbinenko
f923ad22ce * grub-core/loader/i386/linux.c (find_efi_mmap_size): Increase
additional size to 3 pages.
	Reported by: Stuart Hayes.
2012-06-27 22:55:09 +02:00
Vladimir 'phcoder' Serbinenko
58eee08fff * grub-core/commands/wildcard.c (check_file): Fix bad logic.
put explicit "/" for empty path.
	(wildcard_expand): Improve dprintf.
2012-06-27 21:13:06 +02:00
Vladimir 'phcoder' Serbinenko
c59bdff709 * grub-core/fs/fshelp.c (grub_fshelp_find_file): Don't free oldnode if
it's equal to currnode. This can happen with "" symlink.
2012-06-27 19:37:40 +02:00
Vladimir 'phcoder' Serbinenko
73a68bcb3a * grub-core/term/arc/console.c (grub_console_init_output): Add one since
the value returned by firmware is the maximal position, not diumension.
	(grub_terminfo_output_state): Use a more sane fallback.
2012-06-26 23:34:32 +02:00
Vladimir 'phcoder' Serbinenko
392a603b67 * grub-core/term/terminfo.c (print_terminfo): Print terminal dimensions. 2012-06-26 23:32:00 +02:00
Vladimir 'phcoder' Serbinenko
42d0867ff7 * grub-core/kern/mips/arc/init.c (grub_machine_init): Set clock
frequency to 150 MHz.
2012-06-26 23:28:23 +02:00
Vladimir 'phcoder' Serbinenko
489509f40e Apple fixes.
* grub-core/lib/i386/relocator16.S: Use correct __APPLE__ and not
	__APPLE_
	* grub-core/lib/i386/relocator_common.S [__APPLE__]: Fix gdtdesc
	definition.
	* grub-core/lib/i386/relocator64.S [__APPLE__]: Assemble jmp manually.
2012-06-26 14:56:28 +02:00
Vladimir 'phcoder' Serbinenko
9f3fc8835f Handle slash in HFS label.
* grub-core/fs/hfs.c (macroman_to_utf8): New argument slash_translate.
	(grub_hfs_dir): Tanslate slash.
	(grub_hfs_label): Don't translate slash.
2012-06-26 14:53:35 +02:00
Vladimir 'phcoder' Serbinenko
54853fd72e * grub-core/commands/ls.c (grub_ls_list_devices): Disable
network protocol listing since it introduces problematic dependency on
	net module.
2012-06-26 03:45:46 +02:00
Vladimir 'phcoder' Serbinenko
c50c867da3 Init video early on yeeloong to avoid being rebooted by watchdog.
* grub-core/Makefile.am (gensm712): New target.
	(sm712_start.S): Likewise.
	(boot/mips/loongson/fwstart.S): Depend on sm712_start.S
	* grub-core/boot/mips/loongson/fwstart.S [!FULOONG2F]: Init SM712.
	* grub-core/video/sm712.c [GENINIT]: Generate compact init procedure
	description.
	* include/grub/vga.h: Move registry definitions to...
	* include/grub/vgaregs.h: ... here.
2012-06-26 03:36:14 +02:00
Vladimir 'phcoder' Serbinenko
5f92c8a110 * grub-core/boot/decompressor/minilib.c (grub_memcmp): Fix the compare
signedness.
2012-06-26 03:31:41 +02:00
Vladimir 'phcoder' Serbinenko
754ad9ebbe * grub-core/disk/diskfilter.c (scan_disk) [GRUB_UTIL]: Put more
informative verbose message.
	(read_lv): Handle 64-bit segment size.
2012-06-25 17:54:46 +02:00
Vladimir 'phcoder' Serbinenko
315654c269 * grub-core/disk/lvm.c (grub_lvm_getvalue): Handle 64-bit values. 2012-06-25 17:52:20 +02:00
Vladimir 'phcoder' Serbinenko
fb022c79ef * grub-core/fs/fat.c (grub_fat_iterate_dir_next): Don't stop on a space
character but still remove trainling spaces.
	(grub_fat_label): Ignore archive flag.
2012-06-25 17:47:52 +02:00
Vladimir 'phcoder' Serbinenko
8645f72c72 * grub-core/loader/i386/linux.c (grub_cmd_initrd): Avoid unnecessarry
cast between linux_kernel_header and linux_kernel_params.
2012-06-25 17:44:36 +02:00
Vladimir 'phcoder' Serbinenko
36498496a0 * include/grub/diskfilter.h (grub_raid5_recover_func_t): Use proper
type for size.
	(grub_raid6_recover_func_t): Likewise.
	* grub-core/disk/raid5_recover.c (grub_raid5_recover): Likewise.
	* grub-core/disk/raid6_recover.c (grub_raid6_recover): Likewise.
2012-06-25 17:36:50 +02:00
Grégoire Sutre
650cfcfea2 Fix overflow in grub_util_get_fd_size for NetBSD. 2012-06-25 10:09:57 +02:00
Vladimir 'phcoder' Serbinenko
2fb97ed37a * grub-core/boot/mips/loongson/fwstart.S: Add missing setting of high
half of $a0.
2012-06-23 11:27:27 +02:00
Vladimir 'phcoder' Serbinenko
0f92dca7ef * grub-core/kern/mm.c (grub_free): Fix agglomerating of free regions. 2012-06-23 00:39:10 +02:00
Vladimir 'phcoder' Serbinenko
3988c4a09f * grub-core/kern/mm.c (get_header_from_pointer): Put a more informative
message on double free. Put the value of magic in case of mismatch.
2012-06-22 23:54:43 +02:00
Vladimir 'phcoder' Serbinenko
9e86d4c59a Speed-up video on yeeloong.
* grub-core/video/sm712.c (framebuffer): Remove render_target and
	add cached_ptr.
	(grub_video_sm712_video_fini): Unmap cached_ptr.
	(grub_video_sm712_setup): Use cache address and grub_video_fb_setup.
	(grub_video_sm712_set_active_render_target): Removed.
	(grub_video_adapter): Use grub_video_fb_set_active_render_target.
	(grub_video_sm712_swap_buffers): Call grub_video_fb_swap_buffers and
	sync caches.
2012-06-22 23:47:34 +02:00
Vladimir 'phcoder' Serbinenko
ed24c31201 Avoid flushing the same line multiple times on loongson.
* grub-core/kern/mips/cache.S [GRUB_MACHINE_MIPS_LOONGSON]:
	Step in 32 bytes and not 1 byte.
	* grub-core/kern/mips/cache_flush.S [GRUB_MACHINE_MIPS_LOONGSON]:
	Likewise.
2012-06-22 23:36:33 +02:00
Vladimir 'phcoder' Serbinenko
982f1909cf Implement flow control for http.
* grub-core/net/http.c (parse_line): Handle response 206.
	(http_receive): Stall if too many packets are in the queue.
	(http_establish): Fix range header.
	(http_seek): Fix double free.
	(http_close): Likewise.
	(http_packets_pulled): New function.
	(grub_http_protocol): Set http_seek
	* grub-core/net/tcp.c (grub_net_tcp_socket): New field `i_stall'.
	(ack_real): Set window depending on i_stall.
	(grub_net_send_tcp_packet): Likewise.
	(grub_net_tcp_stall): New function.
	(grub_net_tcp_unstall): Likewise.
	* include/grub/net/tcp.h (grub_net_tcp_stall): New proto.
	(grub_net_tcp_unstall): Likewise.
2012-06-22 22:09:31 +02:00
Vladimir 'phcoder' Serbinenko
bd407d6e5e * grub-core/net/tftp.c: Decrease stall to 50 packets. 2012-06-22 22:04:16 +02:00
Vladimir 'phcoder' Serbinenko
c7564b8e13 * grub-core/net/net.c (grub_net_fs_open): Free resources on failed open. 2012-06-22 22:02:47 +02:00
Vladimir 'phcoder' Serbinenko
b27069e06d Implement flow control for tftp.
* grub-core/net/net.c (receive_packets): Decrease the stop to 10
	packets but stop only if stop condition is satisfied.
	(grub_net_fs_read_real): Call packets_pulled after real read. Use
	`stall' instead of `eof' as stop condition.
	* grub-core/net/http.c (parse_line): Set `stall' on EOF.
	(http_err): Likewise.
	* grub-core/net/tftp.c (ack): Replace the first argument with data
	instead of socket.
	(tftp_receive): Stall if too many packets are in wait queue.
	(tftp_packets_pulled): New function.
	(grub_tftp_protocol): Set packets_pulled.
	* include/grub/net.h (grub_net_packets): New field count.
	(grub_net_put_packet): Increment count.
	(grub_net_remove_packet): Likewise.
	(grub_net_app_protocol): New field `packets_pulled'.
	(grub_net): New field `stall'.
2012-06-22 14:17:46 +02:00
Vladimir 'phcoder' Serbinenko
6b9cfac683 * grub-core/net/net.c (receive_packets): Stop after 100 packets to let
sync part to handle them.
2012-06-22 12:42:31 +02:00
Vladimir 'phcoder' Serbinenko
f35abd8190 * grub-core/kern/main.c (grub_set_prefix_and_root): Fix memory leak.
* grub-core/net/drivers/ieee1275/ofnet.c
	(grub_ieee1275_net_config_real): Likewise.
2012-06-22 11:51:48 +02:00
Vladimir 'phcoder' Serbinenko
0e7ec82034 * grub-core/net/bootp.c (grub_net_configure_by_dhcp_ack): Don't create
the direct route for server/gateway.
2012-06-21 22:20:57 +02:00
Vladimir 'phcoder' Serbinenko
9d611a318d * grub-core/net/bootp.c (grub_net_configure_by_dhcp_ack): Prefer
IP address to server name since we may not hame the DNS.
2012-06-21 22:15:10 +02:00
Vladimir 'phcoder' Serbinenko
418f45abd1 * grub-core/net/dns.c (grub_cmd_nslookup): Init addresses to 0 to avoid
freeing random buffer on failure.
	* grub-core/net/net.c (grub_net_resolve_address): Likewise.
2012-06-21 22:11:47 +02:00
Vladimir 'phcoder' Serbinenko
44a0efc180 * grub-core/net/bootp.c (grub_cmd_bootp): Fix packet allocation size. 2012-06-21 22:08:33 +02:00
Vladimir 'phcoder' Serbinenko
531e2241a6 * grub-core/net/drivers/emu/emunet.c (get_card_packet): Allocate the
reserved bytes.
	* grub-core/net/drivers/i386/pc/pxe.c (grub_pxe_recv): Likewise.
	* grub-core/net/drivers/ieee1275/ofnet.c (get_card_packet): Likewise.
	Handle malloc error correctly.
2012-06-21 22:05:41 +02:00
Vladimir 'phcoder' Serbinenko
cde393c9a3 * grub-core/script/execute.c (grub_script_arglist_to_argv): Escape
blocks.
2012-06-21 22:02:09 +02:00
Vladimir 'phcoder' Serbinenko
538478d082 * grub-core/disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Fix double
increment.
2012-06-21 21:59:52 +02:00
Vladimir 'phcoder' Serbinenko
9b55efe09a * grub-core/net/dns.c (grub_cmd_nslookup): Use configured DNS servers if
none is explicitly specified.
2012-06-21 00:14:51 +02:00
Vladimir 'phcoder' Serbinenko
9eb832c365 * grub-core/net/dns.c (grub_net_add_dns_server): Don't erase old servers
while reallocating.
2012-06-20 23:51:56 +02:00
Vladimir 'phcoder' Serbinenko
d6b7c7c986 Respect netmask from bootp/dhcp.
* grub-core/net/bootp.c (parse_dhcp_vendor): Parse mask.
	(grub_net_configure_by_dhcp_ack): Use mask and grub_net_add_ipv4_local.
	* grub-core/net/net.c (grub_net_add_addr): Split creating local route
	into ...
	(grub_net_add_ipv4_local): ... this.
	(grub_cmd_addaddr): Use grub_net_add_ipv4_local.
	* include/grub/net.h (GRUB_NET_BOOTP_NETMASK): New enum value.
	(grub_net_add_ipv4_local): New proto.
2012-06-20 23:46:50 +02:00
Vladimir 'phcoder' Serbinenko
67caf9eb06 * grub-core/loader/i386/linux.c (grub_linux_boot): Setup video before
determining EFI memory map size.
2012-06-20 23:39:33 +02:00
Vladimir 'phcoder' Serbinenko
436575581e * grub-core/disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Escape commas. 2012-06-20 23:37:24 +02:00
Vladimir 'phcoder' Serbinenko
eb6d0dd3a1 * grub-core/kern/main.c (grub_set_prefix_and_root): Skip escaped commas
when looking for partition separator.
2012-06-20 23:33:34 +02:00
Vladimir 'phcoder' Serbinenko
3123054474 * grub-core/kern/ieee1275/openfw.c (grub_ieee1275_encode_devname):
Escape commas.
2012-06-20 23:31:59 +02:00
Vladimir 'phcoder' Serbinenko
918a25179c Restructure FAT driver to avoid hook in label reading as it hits a
GCC bug.

	* include/grub/err.h (grub_err_t): New enum value GRUB_ERR_EOF.
	* grub-core/fs/fat.c (grub_fat_iterate_context): New struct.
	(grub_fat_iterate_dir): Split into ...
	(grub_fat_iterate_init): ... this, ...
	(grub_fat_iterate_fini): ... this, ...
	(grub_fat_iterate_dir_next): ... and this. All users updated.
2012-06-20 23:29:28 +02:00
Vladimir 'phcoder' Serbinenko
9f1d654e67 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): New enum value
GRUB_IEEE1275_FLAG_BROKEN_REPEAT.
	* grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set
	GRUB_IEEE1275_FLAG_BROKEN_REPEAT on PowerBook3,3.
	* include/grub/terminfo.h (grub_terminfo_input_state) [__powerpc__]:
	New fields last_key and last_key_time.
	* grub-core/term/terminfo.c (grub_terminfo_getkey): Transform
	extended key-esc into extended key-extended key.
2012-06-20 22:19:26 +02:00
Vladimir 'phcoder' Serbinenko
52f0f64384 Avoid unnecessary memcpy of whole video buffer.
* grub-core/video/fb/video_fb.c (dirty): New struct.
	(framebuffer): Add members current_dirty and previous_dirty.
	(dirty): New function.
	(grub_video_fb_fill_rect): Update dirty.
	(common_blitter): Likewise.
	(grub_video_fb_scroll): Likewise.
	(doublebuf_blit_update_screen): Copy only dirty part.
	(doublebuf_pageflipping_update_screen): Likewise.
	(grub_video_fb_doublebuf_blit_init): Init dirty.
	(doublebuf_pageflipping_init): Likewise.
	(grub_video_fb_setup): Likewise.
2012-06-19 19:34:51 +02:00
Vladimir 'phcoder' Serbinenko
e169a1805f * grub-core/net/drivers/ieee1275/ofnet.c (search_net_devices): Decrease
poll rate.
2012-06-19 15:44:51 +02:00
Vladimir 'phcoder' Serbinenko
485568790c Fix wildcard regexp dot and other special characters handling.
Reported by: Robert Mabee.

	* grub-core/commands/wildcard.c (isregexop): Add "|+{}[]?".
	(make_regex): Escape "|+{}[]". Transform '?' to '.?'.
	(split_path): Trigger expansion on '?'.
	(unescape): New function.
	(wildcard_expand): Unescape parts copied without globbing.
	* grub-core/script/execute.c (wildcard_escape): Escape '?'.
	(grub_script_arglist_to_argv): Don't unescape expansions.
2012-06-19 14:13:19 +02:00
Vladimir 'phcoder' Serbinenko
0494408e7e * include/grub/net.h (grub_net_card): New member txbufsize.
* include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): New enum values
	GRUB_IEEE1275_FLAG_NO_OFNET_SUFFIX and
	GRUB_IEEE1275_FLAG_VIRT_TO_REAL_BROKEN.
	* grub-core/net/drivers/efi/efinet.c (grub_efinet_findcards): Use
	txbufsize.
	* grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options): Use
	compatible property to check for macs. Set
	GRUB_IEEE1275_FLAG_NO_OFNET_SUFFIX and
	GRUB_IEEE1275_FLAG_VIRT_TO_REAL_BROKEN on macs.
	* grub-core/net/drivers/ieee1275/ofnet.c (card_open): Don't add suffix
	if GRUB_IEEE1275_FLAG_NO_OFNET_SUFFIX is set.
	(send_card_buffer): Use txbuf.
	(grub_ofnet_findcards): Allocate txbuf. Simplify code flow and move
	nested function out of the parent while on it.
2012-06-19 11:34:52 +02:00
Vladimir 'phcoder' Serbinenko
cc35fe8f31 * grub-core/net/drivers/ieee1275/ofnet.c (get_card_packet): Fix packet
presence check.
	(grub_ieee1275_net_config_real): Fix config pointer.
2012-06-19 11:25:37 +02:00
Vladimir 'phcoder' Serbinenko
970a0a09dd * grub-core/kern/ieee1275/openfw.c (grub_ieee1275_parse_args): Extend
filename parsing to non-block devices.
2012-06-19 11:23:13 +02:00
Vladimir 'phcoder' Serbinenko
3e19bf879f * grub-core/kern/device.c (grub_device_open): Remove dead code. 2012-06-19 11:20:34 +02:00
Vladimir 'phcoder' Serbinenko
c62d1a0c64 * include/grub/elf.h: Rename R_PPC to GRUB_R_PPC to avoid collisions.
All users updated.
2012-06-18 21:09:57 +02:00
Vladimir 'phcoder' Serbinenko
70aaf3053a Speed-up video on fuloong.
* grub-core/bus/bonito.c (grub_pci_device_map_range_cached):
	New function.
	(grub_pci_device_unmap_range): Handle non-cached address.
	* grub-core/video/sis315pro.c (framebuffer): Remove render_target and
	add direct_ptr.
	(grub_video_sis315pro_video_fini): Unmap direct_ptr.
	(grub_video_sis315pro_setup): Use cache address and grub_video_fb_setup.
	(grub_video_sis315pro_set_active_render_target): Removed.
	(grub_video_sis315pro_get_info_and_fini): Use uncached address.
	(grub_video_adapter): Use grub_video_fb_set_active_render_target.
	(grub_video_sis315pro_swap_buffers): Call grub_video_fb_swap_buffers and
	sync caches.
	* include/grub/mips/loongson/pci.h (grub_pci_device_map_range_cached):
	New proto.
2012-06-17 01:09:32 +02:00
Vladimir 'phcoder' Serbinenko
ba67e2c635 Avoid slow read-back from VRAM.
* include/grub/video_fb.h (grub_video_fb_doublebuf_update_screen_t):
	Move from here ...
	* grub-core/video/fb/video_fb.c
	(grub_video_fb_doublebuf_update_screen_t): ... here. Remove arguments.
	* grub-core/video/fb/video_fb.c (framebuf_t): New type.
	(front_target): Remove front_target. Add pages.
	(grub_video_fb_init): Skip setting front_pages.
	(grub_video_fb_fini): Likewise.
	(doublebuf_blit_update_screen): Use pages.
	(grub_video_fb_doublebuf_blit_init): Likewise.
	(doublebuf_pageflipping_init): Allocate offscreen buffer.
	(doublebuf_pageflipping_update_screen): Use offscreen buffer.
	(grub_video_fb_setup): Prefer doublebuffing.
2012-06-15 23:57:20 +02:00
Vladimir 'phcoder' Serbinenko
377c98cba2 * grub-core/normal/main.c (GRUB_MOD_INIT): Ignore errors when loading
gzio.
2012-06-15 23:42:34 +02:00
Vladimir 'phcoder' Serbinenko
eac49cffc8 Add loongson tests.
* tests/util/grub-shell.in: Handle loongson.
	* tests/partmap_test.in: Add loongson to the list of platform using ATA
	drivers.
	* grub-core/tests/boot/linux.init-mips.S (SHUTDOWN_MAGIC3) [REBOOT]:
	Reboot instead of shutdown if REBOOT is defined.
2012-06-15 19:42:25 +02:00
Vladimir 'phcoder' Serbinenko
0321415e86 * grub-core/lib/mips/loongson/reboot.c (grub_reboot): Use 32-bit
sized ports since unlike on real hardware qemu supports only 32-bit
	regs.
2012-06-15 19:36:10 +02:00
Vladimir 'phcoder' Serbinenko
4abde34671 Revert usb-quiesce since it's wrong.
* grub-core/disk/ieee1275/ofdisk.c (quiesce): Removed.
	(grub_ofdisk_init): Don't do quiesce.
2012-06-13 22:44:45 +02:00
Vladimir 'phcoder' Serbinenko
61f1d93b09 * grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options): Apply
PowerMac workaround to Xserves as well.
	Information supplied by: Benjamin Herrenschmidt.
2012-06-13 01:38:40 +02:00
Vladimir 'phcoder' Serbinenko
a09eb54103 Don't assume that beginning address is also the entry point on ppc.
* grub-core/loader/powerpc/ieee1275/linux.c (linux_entry): New variable.
	(grub_linux_boot): Use linux_entry.
	(grub_linux_load32): Fill linux_entry. Fix setting linux_addr.
	(grub_linux_load64): Likewise.
2012-06-13 01:15:15 +02:00
Vladimir 'phcoder' Serbinenko
cbe0b4efdb * grub-core/term/ieee1275/console.c (grub_console_fini): Don't
needlessly lose the console.
2012-06-13 01:06:35 +02:00
Vladimir 'phcoder' Serbinenko
3006e9810f * grub-core/normal/dyncmd.c (read_command_list): Don't access freed
space.
2012-06-13 01:04:14 +02:00
Vladimir 'phcoder' Serbinenko
7da036bbcb Remove non-functional EFI grub_get_rtc. Put a better fatal message
than current grub_get_rtc() not implemented when booted with
	coreboot without TSC.

	* grub-core/Makefile.am: Exclude efi/time.h from kernel headers.
	Add machine/time.h to kernel headers on loongson.
	* grub-core/Makefile.core.def (kernel): Remove
	kern/generic/rtc_get_time_ms.c on qemu-multiboot-coreboot.
	* grub-core/kern/efi/efi.c (grub_rtc_get_time_ms): Removed.
	(grub_get_rtc): Likewise.
	* grub-core/kern/generic/rtc_get_time_ms.c: Include grub/machine/time.h.
	* grub-core/kern/i386/coreboot/init.c (grub_get_rtc): Removed.
	* grub-core/kern/i386/pc/init.c: Include grub/machine/init.h.
	* grub-core/kern/i386/tsc.c (grub_tsc_init)
	[!GRUB_MACHINE_PCBIOS && !GRUB_MACHINE_IEEE1275]: Call grub_fatal
	rather than installing known non-working time source.
	* grub-core/kern/ieee1275/init.c (grub_get_rtc): Removed.
	* grub-core/kern/mips/loongson/init.c: Include grub/machine/time.h.
	* include/grub/time.h: Don't include machine/time.h.
	* include/grub/efi/time.h: Removed.
	* include/grub/i386/efi/time.h: Likewise.
	* include/grub/i386/ieee1275/time.h: Likewise.
	* include/grub/powerpc/ieee1275/time.h: Likewise.
	* include/grub/sparc64/ieee1275/time.h: Likewise.
	* include/grub/x86_64/efi/time.h: Likewise.
2012-06-11 20:44:38 +02:00
Vladimir 'phcoder' Serbinenko
4e5a96b02e Remove dor on i and j when combining with above diacritics.
* include/grub/unicode.h (GRUB_UNICODE_DOTLESS_LOWERCASE_I): New enum
	value.
	(GRUB_UNICODE_DOTLESS_LOWERCASE_J): Likewise.
	* grub-core/font/font.c (grub_font_construct_dry_run): Replace i and j
	with dotless variants when any combining above is present.
2012-06-11 00:20:55 +02:00
Vladimir 'phcoder' Serbinenko
96f7e60eae Stop polling as soon as we have the packet we were waiting for.
* include/grub/net.h (grub_net_poll_cards): New argument stop_condition.
	All users updated.
	* grub-core/net/arp.c (have_pending): New var.
	(pending_req): Likewise.
	(grub_net_arp_send_request): Fill pending_req and use have_pending as
	stop indicator.
	(grub_net_arp_receive): Set have_pending.
	* grub-core/net/dns.c (recv_data): New field stop.
	(recv_hook): Set stop.
	(grub_net_dns_lookup): Init stop and use as stop condition.
	* grub-core/net/http.c (http_establish): Use headers_recv as stop
	condition.
	* grub-core/net/net.c (grub_net_poll_cards): New argument
	stop_condition. Stop when it goes true.
	* grub-core/net/tcp.c (grub_net_tcp_open): Use `established' as stop
	indicator.
	* grub-core/net/tftp.c (tftp_open): Use `have_oack' as stop indicator.
2012-06-09 11:06:55 +02:00
Vladimir 'phcoder' Serbinenko
3e74723951 Keep TX and RX buffers on EFI rather than always allocate new ones.
* include/grub/net.h (grub_net_card_driver): Allow driver to modify
	card. All users updated.
	(grub_net_card): New members txbuf, rcvbuf, rcvbufsize and txbusy.
	* grub-core/net/drivers/efi/efinet.c (send_card_buffer): Reuse buffer.
	(get_card_packet): Likewise.
	(grub_efinet_findcards): Init new fields.
2012-06-09 11:00:18 +02:00
Vladimir 'phcoder' Serbinenko
f695e99a75 * grub-core/term/ieee1275/serial.c (do_real_config): Fix cast to fix
compilation error on sparc64.
2012-06-09 10:55:02 +02:00
Vladimir 'phcoder' Serbinenko
9e5e66d15e Use ITC on IA64 rather than broken routine based on daytime.
* grub-core/kern/efi/efi.c (grub_rtc_get_time_ms) [__ia64__]: Remove on
	ia64.
	(grub_get_rtc) [__ia64__]: Likewise.
	* grub-core/kern/ia64/efi/init.c (divisor): New variable.
	(get_itc): New function.
	(grub_rtc_get_time_ms): Likewise.
	(grub_machine_init): Calibrate ITC.
	* include/grub/efi/time.h (grub_get_rtc), (GRUB_TICKS_PER_SECOND):
	Keep only on non-ia64. Don't export since it's broken and used only
	if TSC is unavailable.
2012-06-09 10:52:39 +02:00
Vladimir 'phcoder' Serbinenko
a176740446 * grub-core/disk/efi/efidisk.c (find_parent_device): Return the parent
even if it's used.
	(name_devices): Replace #if 0 with #ifdef DEBUG_NAMES.
	Skip if parent is unused.
2012-06-09 10:43:24 +02:00
Vladimir 'phcoder' Serbinenko
5e619f408d Fix wildcard escaping.
* grub-core/commands/wildcard.c (wildcard_escape): Moved from here ...
	* grub-core/script/execute.c (wildcard_escape): .. to here.
	Don't escape dot.
	* grub-core/commands/wildcard.c (wildcard_unescape): Moved from here ...
	* grub-core/script/execute.c (wildcard_unescape): .. to here.
	Don't escape dot.
	* grub-core/script/execute.c (gettext_append): Always escape.
	(grub_script_arglist_to_argv): Always handle escaping/unescaping.
	* grub-core/script/yylex.l: Don't cut away the escaping.
	* tests/grub_script_echo1.in: Add tests with wildcard.
2012-06-08 22:54:21 +02:00
Vladimir 'phcoder' Serbinenko
c8ca585593 * grub-core/bus/usb/serial/ftdi.c (real_config): Handle 1.5 stop bits.
(ftdi_hw_configure): Likewise.
	* grub-core/bus/usb/serial/pl2303.c (GRUB_PL2303_STOP_BITS_1_5): New
	define.
	(real_config): Handle 1.5 stop bits.
	(pl2303_hw_configure): Likewise.
2012-06-08 20:40:40 +02:00
Vladimir 'phcoder' Serbinenko
7183452c00 * Makefile.am: Add ppc linux bootcheck.
* grub-core/tests/boot/linux-ppc.cfg: New file.
	* grub-core/tests/boot/linux.init-ppc.S: Likewise.
2012-06-08 20:35:54 +02:00
Vladimir 'phcoder' Serbinenko
61c42af084 ESCC serial driver for conducting sautomated tests in qemu.
Not tested on real hardware.

	* include/grub/serial.h (grub_serial_port): New field escc_desc.
	* grub-core/term/ieee1275/escc.c: New file.
	* grub-core/Makefile.core.def (escc): New module.
2012-06-08 19:42:59 +02:00
Vladimir 'phcoder' Serbinenko
08fd129137 * grub-core/term/ieee1275/serial.c (do_real_config): Set handle to
invalid on error.
	(serial_hw_fetch): Don't read invalid handle.
	(serial_hw_put): Don't write into invalid handle.
2012-06-08 19:34:57 +02:00
Vladimir 'phcoder' Serbinenko
08dafeeaae Add a 1.5 stop bits value.
* grub-core/term/serial.c (grub_cmd_serial): Handle 1.5.
	* include/grub/serial.h (grub_serial_stop_bits_t): Add
	GRUB_SERIAL_STOP_BITS_1_5.
2012-06-08 19:32:57 +02:00
Vladimir 'phcoder' Serbinenko
9068fdcf0b * grub-core/commands/wildcard.c (wildcard_expand): Set default return
value rather than let it uninited.
2012-06-08 19:29:43 +02:00
Vladimir 'phcoder' Serbinenko
f4d5820f28 * grub-core/commands/wildcard.c (+check_file): New function.
(wildcard_expand): Don't expand to non-existing files, expand with
	suffix and not attempt to expand if not needed.
2012-06-07 23:18:04 +02:00
Vladimir 'phcoder' Serbinenko
3d2de9a7ba * grub-core/disk/efi/efidisk.c (name_devices): Don't make disks
out of partitions containing other partitions.
2012-06-07 21:55:55 +02:00
Vladimir 'phcoder' Serbinenko
c5c81ff978 Pass PCIINFO on BIOS to OpenBSD since otherwise it fails to boot
on some qemu versions with GRUB.

	* include/grub/i386/openbsd_bootarg.h (OPENBSD_BOOTARG_PCIBIOS): New
	define.
	(grub_openbsd_bootarg_pcibios): New struct.
	* grub-core/loader/i386/bsd.c (grub_openbsd_boot) [GRUB_MACHINE_PCBIOS]:
	Add PCIINFO.
2012-06-07 16:41:52 +02:00
Vladimir 'phcoder' Serbinenko
cede3ca325 * grub-core/Makefile.core.def (vga_text): Disable on muliboot
and coreboot since it's already in kernel.
2012-06-07 15:18:21 +02:00
Vladimir 'phcoder' Serbinenko
558d3a6023 * util/getroot.c (grub_util_get_dm_node_linear_info): Moved from here...
* grub-core/kern/emu/hostdisk.c (grub_util_get_dm_node_linear_info):
	to here. New return value start. All users updated.
	Recursively scan linear mappings.
	* include/grub/emu/hostdisk.h (grub_util_get_dm_node_linear_info): New
	proto.
	* grub-core/kern/emu/hostdisk.c (grub_hostdisk_find_partition_start):
	Use grub_util_get_dm_node_linear_info.
	* util/getroot.c (convert_system_partition_to_system_disk): Use
	grub_util_info rather than grub_dprintf.
	(grub_util_biosdisk_get_grub_dev): Add a new grub_util_info.
2012-06-07 14:24:48 +02:00
Vladimir 'phcoder' Serbinenko
7bc06a4995 * grub-core/disk/ieee1275/ofdisk.c (quiesce): New function.
(grub_ofdisk_fini): Quiesce USB devices.
2012-06-06 19:00:04 +02:00
Vladimir 'phcoder' Serbinenko
49cea015c0 * grub-core/loader/powerpc/ieee1275/linux.c (grub_linux_boot): Sync
caches.
2012-06-06 18:58:19 +02:00
Vladimir 'phcoder' Serbinenko
5b25873518 * grub-core/disk/pata.c (grub_pata_pio_read)
[GRUB_MACHINE_MIPS_QEMU_MIPS]: Don't byteswap even on mipseb.
	(grub_pata_pio_write) [GRUB_MACHINE_MIPS_QEMU_MIPS]: Likewise.
2012-06-06 12:38:49 +02:00
Vladimir 'phcoder' Serbinenko
37ba07ebaf Extend automated tests to qemu-mips.
* Makefile.am: reorganise tests and enable qemu-mips.
	* configure.ac (COND_mipseb), (COND_mipsel): New conditions.
	* grub-core/tests/boot/linux.init-mips.S: New file.
	* tests/partmap_test.in: Handle ata0 disks.
	* tests/util/grub-shell.in: Handle qemu-mips. Make defaults work on
	non-pc i386.
2012-06-06 12:36:33 +02:00
Vladimir 'phcoder' Serbinenko
004be2cd95 * grub-core/kern/mips/qemu_mips/init.c (grub_exit): Implement.
(grub_halt): Likewise.
	* grub-core/lib/mips/qemu_mips/reboot.c (grub_reboot): Likewise.
2012-06-06 12:28:25 +02:00
Vladimir 'phcoder' Serbinenko
b1622487a8 * grub-core/term/serial.c (grub_serial_register)
[GRUB_MACHINE_MIPS_QEMU_MIPS]: Don't autostart console in order to bring
	the behaviour in line with x86 platforms.
2012-06-06 12:25:13 +02:00
Vladimir 'phcoder' Serbinenko
b7b4ab33ae * grub-core/commands/hdparm.c (le16_to_char): Always byte-swap strings.
(grub_ata_strncpy): Likewise.
	(grub_ata_identify): Add missing byteswaps.
2012-06-06 12:22:32 +02:00