Indentation fix, cleanup.
[AROS.git] / arch / all-pc / boot / grub2-aros / include / grub / archelp.h
blob2611d7f45005efae5cc61a896b7506ca451062d9
1 /* archelp.h -- Archive helper functions */
2 /*
3 * GRUB -- GRand Unified Bootloader
4 * Copyright (C) 2013 Free Software Foundation, Inc.
6 * GRUB is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * GRUB is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef GRUB_ARCHELP_HEADER
21 #define GRUB_ARCHELP_HEADER 1
23 #include <grub/fs.h>
24 #include <grub/file.h>
26 typedef enum
28 GRUB_ARCHELP_ATTR_TYPE = 0160000,
29 GRUB_ARCHELP_ATTR_FILE = 0100000,
30 GRUB_ARCHELP_ATTR_DIR = 0040000,
31 GRUB_ARCHELP_ATTR_LNK = 0120000,
32 GRUB_ARCHELP_ATTR_NOTIME = 0x80000000,
33 GRUB_ARCHELP_ATTR_END = 0xffffffff
34 } grub_archelp_mode_t;
36 struct grub_archelp_data;
38 struct grub_archelp_ops
40 grub_err_t
41 (*find_file) (struct grub_archelp_data *data, char **name,
42 grub_int32_t *mtime,
43 grub_archelp_mode_t *mode);
45 char *
46 (*get_link_target) (struct grub_archelp_data *data);
48 void
49 (*rewind) (struct grub_archelp_data *data);
52 grub_err_t
53 grub_archelp_dir (struct grub_archelp_data *data,
54 struct grub_archelp_ops *ops,
55 const char *path_in,
56 grub_fs_dir_hook_t hook, void *hook_data);
58 grub_err_t
59 grub_archelp_open (struct grub_archelp_data *data,
60 struct grub_archelp_ops *ops,
61 const char *name_in);
63 #endif