Change fs functions to add fs_ prefix

This avoid conflict with gnulib

Signed-off-by: Vladimir Serbinenko <phcoder@google.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Vladimir Serbinenko 2019-04-08 07:24:24 +02:00 committed by Vladimir Serbinenko
parent c6725996a9
commit ad4bfeec5c
55 changed files with 247 additions and 246 deletions

View file

@ -221,9 +221,9 @@ grub_ls_list_files (char *dirname, int longlist, int all, int human)
};
if (longlist)
(fs->dir) (dev, path, print_files_long, &ctx);
(fs->fs_dir) (dev, path, print_files_long, &ctx);
else
(fs->dir) (dev, path, print_files, &ctx);
(fs->fs_dir) (dev, path, print_files, &ctx);
if (grub_errno == GRUB_ERR_BAD_FILE_TYPE
&& path[grub_strlen (path) - 1] != '/')

View file

@ -159,12 +159,12 @@ grub_mac_bless_file (grub_device_t dev, const char *path_in, int intel)
*tail = 0;
ctx.dirname = tail + 1;
(fs->dir) (dev, *path == 0 ? "/" : path, find_inode, &ctx);
(fs->fs_dir) (dev, *path == 0 ? "/" : path, find_inode, &ctx);
}
else
{
ctx.dirname = path + 1;
(fs->dir) (dev, "/", find_inode, &ctx);
(fs->fs_dir) (dev, "/", find_inode, &ctx);
}
if (!ctx.found)
{

View file

@ -109,7 +109,7 @@ get_uuid (const char *name, char **uuid, int getnative)
grub_device_close (dev);
return grub_errno;
}
if (!fs->uuid || fs->uuid (dev, uuid) || !*uuid)
if (!fs->fs_uuid || fs->fs_uuid (dev, uuid) || !*uuid)
{
grub_device_close (dev);

View file

@ -934,7 +934,7 @@ pseudo_read (struct grub_file *file, char *buf, grub_size_t len)
struct grub_fs pseudo_fs =
{
.name = "pseudo",
.read = pseudo_read
.fs_read = pseudo_read
};
struct grub_file_verifier grub_pubkey_verifier =

View file

@ -113,10 +113,10 @@ grub_cmd_probe (grub_extcmd_context_t ctxt, int argc, char **args)
if (state[4].set)
{
char *uuid;
if (! fs->uuid)
if (! fs->fs_uuid)
return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
N_("%s does not support UUIDs"), fs->name);
err = fs->uuid (dev, &uuid);
err = fs->fs_uuid (dev, &uuid);
if (err)
return err;
if (! uuid)
@ -134,11 +134,11 @@ grub_cmd_probe (grub_extcmd_context_t ctxt, int argc, char **args)
if (state[5].set)
{
char *label;
if (! fs->label)
if (! fs->fs_label)
return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
N_("filesystem `%s' does not support labels"),
fs->name);
err = fs->label (dev, &label);
err = fs->fs_label (dev, &label);
if (err)
return err;
if (! label)

View file

@ -103,9 +103,9 @@ iterate_device (const char *name, void *data)
fs = grub_fs_probe (dev);
#ifdef DO_SEARCH_FS_UUID
#define read_fn uuid
#define read_fn fs_uuid
#else
#define read_fn label
#define read_fn fs_label
#endif
if (fs && fs->read_fn)

View file

@ -133,15 +133,15 @@ get_fileinfo (char *path, struct test_parse_ctx *ctx)
/* Fetch writing time. */
ctx->file_info.mtimeset = 0;
if (fs->mtime)
if (fs->fs_mtime)
{
if (! fs->mtime (dev, &ctx->file_info.mtime))
if (! fs->fs_mtime (dev, &ctx->file_info.mtime))
ctx->file_info.mtimeset = 1;
grub_errno = GRUB_ERR_NONE;
}
}
else
(fs->dir) (dev, path, find_file, ctx);
(fs->fs_dir) (dev, path, find_file, ctx);
grub_device_close (dev);
grub_free (path);

View file

@ -71,8 +71,8 @@ verified_close (struct grub_file *file)
struct grub_fs verified_fs =
{
.name = "verified_read",
.read = verified_read,
.close = verified_close
.fs_read = verified_read,
.fs_close = verified_close
};
static grub_file_t

View file

@ -370,7 +370,7 @@ match_files (const char *prefix, const char *suffix, const char *end,
else
path = ctx.dir;
if (fs->dir (dev, path, match_files_iter, &ctx))
if (fs->fs_dir (dev, path, match_files_iter, &ctx))
goto fail;
grub_free (ctx.dir);
@ -452,7 +452,7 @@ check_file (const char *dir, const char *basename)
else
path = dir;
fs->dir (dev, path[0] ? path : "/", check_file_iter, &ctx);
fs->fs_dir (dev, path[0] ? path : "/", check_file_iter, &ctx);
if (grub_errno == 0 && basename[0] == 0)
ctx.found = 1;