* 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:
parent
e8fd80bc3d
commit
43b1c99d53
5 changed files with 92 additions and 11 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue