mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 23:32:39 +00:00
* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_open): Use
grub_util_fd_strerror when using grub_util_fd_*. (grub_util_fd_open_device): Likewise. (grub_util_biosdisk_read): Likewise. (grub_util_biosdisk_write): Likewise. * grub-core/kern/emu/hostdisk_unix.c (grub_util_fd_open): New function. (grub_util_fd_strerror): Likewise. (grub_util_fd_sync): Likewise. (grub_util_fd_close): Likewise. * grub-core/kern/emu/hostdisk_windows.c (grub_util_fd_sync): Likewise. (grub_util_fd_close): Likewise. (grub_util_fd_strerror): Likewise. * include/grub/emu/hostdisk.h (grub_util_fd_close): Make into real function proto rather than macro. (grub_util_fd_sync): Likewise. (grub_util_fd_open): Likewise. (grub_util_fd_strerror): New proto.
This commit is contained in:
1 parent
e8fd80bc3d
commit
43b1c99d53
5 files changed
+92
-11
No files matched your search
@@ -166,4 +166,28 @@ grub_util_fd_write (grub_util_fd_t fd, const char *buf, size_t len)
|
||||
return size;
|
||||
}
|
||||
|
||||
grub_util_fd_t
|
||||
grub_util_fd_open (const char *os_dev, int flags)
|
||||
{
|
||||
return open (os_dev, flags);
|
||||
}
|
||||
|
||||
const char *
|
||||
grub_util_fd_strerror (void)
|
||||
{
|
||||
return strerror (errno);
|
||||
}
|
||||
|
||||
void
|
||||
grub_util_fd_sync (grub_util_fd_t fd)
|
||||
{
|
||||
fsync (fd);
|
||||
}
|
||||
|
||||
void
|
||||
grub_util_fd_close (grub_util_fd_t fd)
|
||||
{
|
||||
close (fd);
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user