Skip to content

Commit ad4bfee

Browse files
committed
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>
1 parent c672599 commit ad4bfee

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+247
-246
lines changed

grub-core/commands/ls.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,9 @@ grub_ls_list_files (char *dirname, int longlist, int all, int human)
221221
};
222222

223223
if (longlist)
224-
(fs->dir) (dev, path, print_files_long, &ctx);
224+
(fs->fs_dir) (dev, path, print_files_long, &ctx);
225225
else
226-
(fs->dir) (dev, path, print_files, &ctx);
226+
(fs->fs_dir) (dev, path, print_files, &ctx);
227227

228228
if (grub_errno == GRUB_ERR_BAD_FILE_TYPE
229229
&& path[grub_strlen (path) - 1] != '/')

grub-core/commands/macbless.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,12 @@ grub_mac_bless_file (grub_device_t dev, const char *path_in, int intel)
159159
*tail = 0;
160160
ctx.dirname = tail + 1;
161161

162-
(fs->dir) (dev, *path == 0 ? "/" : path, find_inode, &ctx);
162+
(fs->fs_dir) (dev, *path == 0 ? "/" : path, find_inode, &ctx);
163163
}
164164
else
165165
{
166166
ctx.dirname = path + 1;
167-
(fs->dir) (dev, "/", find_inode, &ctx);
167+
(fs->fs_dir) (dev, "/", find_inode, &ctx);
168168
}
169169
if (!ctx.found)
170170
{

grub-core/commands/nativedisk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ get_uuid (const char *name, char **uuid, int getnative)
109109
grub_device_close (dev);
110110
return grub_errno;
111111
}
112-
if (!fs->uuid || fs->uuid (dev, uuid) || !*uuid)
112+
if (!fs->fs_uuid || fs->fs_uuid (dev, uuid) || !*uuid)
113113
{
114114
grub_device_close (dev);
115115

grub-core/commands/pgp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ pseudo_read (struct grub_file *file, char *buf, grub_size_t len)
934934
struct grub_fs pseudo_fs =
935935
{
936936
.name = "pseudo",
937-
.read = pseudo_read
937+
.fs_read = pseudo_read
938938
};
939939

940940
struct grub_file_verifier grub_pubkey_verifier =

grub-core/commands/probe.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ grub_cmd_probe (grub_extcmd_context_t ctxt, int argc, char **args)
113113
if (state[4].set)
114114
{
115115
char *uuid;
116-
if (! fs->uuid)
116+
if (! fs->fs_uuid)
117117
return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
118118
N_("%s does not support UUIDs"), fs->name);
119-
err = fs->uuid (dev, &uuid);
119+
err = fs->fs_uuid (dev, &uuid);
120120
if (err)
121121
return err;
122122
if (! uuid)
@@ -134,11 +134,11 @@ grub_cmd_probe (grub_extcmd_context_t ctxt, int argc, char **args)
134134
if (state[5].set)
135135
{
136136
char *label;
137-
if (! fs->label)
137+
if (! fs->fs_label)
138138
return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
139139
N_("filesystem `%s' does not support labels"),
140140
fs->name);
141-
err = fs->label (dev, &label);
141+
err = fs->fs_label (dev, &label);
142142
if (err)
143143
return err;
144144
if (! label)

grub-core/commands/search.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ iterate_device (const char *name, void *data)
103103
fs = grub_fs_probe (dev);
104104

105105
#ifdef DO_SEARCH_FS_UUID
106-
#define read_fn uuid
106+
#define read_fn fs_uuid
107107
#else
108-
#define read_fn label
108+
#define read_fn fs_label
109109
#endif
110110

111111
if (fs && fs->read_fn)

grub-core/commands/test.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,15 @@ get_fileinfo (char *path, struct test_parse_ctx *ctx)
133133

134134
/* Fetch writing time. */
135135
ctx->file_info.mtimeset = 0;
136-
if (fs->mtime)
136+
if (fs->fs_mtime)
137137
{
138-
if (! fs->mtime (dev, &ctx->file_info.mtime))
138+
if (! fs->fs_mtime (dev, &ctx->file_info.mtime))
139139
ctx->file_info.mtimeset = 1;
140140
grub_errno = GRUB_ERR_NONE;
141141
}
142142
}
143143
else
144-
(fs->dir) (dev, path, find_file, ctx);
144+
(fs->fs_dir) (dev, path, find_file, ctx);
145145

146146
grub_device_close (dev);
147147
grub_free (path);

grub-core/commands/verifiers.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ verified_close (struct grub_file *file)
7171
struct grub_fs verified_fs =
7272
{
7373
.name = "verified_read",
74-
.read = verified_read,
75-
.close = verified_close
74+
.fs_read = verified_read,
75+
.fs_close = verified_close
7676
};
7777

7878
static grub_file_t

grub-core/commands/wildcard.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ match_files (const char *prefix, const char *suffix, const char *end,
370370
else
371371
path = ctx.dir;
372372

373-
if (fs->dir (dev, path, match_files_iter, &ctx))
373+
if (fs->fs_dir (dev, path, match_files_iter, &ctx))
374374
goto fail;
375375

376376
grub_free (ctx.dir);
@@ -452,7 +452,7 @@ check_file (const char *dir, const char *basename)
452452
else
453453
path = dir;
454454

455-
fs->dir (dev, path[0] ? path : "/", check_file_iter, &ctx);
455+
fs->fs_dir (dev, path[0] ? path : "/", check_file_iter, &ctx);
456456
if (grub_errno == 0 && basename[0] == 0)
457457
ctx.found = 1;
458458

grub-core/fs/affs.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -685,12 +685,12 @@ grub_affs_mtime (grub_device_t device, grub_int32_t *t)
685685
static struct grub_fs grub_affs_fs =
686686
{
687687
.name = "affs",
688-
.dir = grub_affs_dir,
689-
.open = grub_affs_open,
690-
.read = grub_affs_read,
691-
.close = grub_affs_close,
692-
.label = grub_affs_label,
693-
.mtime = grub_affs_mtime,
688+
.fs_dir = grub_affs_dir,
689+
.fs_open = grub_affs_open,
690+
.fs_read = grub_affs_read,
691+
.fs_close = grub_affs_close,
692+
.fs_label = grub_affs_label,
693+
.fs_mtime = grub_affs_mtime,
694694

695695
#ifdef GRUB_UTIL
696696
.reserved_first_sector = 0,

0 commit comments

Comments
 (0)