1 #ifndef _CREATE_INODE_H
2 #define _CREATE_INODE_H
7 #include "et/com_err.h"
9 #include "ext2fs/ext2fs.h"
25 #define HDLINK_CNT (4)
27 struct fs_ops_callbacks {
28 errcode_t (* create_new_inode)(ext2_filsys fs, const char *target_path,
29 const char *name, ext2_ino_t parent_ino, ext2_ino_t root,
31 errcode_t (* end_create_new_inode)(ext2_filsys fs,
32 const char *target_path, const char *name,
33 ext2_ino_t parent_ino, ext2_ino_t root, mode_t mode);
36 extern int no_copy_xattrs; /* this should eventually be a flag
37 passed to populate_fs3() */
39 /* For populating the filesystem */
40 extern errcode_t populate_fs(ext2_filsys fs, ext2_ino_t parent_ino,
41 const char *source_dir, ext2_ino_t root);
42 extern errcode_t populate_fs2(ext2_filsys fs, ext2_ino_t parent_ino,
43 const char *source_dir, ext2_ino_t root,
44 struct fs_ops_callbacks *fs_callbacks);
45 extern errcode_t do_mknod_internal(ext2_filsys fs, ext2_ino_t cwd,
46 const char *name, unsigned int st_mode,
47 unsigned int st_rdev);
48 extern errcode_t do_symlink_internal(ext2_filsys fs, ext2_ino_t cwd,
49 const char *name, char *target,
51 extern errcode_t do_mkdir_internal(ext2_filsys fs, ext2_ino_t cwd,
52 const char *name, ext2_ino_t root);
53 extern errcode_t do_write_internal(ext2_filsys fs, ext2_ino_t cwd,
54 const char *src, const char *dest,
57 #endif /* _CREATE_INODE_H */