Vladimir Serbinenko
27d1a67f8a
Fix canonicalize_file_name clash.
...
canonicalize_file_name clashed with gnulib function. Additionally
it was declared in 2 places: emu/misc.h and util/misc.h. Added
grub_ prefix and removed second declaration.
2015-03-04 01:00:19 +01:00
Felix Janda
3bac4caa2b
Remove direct _llseek code and require long filesystem libc.
2015-01-22 19:54:36 +01:00
Vladimir Serbinenko
e5fa26e573
Make newly-created files other than grub.cfg world-readable.
2013-12-24 17:36:10 +01:00
Vladimir Serbinenko
4f979ccbf1
Use unix functions for temporary files and special files on cygwin.
2013-12-16 13:16:37 +01:00
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
3bf4088b8b
* grub-core/osdep/unix/hostdisk.c (grub_util_make_temporary_file):
...
Handle errors from mkstemp.
(grub_util_make_temporary_dir): Handle errors from mkdtemp.
2013-11-18 12:27:44 +00: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
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
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
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
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
672fa55e81
Move OS-dependent files to grub-core/osdep and document it.
2013-10-08 17:30:22 +02:00