* include/grub/emu/hostdisk.h: Move file operations to

* include/grub/emu/hostfile.h: ... here.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-10-15 13:56:10 +02:00
parent 2859196e5f
commit d7750b324f
4 changed files with 53 additions and 16 deletions

View file

@ -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

View 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

View file

@ -23,16 +23,7 @@
#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);

View file

@ -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 */