From: Vladimir 'phcoder' Serbinenko Date: Tue, 15 Oct 2013 11:56:10 +0000 (+0200) Subject: * include/grub/emu/hostdisk.h: Move file operations to X-Git-Tag: grub-2.02-beta1~693 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d7750b324f53d88291725a367d162dcfc2bba56b;p=thirdparty%2Fgrub.git * include/grub/emu/hostdisk.h: Move file operations to * include/grub/emu/hostfile.h: ... here. --- diff --git a/ChangeLog b/ChangeLog index 49e5784d9..620672ead 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-10-15 Vladimir Serbinenko + + * include/grub/emu/hostdisk.h: Move file operations to + * include/grub/emu/hostfile.h: ... here. + 2013-10-15 Vladimir Serbinenko * grub-core/osdep/windows/hostdisk.c (canonicalize_file_name): Handle diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am index c0ceb216f..7d8449606 100644 --- a/grub-core/Makefile.am +++ b/grub-core/Makefile.am @@ -219,6 +219,7 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/datetime.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/misc.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/net.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/hostdisk.h +KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/hostfile.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h if COND_GRUB_EMU_SDL KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/sdl.h diff --git a/include/grub/emu/hostdisk.h b/include/grub/emu/hostdisk.h index b15abcbca..a150467d5 100644 --- a/include/grub/emu/hostdisk.h +++ b/include/grub/emu/hostdisk.h @@ -23,16 +23,7 @@ #include #include #include -#include - -grub_util_fd_t -EXPORT_FUNC(grub_util_fd_open) (const char *os_dev, int flags); -const char * -EXPORT_FUNC(grub_util_fd_strerror) (void); -void -grub_util_fd_sync (grub_util_fd_t fd); -void -EXPORT_FUNC(grub_util_fd_close) (grub_util_fd_t fd); +#include grub_util_fd_t grub_util_fd_open_device (const grub_disk_t disk, grub_disk_addr_t sector, int flags, @@ -47,10 +38,6 @@ int grub_util_biosdisk_is_floppy (grub_disk_t disk); const char * grub_util_biosdisk_get_compatibility_hint (grub_disk_t disk); grub_err_t grub_util_biosdisk_flush (struct grub_disk *disk); -int -grub_util_fd_seek (grub_util_fd_t fd, grub_uint64_t offset); -ssize_t EXPORT_FUNC(grub_util_fd_read) (grub_util_fd_t fd, char *buf, size_t len); -ssize_t EXPORT_FUNC(grub_util_fd_write) (grub_util_fd_t fd, const char *buf, size_t len); grub_err_t grub_cryptodisk_cheat_mount (const char *sourcedev, const char *cheat); const char * @@ -69,8 +56,6 @@ grub_util_ldm_embed (struct grub_disk *disk, unsigned int *nsectors, const char * grub_hostdisk_os_dev_to_grub_drive (const char *os_dev, int add); -grub_uint64_t -grub_util_get_fd_size (grub_util_fd_t fd, const char *name, unsigned *log_secsize); char * grub_util_get_os_disk (const char *os_dev); diff --git a/include/grub/emu/hostfile.h b/include/grub/emu/hostfile.h new file mode 100644 index 000000000..0c796e21b --- /dev/null +++ b/include/grub/emu/hostfile.h @@ -0,0 +1,46 @@ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2013 Free Software Foundation, Inc. + * + * GRUB is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * GRUB is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GRUB. If not, see . + */ + +#ifndef GRUB_HOSTFILE_EMU_HEADER +#define GRUB_HOSTFILE_EMU_HEADER 1 + +#include +#include +#include +#include + +int +grub_util_fd_seek (grub_util_fd_t fd, grub_uint64_t off); +ssize_t +EXPORT_FUNC(grub_util_fd_read) (grub_util_fd_t fd, char *buf, size_t len); +ssize_t +EXPORT_FUNC(grub_util_fd_write) (grub_util_fd_t fd, const char *buf, size_t len); + +grub_util_fd_t +EXPORT_FUNC(grub_util_fd_open) (const char *os_dev, int flags); +const char * +EXPORT_FUNC(grub_util_fd_strerror) (void); +void +grub_util_fd_sync (grub_util_fd_t fd); +void +EXPORT_FUNC(grub_util_fd_close) (grub_util_fd_t fd); + +grub_uint64_t +grub_util_get_fd_size (grub_util_fd_t fd, const char *name, unsigned *log_secsize); + +#endif /* ! GRUB_BIOSDISK_MACHINE_UTIL_HEADER */