diff options
-rw-r--r-- | ext4_utils/make_ext4fs.c | 9 | ||||
-rw-r--r-- | ext4_utils/make_ext4fs.h | 3 |
2 files changed, 11 insertions, 1 deletions
diff --git a/ext4_utils/make_ext4fs.c b/ext4_utils/make_ext4fs.c index a8a26177..59d9c3e0 100644 --- a/ext4_utils/make_ext4fs.c +++ b/ext4_utils/make_ext4fs.c @@ -410,6 +410,13 @@ int make_ext4fs_sparse_fd(int fd, long long len, int make_ext4fs(const char *filename, long long len, const char *mountpoint, struct selabel_handle *sehnd) { + return make_ext4fs_directory(filename, len, mountpoint, sehnd, NULL); +} + +int make_ext4fs_directory(const char *filename, long long len, + const char *mountpoint, struct selabel_handle *sehnd, + const char *directory) +{ int fd; int status; @@ -422,7 +429,7 @@ int make_ext4fs(const char *filename, long long len, return EXIT_FAILURE; } - status = make_ext4fs_internal(fd, NULL, NULL, mountpoint, NULL, 0, 0, 0, 1, 0, sehnd, 0, -1, NULL); + status = make_ext4fs_internal(fd, directory, NULL, mountpoint, NULL, 0, 0, 0, 1, 0, sehnd, 0, -1, NULL); close(fd); return status; diff --git a/ext4_utils/make_ext4fs.h b/ext4_utils/make_ext4fs.h index 3784a9ea..2573a0d4 100644 --- a/ext4_utils/make_ext4fs.h +++ b/ext4_utils/make_ext4fs.h @@ -25,6 +25,9 @@ struct selabel_handle; int make_ext4fs(const char *filename, long long len, const char *mountpoint, struct selabel_handle *sehnd); +int make_ext4fs_directory(const char *filename, long long len, + const char *mountpoint, struct selabel_handle *sehnd, + const char *directory); int make_ext4fs_sparse_fd(int fd, long long len, const char *mountpoint, struct selabel_handle *sehnd); |