diff options
author | Adrien Schildknecht <adriens@google.com> | 2016-11-29 21:20:29 -0800 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2017-05-23 22:00:59 -0400 |
commit | 9d25d462c671f9b5664f6ae6fa76e0010db68b13 (patch) | |
tree | b40bf14a5a060d195ab87c72e7b5883260408a71 /misc/create_inode.h | |
parent | 3fc469968284310acec1256a5285fba4b71ac026 (diff) | |
download | e2fsprogs-9d25d462c671f9b5664f6ae6fa76e0010db68b13.tar.gz |
AOSP: misc: add callbacks to populate_fs
This patch let the caller of populate_fs registers a set of callbacks that
will be called everytime an inode is created.
Test: mm
Change-Id: I28ae100c4cc81223192860c29366cbac3077fe21
From AOSP commit: 6686ee96494413b48aa3dd70b5db533cbb7e4852
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'misc/create_inode.h')
-rw-r--r-- | misc/create_inode.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/misc/create_inode.h b/misc/create_inode.h index cf49df2e..17309c68 100644 --- a/misc/create_inode.h +++ b/misc/create_inode.h @@ -24,9 +24,21 @@ struct hdlinks_s #define HDLINK_CNT (4) +struct fs_ops_callbacks { + errcode_t (* create_new_inode)(ext2_filsys fs, const char *target_path, + const char *name, ext2_ino_t parent_ino, ext2_ino_t root, + mode_t mode); + errcode_t (* end_create_new_inode)(ext2_filsys fs, + const char *target_path, const char *name, + ext2_ino_t parent_ino, ext2_ino_t root, mode_t mode); +}; + /* For populating the filesystem */ extern errcode_t populate_fs(ext2_filsys fs, ext2_ino_t parent_ino, const char *source_dir, ext2_ino_t root); +extern errcode_t populate_fs2(ext2_filsys fs, ext2_ino_t parent_ino, + const char *source_dir, ext2_ino_t root, + struct fs_ops_callbacks *fs_callbacks); extern errcode_t do_mknod_internal(ext2_filsys fs, ext2_ino_t cwd, const char *name, struct stat *st); extern errcode_t do_symlink_internal(ext2_filsys fs, ext2_ino_t cwd, |