Whamcloud - gitweb
create_inode: move debugfs internal state back to debugfs
[tools/e2fsprogs.git] / misc / create_inode.h
1 #ifndef _CREATE_INODE_H
2 #define _CREATE_INODE_H
3
4 #include <sys/types.h>
5 #include <sys/stat.h>
6 #include <fcntl.h>
7 #include "et/com_err.h"
8 #include "e2p/e2p.h"
9 #include "ext2fs/ext2fs.h"
10 #include "nls-enable.h"
11
12 struct hdlink_s
13 {
14         ext2_ino_t src_ino;
15         ext2_ino_t dst_ino;
16 };
17
18 struct hdlinks_s
19 {
20         int count;
21         struct hdlink_s *hdl;
22 };
23
24 struct hdlinks_s hdlinks;
25
26 /* For saving the hard links */
27 #define HDLINK_CNT     4
28 extern int hdlink_cnt;
29
30 /* For populating the filesystem */
31 extern errcode_t populate_fs(ext2_filsys fs, ext2_ino_t parent_ino,
32                              const char *source_dir, ext2_ino_t root);
33 extern errcode_t do_mknod_internal(ext2_filsys fs, ext2_ino_t cwd,
34                                    const char *name, struct stat *st);
35 extern errcode_t do_symlink_internal(ext2_filsys fs, ext2_ino_t cwd,
36                                      const char *name, char *target,
37                                      ext2_ino_t root);
38 extern errcode_t do_mkdir_internal(ext2_filsys fs, ext2_ino_t cwd,
39                                    const char *name, struct stat *st,
40                                    ext2_ino_t root);
41 extern errcode_t do_write_internal(ext2_filsys fs, ext2_ino_t cwd,
42                                    const char *src, const char *dest,
43                                    ext2_ino_t root);
44
45 #endif /* _CREATE_INODE_H */