~ubuntu-branches/debian/stretch/grub2/stretch

« back to all changes in this revision

Viewing changes to include/grub/fs.h

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2010-06-15 12:45:35 UTC
  • mto: (1.14.1 upstream) (17.3.18 experimental)
  • mto: This revision was merged to the branch mainline in revision 36.
  • Revision ID: james.westby@ubuntu.com-20100615124535-9vfbis4kzv0h5bgy
Tags: upstream-1.98+20100614
ImportĀ upstreamĀ versionĀ 1.98+20100614

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include <grub/symbol.h>
25
25
#include <grub/types.h>
26
26
 
 
27
#include <grub/list.h>
 
28
 
27
29
/* Forward declaration is required, because of mutual reference.  */
28
30
struct grub_file;
29
31
 
38
40
/* Filesystem descriptor.  */
39
41
struct grub_fs
40
42
{
 
43
  /* The next filesystem.  */
 
44
  struct grub_fs *next;
 
45
 
41
46
  /* My name.  */
42
47
  const char *name;
43
48
 
72
77
  /* Whether this filesystem reserves first sector for DOS-style boot.  */
73
78
  int reserved_first_sector;
74
79
#endif
75
 
 
76
 
  /* The next filesystem.  */
77
 
  struct grub_fs *next;
78
80
};
79
81
typedef struct grub_fs *grub_fs_t;
80
82
 
87
89
   the linked list GRUB_FS_LIST through the function grub_fs_register.  */
88
90
typedef int (*grub_fs_autoload_hook_t) (void);
89
91
extern grub_fs_autoload_hook_t EXPORT_VAR(grub_fs_autoload_hook);
90
 
 
91
 
void EXPORT_FUNC(grub_fs_register) (grub_fs_t fs);
92
 
void EXPORT_FUNC(grub_fs_unregister) (grub_fs_t fs);
93
 
void EXPORT_FUNC(grub_fs_iterate) (int (*hook) (const grub_fs_t fs));
 
92
extern grub_fs_t EXPORT_VAR (grub_fs_list);
 
93
 
 
94
#ifndef GRUB_LST_GENERATOR
 
95
static inline void
 
96
grub_fs_register (grub_fs_t fs)
 
97
{
 
98
  grub_list_push (GRUB_AS_LIST_P (&grub_fs_list), GRUB_AS_LIST (fs));
 
99
}
 
100
#endif
 
101
 
 
102
static inline void
 
103
grub_fs_unregister (grub_fs_t fs)
 
104
{
 
105
  grub_list_remove (GRUB_AS_LIST_P (&grub_fs_list), GRUB_AS_LIST (fs));
 
106
}
 
107
 
 
108
#define FOR_FILESYSTEMS(var) FOR_LIST_ELEMENTS((var), (grub_fs_list))
 
109
 
94
110
grub_fs_t EXPORT_FUNC(grub_fs_probe) (grub_device_t device);
95
111
 
96
112
#endif /* ! GRUB_FS_HEADER */