#ifndef __ZFS_COMMON__
#define __ZFS_COMMON__
+#include <part.h>
+
#define SECTOR_SIZE 0x200
#define SECTOR_BITS 9
struct zfs_filesystem {
/* Block Device Descriptor */
- block_dev_desc_t *dev_desc;
+ struct blk_desc *dev_desc;
};
-
-extern block_dev_desc_t *zfs_dev_desc;
-
struct device_s {
uint64_t part_length;
};
struct zfs_filesystem *zfsget_fs(void);
-int init_fs(block_dev_desc_t *dev_desc);
-void deinit_fs(block_dev_desc_t *dev_desc);
int zfs_open(zfs_file_t, const char *filename);
uint64_t zfs_read(zfs_file_t, char *buf, uint64_t len);
struct zfs_data *zfs_mount(device_t);
int zfs_ls(device_t dev, const char *path,
int (*hook) (const char *, const struct zfs_dirhook_info *));
int zfs_devread(int sector, int byte_offset, int byte_len, char *buf);
-int zfs_set_blk_dev(block_dev_desc_t *rbdd, int part);
+void zfs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info);
void zfs_unmount(struct zfs_data *data);
int lzjb_decompress(void *, void *, uint32_t, uint32_t);
#endif