3 * (c) 2008-2009 Laurent Vivier <Laurent@lvivier.info>
5 * This file has been copied from EMILE, http://emile.sf.net
11 #include "ext2_utils.h"
13 ext2_DIR
* ext2_opendir(ext2_VOLUME
*volume
, const char *name
)
17 struct ext2_inode
*inode
;
20 ino
= ext2_seek_name(volume
, name
);
24 inode
= (struct ext2_inode
*)malloc(sizeof(struct ext2_inode
));
28 ret
= ext2_get_inode(volume
, ino
, inode
);
34 if (!S_ISDIR(inode
->i_mode
)) {
39 dir
= (ext2_DIR
*)malloc(sizeof(ext2_DIR
));
44 dir
->volume
= (ext2_VOLUME
*)volume
;