device.h 1.34 KB
Newer Older
okuji's avatar
okuji committed
1 2
/* device.h - device manager */
/*
3
 *  GRUB  --  GRand Unified Bootloader
4
 *  Copyright (C) 2002,2005,2007  Free Software Foundation, Inc.
okuji's avatar
okuji committed
5
 *
6
 *  GRUB is free software: you can redistribute it and/or modify
okuji's avatar
okuji committed
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
okuji's avatar
okuji committed
9 10
 *  (at your option) any later version.
 *
11
 *  GRUB is distributed in the hope that it will be useful,
okuji's avatar
okuji committed
12 13 14 15 16
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
17
 *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
okuji's avatar
okuji committed
18 19
 */

20 21
#ifndef GRUB_DEVICE_HEADER
#define GRUB_DEVICE_HEADER	1
okuji's avatar
okuji committed
22

23 24
#include <grub/symbol.h>
#include <grub/err.h>
okuji's avatar
okuji committed
25

26
struct grub_disk;
27
struct grub_net;
okuji's avatar
okuji committed
28

29
struct grub_device
okuji's avatar
okuji committed
30
{
31 32
  struct grub_disk *disk;
  struct grub_net *net;
okuji's avatar
okuji committed
33
};
34
typedef struct grub_device *grub_device_t;
okuji's avatar
okuji committed
35

36 37
typedef int (*grub_device_iterate_hook_t) (const char *name, void *data);

38 39
grub_device_t EXPORT_FUNC(grub_device_open) (const char *name);
grub_err_t EXPORT_FUNC(grub_device_close) (grub_device_t device);
40 41
int EXPORT_FUNC(grub_device_iterate) (grub_device_iterate_hook_t hook,
				      void *hook_data);
okuji's avatar
okuji committed
42

43
#endif /* ! GRUB_DEVICE_HEADER */