-int ext4_fill_raw_inode(const char *path, uint32_t *ret_ino,
- struct ext4_inode *inode)
-{
- int r;
- ext4_file f;
- struct ext4_inode_ref inode_ref;
- struct ext4_mountpoint *mp = ext4_get_mount(path);
- uint32_t ino;
-
- if (!mp)
- return ENOENT;
-
- EXT4_MP_LOCK(mp);
-
- r = ext4_generic_open2(&f, path, O_RDONLY, EXT4_DE_UNKNOWN, NULL, NULL);
- if (r != EOK) {
- EXT4_MP_UNLOCK(mp);
- return r;
- }
-
- ino = f.inode;
- ext4_fclose(&f);
-
- /*Load parent*/
- r = ext4_fs_get_inode_ref(&mp->fs, ino, &inode_ref);
- if (r != EOK) {
- EXT4_MP_UNLOCK(mp);
- return r;
- }
-
- memcpy(inode, inode_ref.inode, sizeof(struct ext4_inode));
- ext4_fs_put_inode_ref(&inode_ref);
- EXT4_MP_UNLOCK(mp);
-
- if (ret_ino)
- *ret_ino = ino;
-
- return r;
-}
-
-int ext4_fopen(ext4_file *f, const char *path, const char *flags)