Added power management functions to support Dano (needed to boot Dano using

our file system):
- added bfs_wake_vnode(), and bfs_suspend_vnode()
- bumped B_CUR_FS_API_VERSION to 3 as needed for Dano

It should now be able to boot Dano with our BFS, although I haven't tested
it. The information was gained using some degree of reverse engineering...
It won't be part of the BFS implementation for OpenBeOS (that won't run on R5
anymore) :-)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1010 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2002-09-11 01:03:35 +00:00
parent eb997429f9
commit ccc09203a5
2 changed files with 31 additions and 2 deletions

View File

@ -57,7 +57,10 @@ typedef ino_t vnode_id;
// missing ioctl() call added
#define IOCTL_FILE_UNCACHED_IO 10000
#define B_CUR_FS_API_VERSION 2
// B_CUR_FS_API_VERSION is 2 for R5, but 3 on Dano, because of the
// added calls for power management - so it's set to 3 here because
// that's a requirement to let Dano boot from our fs...
#define B_CUR_FS_API_VERSION 3
struct attr_info;
struct index_info;
@ -66,6 +69,8 @@ typedef int op_read_vnode(void *ns, vnode_id vnid, char r, void **node);
typedef int op_write_vnode(void *ns, void *node, char r);
typedef int op_remove_vnode(void *ns, void *node, char r);
typedef int op_secure_vnode(void *ns, void *node);
typedef int op_wake_vnode(void *ns, void *node);
typedef int op_suspend_vnode(void *ns, void *node);
typedef int op_walk(void *ns, void *base, const char *file, char **newpath,
vnode_id *vnid);
@ -221,6 +226,9 @@ typedef struct vnode_ops {
op_close_query (*close_query);
op_free_cookie (*free_querycookie);
op_read_query (*read_query);
// for Dano compatibility only
op_wake_vnode (*wake_vnode);
op_suspend_vnode (*suspend_vnode);
} vnode_ops;
extern _IMPEXP_KERNEL int new_path(const char *path, char **copy);

View File

@ -130,6 +130,10 @@ extern "C" {
static int bfs_free_query_cookie(void *ns, void *node, void *cookie);
static int bfs_read_query(void *ns, void *cookie, long *num,
struct dirent *buf, size_t bufsize);
// Dano compatibility (required for booting)
static int bfs_wake_vnode(void *ns, void *node);
static int bfs_suspend_vnode(void *ns, void *node);
} // extern "C"
@ -202,7 +206,10 @@ vnode_ops fs_entry = {
&bfs_open_query, // open query
&bfs_close_query, // close query
&bfs_free_query_cookie, // free query cookie
&bfs_read_query // read query
&bfs_read_query, // read query
&bfs_wake_vnode, // these two are added for Dano compatibility;
&bfs_suspend_vnode // they do nothing.
};
#define BFS_IO_SIZE 65536
@ -437,6 +444,20 @@ bfs_remove_vnode(void *_ns, void *_node, char reenter)
}
static int
bfs_wake_vnode(void *_ns, void *_node)
{
return B_OK;
}
static int
bfs_suspend_vnode(void *_ns, void *_node)
{
return B_OK;
}
// #pragma mark -