2008-03-11 20:54:40 +00:00
|
|
|
#ifndef _SPL_KOBJ_H
|
|
|
|
#define _SPL_KOBJ_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2008-03-12 20:52:46 +00:00
|
|
|
#include <sys/vnode.h>
|
2008-03-11 20:54:40 +00:00
|
|
|
|
|
|
|
typedef struct _buf {
|
2008-03-12 20:52:46 +00:00
|
|
|
vnode_t *vp;
|
2008-03-11 20:54:40 +00:00
|
|
|
} _buf_t;
|
|
|
|
|
|
|
|
extern struct _buf *kobj_open_file(const char *name);
|
|
|
|
extern void kobj_close_file(struct _buf *file);
|
|
|
|
extern int kobj_read_file(struct _buf *file, char *buf,
|
2008-03-12 20:52:46 +00:00
|
|
|
ssize_t size, offset_t off);
|
2008-03-11 20:54:40 +00:00
|
|
|
extern int kobj_get_filesize(struct _buf *file, uint64_t *size);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* SPL_KOBJ_H */
|