
|
[openbeosstorage]
||
[Date Prev]
[02-2002 Date Index]
[Date Next]
||
[Thread Prev]
[02-2002 Thread Index]
[Thread Next]
[openbeosstorage] R5 VFS API
- From: "Tyler Dauwalder" <tyler@xxxxxxxxxxxxx>
- To: <OpenBeOSStorage@xxxxxxxxxxxxx>
- Date: Thu, 31 Jan 2002 22:22:51 -0800
Keith had a good idea this morning:
>Before we do too much coding, its probably best to get the routines
>documented, so we can write proper test cases & make sure we know how
>they work. If we divide them up between us, it shouldn't take toolong
>to do. I propose we produce them in HTML as attached.
>The html files could become part of the open bebook (which would mean
>the kernel people could code to the same docs & make our life easier
later).
He did up a page for the opendir() call as an example. I think it'd be a
good
thing to go ahead with. It'll help us all get acquainted with the underlying
filesystem api, and it'd be a handy reference.
I went ahead and created a Storage Kit web page and put up the opendir()
page that Keith made. It's at:
http://www.dauwalder.net/OpenBeOS/StorageKit.html
The page isn't finished yet (I ran out of time tonight), but I'll get it
polished
up in a day or two.
I haven't heard from Brander yet, so I'm pretty much going to assume it's
just the three of us for now. We could break up the documenting task as
follows, if this works for everyone (it's about 20 each):
----------------------------------------------------------------------------
----
Keith:
----------------------------------------------------------------------------
----
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_walk(void *ns, void *base, const char *file, char
**newpath, vnode_id *vnid);
typedef int op_access(void *ns, void *node, int mode);
typedef int op_create(void *ns, void *dir, const char *name, int omode,
int perms, vnode_id *vnid, void **cookie);
typedef int op_mkdir(void *ns, void *dir, const char *name, int
perms);
typedef int op_symlink(void *ns, void *dir, const char *name, const char
*path);
typedef int op_link(void *ns, void *dir, const char *name, void *node);
typedef int op_rename(void *ns, void *olddir, const char *oldname, void
*newdir, const char *newname);
typedef int op_unlink(void *ns, void *dir, const char *name);
typedef int op_rmdir(void *ns, void *dir, const char *name);
typedef int op_readlink(void *ns, void *node, char *buf, size_t
*bufsize);
typedef int op_opendir(void *ns, void *node, void **cookie);
typedef int op_closedir(void *ns, void *node, void *cookie);
typedef int op_rewinddir(void *ns, void *node, void *cookie);
typedef int op_readdir(void *ns, void *node, void *cookie, long *num,
struct dirent *buf, size_t bufsize);
----------------------------------------------------------------------------
----
Tyler:
----------------------------------------------------------------------------
----
typedef int op_open(void *ns, void *node, int omode, void **cookie);
typedef int op_close(void *ns, void *node, void *cookie);
typedef int op_free_cookie(void *ns, void *node, void *cookie);
typedef int op_read(void *ns, void *node, void *cookie, off_t pos, void
*buf, size_t *len);
typedef int op_write(void *ns, void *node, void *cookie, off_t pos, const
void *buf, size_t *len);
typedef int op_readv(void *ns, void *node, void *cookie, off_t pos, const
iovec *vec, size_t count, size_t *len);
typedef int op_writev(void *ns, void *node, void *cookie, off_t pos, const
iovec *vec, size_t count, size_t *len);
typedef int op_ioctl(void *ns, void *node, void *cookie, int cmd, void
*buf,size_t len);
typedef int op_setflags(void *ns, void *node, void *cookie, int
flags);
typedef int op_rstat(void *ns, void *node, struct stat *);
typedef int op_wstat(void *ns, void *node, struct stat *, long mask);
typedef int op_fsync(void *ns, void *node);
typedef int op_select(void *ns, void *node, void *cookie, uint8 event,
uint32 ref, selectsync *sync);
typedef int op_deselect(void *ns, void *node, void *cookie, uint8 event,
selectsync *sync);
typedef int op_initialize(const char *devname, void *parms, size_t len);
typedef int op_mount(nspace_id nsid, const char *devname, ulong flags,
void *parms, size_t len, void **data, vnode_id *vnid);
typedef int op_unmount(void *ns);
typedef int op_sync(void *ns);
typedef int op_rfsstat(void *ns, struct fs_info *);
typedef int op_wfsstat(void *ns, struct fs_info *, long mask);
----------------------------------------------------------------------------
----
Michael:
----------------------------------------------------------------------------
----
typedef int op_open_attrdir(void *ns, void *node, void **cookie);
typedef int op_close_attrdir(void *ns, void *node, void *cookie);
typedef int op_rewind_attrdir(void *ns, void *node, void *cookie);
typedef int op_read_attrdir(void *ns, void *node, void *cookie, long
*num, struct dirent *buf, size_t bufsize);
typedef int op_remove_attr(void *ns, void *node, const char *name);
typedef int op_rename_attr(void *ns, void *node, const char *oldname,
const char *newname);
typedef int op_stat_attr(void *ns, void *node, const char *name, struct
attr_info *buf);
typedef int op_write_attr(void *ns, void *node, const char *name, int
type, const void *buf, size_t *len, off_t pos);
typedef int op_read_attr(void *ns, void *node, const char *name, int
type, void *buf, size_t *len, off_t pos);
typedef int op_open_indexdir(void *ns, void **cookie);
typedef int op_close_indexdir(void *ns, void *cookie);
typedef int op_rewind_indexdir(void *ns, void *cookie);
typedef int op_read_indexdir(void *ns, void *cookie, long *num, struct
dirent *buf, size_t bufsize);
typedef int op_create_index(void *ns, const char *name, int type, int
flags);
typedef int op_remove_index(void *ns, const char *name);
typedef int op_rename_index(void *ns, const char *oldname, const char
*newname);
typedef int op_stat_index(void *ns, const char *name, struct index_info
*buf);
typedef int op_open_query(void *ns, const char *query, ulong flags,
port_id port, long token, void **cookie);
typedef int op_close_query(void *ns, void *cookie);
typedef int op_read_query(void *ns, void *cookie, long *num, struct
dirent *buf, size_t bufsize);
Any thoughts?
-Tyler
|

|