Commit graph

10 commits

Author SHA1 Message Date
Vladimir Serbinenko
4f9541226c Introduce grub_util_file_sync and use it instead of fsync(fileno(f)).
Fixes build for windows.
2013-11-27 14:13:50 +01:00
Colin Watson
5c7206e45e Speed up test suite by avoiding fsync
Add grub_util_disable_fd_syncs call to turn grub_util_fd_sync calls into
no-ops, and use it in programs that copy files but do not need to take
special care to sync writes (grub-mknetdir, grub-rescue,
grub-mkstandalone).

On my laptop, this reduces partmap_test's runtime from 1236 seconds to
204 seconds.
2013-11-27 10:10:22 +00:00
Colin Watson
07e3b04742 Add a --locale-directory option to grub-install and related tools.
* include/grub/util/install.h (GRUB_INSTALL_OPTIONS): Add
--locale-directory option.
(enum grub_install_options): Add
GRUB_INSTALL_OPTIONS_LOCALE_DIRECTORY.
* util/grub-install-common.c (grub_install_help_filter): Handle
GRUB_INSTALL_OPTIONS_LOCALE_DIRECTORY.
(grub_install_parse): Likewise.
(get_localedir): New function to check for a user-provided option
before trying grub_util_get_localedir.
(copy_locales): Use get_localedir rather than
grub_util_get_localedir.  Handle differing locale directory layouts.
(grub_install_copy_files): Likewise.
2013-11-25 18:04:50 +00:00
Vladimir Serbinenko
4a23e2fe29 Add *-xen to the list of grub-install-common platforms. 2013-11-22 14:21:16 +01:00
Colin Watson
4402db3ecc * util/grub-install-common.c (copy_locales): Consistently use
grub_util_get_localedir () rather than LOCALEDIR.
(grub_install_copy_files): Likewise.
2013-11-19 15:35:44 +00:00
Vladimir Serbinenko
b40ce65180 * util/grub-install-common.c (grub_install_copy_files): Fix module
destination directory.
2013-11-18 15:59:55 +01:00
Vladimir Serbinenko
a284320e1e Fix handling of install lists. 2013-11-18 11:38:00 +01:00
Vladimir Serbinenko
3a129dba59 * util/grub-install-common.c (grub_install_parse): Recognize
--compress=none like shell script did.
2013-11-17 02:01:21 +01:00
Vladimir Serbinenko
d4d55b29e0 * util/grub-install-common.c (platforms): Fix the order of entries and
remove useless field val.
2013-11-17 00:54:40 +01:00
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