]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* include/grub/emu/hostdisk.h: Move file operations to
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 15 Oct 2013 11:56:10 +0000 (13:56 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 15 Oct 2013 11:56:10 +0000 (13:56 +0200)
* include/grub/emu/hostfile.h: ... here.

ChangeLog
grub-core/Makefile.am
include/grub/emu/hostdisk.h
include/grub/emu/hostfile.h [new file with mode: 0644]

index 49e5784d9394a5a91d33c867a01bb89b84ffada0..620672eade00042a543ba607753ac22de8200e0f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-15  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * include/grub/emu/hostdisk.h: Move file operations to
+       * include/grub/emu/hostfile.h: ... here.
+
 2013-10-15  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/osdep/windows/hostdisk.c (canonicalize_file_name): Handle
index c0ceb216f4ba54d78859f30af692dff3beb30496..7d84496061f0b91b17032cc5339c3f6f7c0673a2 100644 (file)
@@ -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
index b15abcbca79c3855591a5850a2be85f6ad159ded..a150467d55f3789da0ff2e6fdc7a6416a52f286f 100644 (file)
 #include <grub/disk.h>
 #include <grub/partition.h>
 #include <sys/types.h>
-#include <grub/osdep/hostfile.h>
-
-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/emu/hostfile.h>
 
 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 (file)
index 0000000..0c796e2
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GRUB_HOSTFILE_EMU_HEADER
+#define GRUB_HOSTFILE_EMU_HEADER       1
+
+#include <grub/disk.h>
+#include <grub/partition.h>
+#include <sys/types.h>
+#include <grub/osdep/hostfile.h>
+
+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 */