]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blob - misc/create_inode.h
145fd57bc963736cfee2a318fbfe41772b9c23cc
[thirdparty/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
11 struct hdlink_s
12 {
13 dev_t src_dev;
14 ino_t src_ino;
15 ext2_ino_t dst_ino;
16 };
17
18 struct hdlinks_s
19 {
20 int count;
21 int size;
22 struct hdlink_s *hdl;
23 };
24
25 #define HDLINK_CNT (4)
26
27 /* For populating the filesystem */
28 extern errcode_t populate_fs(ext2_filsys fs, ext2_ino_t parent_ino,
29 const char *source_dir, ext2_ino_t root);
30 extern errcode_t do_mknod_internal(ext2_filsys fs, ext2_ino_t cwd,
31 const char *name, struct stat *st);
32 extern errcode_t do_symlink_internal(ext2_filsys fs, ext2_ino_t cwd,
33 const char *name, char *target,
34 ext2_ino_t root);
35 extern errcode_t do_mkdir_internal(ext2_filsys fs, ext2_ino_t cwd,
36 const char *name, struct stat *st,
37 ext2_ino_t root);
38 extern errcode_t do_write_internal(ext2_filsys fs, ext2_ino_t cwd,
39 const char *src, const char *dest,
40 ext2_ino_t root);
41
42 #endif /* _CREATE_INODE_H */