/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2002,2007 Free Software Foundation, Inc.
*
* 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_FILE_HEADER
/* File description. */
struct grub_file
{
/* The underlying device. */
/* The underlying filesystem. */
/* The current offset. */
/* The file size. */
/* If file is not easily seekable. Should be set by underlying layer. */
int not_easily_seekable;
/* Filesystem-specific data. */
void *data;
/* This is called when a sector is read. Used only for a disk device. */
int is_size_approximate;
int enable_progress;
};
/* Filters with lower ID are executed first. */
typedef enum grub_file_filter_id
{
extern int EXPORT_VAR(grub_file_force_not_easily_seekable);
static inline void
{
};
static inline void
{
grub_file_filters_all[id] = 0;
grub_file_filters_enabled[id] = 0;
};
static inline void
{
grub_file_filters_enabled[id] = 0;
};
static inline void
{
for (id = GRUB_FILE_FILTER_COMPRESSION_FIRST;
grub_file_filters_enabled[id] = 0;
};
/* Get a device name from NAME. */
/* Return value of grub_file_size() in case file size is unknown. */
static inline grub_off_t
{
}
static inline grub_off_t
{
}
static inline int
{
return !file->not_easily_seekable;
}
#endif /* ! GRUB_FILE_HEADER */