Commit graph

2653 commits

Author SHA1 Message Date
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