2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_ and grub_, respectively. Because the conversion is trivial and mechanical, I omit the details here. Please refer to the CVS if you need more information.
This commit is contained in:
parent
6a1425510d
commit
4b13b216f4
125 changed files with 6198 additions and 6181 deletions
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* PUPA -- Preliminary Universal Programming Architecture for GRUB
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
*
|
||||
* PUPA is free software; you can redistribute it and/or modify
|
||||
* 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 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
|
@ -13,32 +13,32 @@
|
|||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with PUPA; if not, write to the Free Software
|
||||
* along with GRUB; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef PUPA_FILE_HEADER
|
||||
#define PUPA_FILE_HEADER 1
|
||||
#ifndef GRUB_FILE_HEADER
|
||||
#define GRUB_FILE_HEADER 1
|
||||
|
||||
#include <pupa/types.h>
|
||||
#include <pupa/err.h>
|
||||
#include <pupa/device.h>
|
||||
#include <pupa/fs.h>
|
||||
#include <grub/types.h>
|
||||
#include <grub/err.h>
|
||||
#include <grub/device.h>
|
||||
#include <grub/fs.h>
|
||||
|
||||
/* File description. */
|
||||
struct pupa_file
|
||||
struct grub_file
|
||||
{
|
||||
/* The underlying device. */
|
||||
pupa_device_t device;
|
||||
grub_device_t device;
|
||||
|
||||
/* The underlying filesystem. */
|
||||
pupa_fs_t fs;
|
||||
grub_fs_t fs;
|
||||
|
||||
/* The current offset. */
|
||||
pupa_ssize_t offset;
|
||||
grub_ssize_t offset;
|
||||
|
||||
/* The file size. */
|
||||
pupa_ssize_t size;
|
||||
grub_ssize_t size;
|
||||
|
||||
/* Filesystem-specific data. */
|
||||
void *data;
|
||||
|
@ -46,28 +46,28 @@ struct pupa_file
|
|||
/* This is called when a sector is read. Used only for a disk device. */
|
||||
void (*read_hook) (unsigned long sector, unsigned offset, unsigned length);
|
||||
};
|
||||
typedef struct pupa_file *pupa_file_t;
|
||||
typedef struct grub_file *grub_file_t;
|
||||
|
||||
/* Get a device name from NAME. */
|
||||
char *EXPORT_FUNC(pupa_file_get_device_name) (const char *name);
|
||||
char *EXPORT_FUNC(grub_file_get_device_name) (const char *name);
|
||||
|
||||
pupa_file_t EXPORT_FUNC(pupa_file_open) (const char *name);
|
||||
pupa_ssize_t EXPORT_FUNC(pupa_file_read) (pupa_file_t file, char *buf,
|
||||
pupa_ssize_t len);
|
||||
pupa_ssize_t EXPORT_FUNC(pupa_file_seek) (pupa_file_t file,
|
||||
pupa_ssize_t offset);
|
||||
pupa_err_t EXPORT_FUNC(pupa_file_close) (pupa_file_t file);
|
||||
grub_file_t EXPORT_FUNC(grub_file_open) (const char *name);
|
||||
grub_ssize_t EXPORT_FUNC(grub_file_read) (grub_file_t file, char *buf,
|
||||
grub_ssize_t len);
|
||||
grub_ssize_t EXPORT_FUNC(grub_file_seek) (grub_file_t file,
|
||||
grub_ssize_t offset);
|
||||
grub_err_t EXPORT_FUNC(grub_file_close) (grub_file_t file);
|
||||
|
||||
static inline pupa_ssize_t
|
||||
pupa_file_size (const pupa_file_t file)
|
||||
static inline grub_ssize_t
|
||||
grub_file_size (const grub_file_t file)
|
||||
{
|
||||
return file->size;
|
||||
}
|
||||
|
||||
static inline pupa_ssize_t
|
||||
pupa_file_tell (const pupa_file_t file)
|
||||
static inline grub_ssize_t
|
||||
grub_file_tell (const grub_file_t file)
|
||||
{
|
||||
return file->offset;
|
||||
}
|
||||
|
||||
#endif /* ! PUPA_FILE_HEADER */
|
||||
#endif /* ! GRUB_FILE_HEADER */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue