Commit graph

1990 commits

Author SHA1 Message Date
Vladimir Serbinenko
f169f65e75 * grub-core/fs/hfspluscomp.c (hfsplus_read_compressed_real): Call
file_progress_read_hook.
	* grub-core/fs/ntfscomp.c (hfsplus_read_compressed_real): Likewise.
2013-11-02 16:30:53 +01:00
Vladimir Serbinenko
cb72aa1809 Rewrite blocklist functions in order to get progress when
reading large extents and decrease amount of blocklist hook calls.
2013-11-01 23:28:03 +01:00
Vladimir Serbinenko
89295a0628 Support --base-clock for serial command to handle weird cards with
non-standard base clock.
2013-11-01 19:33:22 +01:00
Vladimir Serbinenko
eb03ede014 * grub-core/fs/ext2.c (grub_ext2_read_symlink): Use memcpy rather
strncpy.
	* grub-core/fs/jfs.c (grub_jfs_lookup_symlink): Likewise.
	* grub-core/kern/misc.c (grub_strncpy): Move from here ...
	* include/grub/misc.h (grub_strncpy): ... to here. Make inline.
	* grub-core/net/net.c (grub_net_addr_to_str): Use COMPILE_TIME_ASSERT
	+ strcpy rather than strncpy.
2013-11-01 18:44:46 +01:00
Vladimir Serbinenko
e54b8f536b * include/grub/misc.h (grub_strcat): Removed. All users changed to
more appropriate functions.
2013-11-01 16:27:37 +01:00
Vladimir Serbinenko
329550c4a9 * grub-core/loader/multiboot_mbi2.c: Implement EFI memory map. 2013-10-28 15:37:00 +01:00
Vladimir Serbinenko
00bfa988fc * grub-core/loader/multiboot.c: Add support for multiboot kernels
quirks.
2013-10-28 15:23:46 +01:00
Vladimir Serbinenko
5177391ebe * include/grub/emu/hostdisk.h: Add proper declaration for grub_host_init
and grub_hostfs_init.
2013-10-28 13:33:12 +01:00
Vladimir Serbinenko
82591fa6e7 Make / in btrfs refer to real root, not the default volume.
Modify mkrelpath to work even if device is mounted with subvolid option.
2013-10-28 01:37:19 +01:00
Vladimir Serbinenko
442b86de32 Move grub_disk_write out of kernel into disk.mod. 2013-10-27 15:44:55 +01:00
Vladimir Serbinenko
a8f15bceea * grub-core/kern/misc.c (grub_abort): Make static 2013-10-27 14:13:39 +01:00
Vladimir Serbinenko
c81acb7ff3 Consolidate cpuid code. 2013-10-27 00:02:01 +02:00
Vladimir Serbinenko
c1bee64676 Move cpuid code to cpuid.h and TSC code to tsc.c. 2013-10-26 23:39:10 +02:00
Vladimir Serbinenko
2a8a75855c * grub-core/fs/iso9660.c: Replace strncat with memcpy.
* include/grub/misc.h: Remove strncat.
	* grub-core/lib/posix_wrap/string.h: Likewise.
2013-10-26 12:49:51 +02:00
Vladimir Serbinenko
10bafa1c38 * grub-core/normal/datetime.c (grub_unixtime2datetime): Fix mishandling
of first three years after start of validity of unixtime.
2013-10-26 02:47:40 +02:00
Vladimir Serbinenko
a28567364a Make char and string width grub_size_t rather than grub_ssize_t. 2013-10-25 23:58:24 +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
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
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
979d9f521d * grub-core/fs/ntfs.c: Handle 48-bit MFT no. 2013-10-21 12:58:38 +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
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
2028576504 Add haiku-specific functions. 2013-10-19 16:39:38 +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
6f65237374 * util/grub-render-label.c: Move backend part to ...
* util/render-label.c: ... here.
2013-10-19 02:37:01 +02:00
Vladimir 'phcoder' Serbinenko
44d1c20a13 * util/grub-render-label.c: Move backend part to ...
* util/render-label.c: ... here.
2013-10-19 02:34:18 +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
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
f4ccf29dd5 * include/grub/dl.h: Remove double declaration of GRUB_MOD_DEP.
Use __unused__ rather than __used__ on gcc < 3.2.
2013-10-18 16:41:50 +02:00
Vladimir 'phcoder' Serbinenko
0d3a6f8540 * include/grub/setjmp.h: Define RETURNS_TWICE. Keep it empty for
gcc < 4.0.
	* include/grub/*/setjmp.h: USe RETURNS_TWICE.
2013-10-18 16:38:36 +02:00
Vladimir 'phcoder' Serbinenko
fb320faf88 * include/grub/misc.h: Don't use warn_unused_result on gcc < 3.4.
* include/grub/emu/misc.h: Likewise.
2013-10-18 16:34:18 +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 'phcoder' Serbinenko
bacfefbb0e * util/grub-editenv.c (create_envblk_file): More from here ...
* util/editenv.c (grub_util_create_envblk_file): ... to here.
2013-10-15 21:23:54 +02:00
Vladimir 'phcoder' Serbinenko
7b83ca449b * include/grub/osdep/hostfile_windows.h: Add missing ftello for
mingw32.
2013-10-15 20:32:07 +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
ec16e02639 * util/grub-mkimage.c: Move backend part to ...
* util/mkimage.c: ... here.
2013-10-15 19:14:55 +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
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
27f9d02eb9 * configure.ac: Check for nvlist_lookup_string in nvpair since we
use nvlist_lookup_string and don't use nvlist_print.
2013-10-15 15:01:01 +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
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
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
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
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
84379b61d2 * include/grub/osdep/hostfile_windows.h (grub_util_utf8_to_tchar): Add
missing prototype.
	(grub_util_tchar_to_utf8): Likewise.
2013-10-14 02:09:38 +02:00