Commit Graph

25 Commits

Author SHA1 Message Date
Vladimir Serbinenko cd46aa6cef Rewrite grub-install, grub-mkrescue, grub-mkstandalone and grub-mknetdir
the function of these files exceeds what can be sanely handled in shell
	in posix-comaptible way. Also writing it in C extends the functionality
	to non-UNIX-like OS and minimal environments.
2013-11-16 20:21:16 +01:00
Colin Watson 9b45c0733e * grub-core/osdep/unix/emuconsole.c (put): Pacify the compiler on
systems that require checking the return value of write.
2013-11-13 13:34:57 +00:00
Vladimir Serbinenko 6a74c4dfff * grub-core/osdep/unix/getroot.c [HAVE_STRUCT_STATFS_F_FSTYPENAME
&& HAVE_STRUCT_STATFS_F_MNTFROMNAME]: Include sys/param.h and
	sys/mount.h.
2013-11-11 23:10:30 +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
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 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 2028576504 Add haiku-specific functions. 2013-10-19 16:39:38 +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 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 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 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 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 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
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 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 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 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