1/*
2 * Copyright 2006, Fran��ois Revol. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5
6/*
7	fmap driver for Haiku
8
9	Maps BEOS/IMAGE.BE files as virtual partitions.
10*/
11
12#include <KernelExport.h>
13#include <Drivers.h>
14#include <Errors.h>
15
16#define MAX_FMAPS 4
17#define DEVNAME_FMT "disk/virtual/fmap/%2d"
18
19int32 api_version = B_CUR_DRIVER_API_VERSION;
20
21status_t
22init_hardware (void)
23{
24	return B_OK;
25}
26
27status_t
28init_driver (void)
29{
30	return B_OK;
31}
32
33void
34uninit_driver (void)
35{
36}
37
38static const char *fmap_name[MAX_FMAPS+1] = {
39	NULL
40};
41
42device_hooks fmap_hooks = {
43	NULL, /* open */
44	NULL, /* close */
45	NULL, /* free */
46	NULL, /* control */
47	NULL, /* read */
48	NULL, /* write */
49	NULL, NULL, NULL, NULL
50};
51
52const char**
53publish_devices()
54{
55	return fmap_name;
56}
57
58device_hooks*
59find_device(const char* name)
60{
61	return &fmap_hooks;
62}
63