u64 parse_num(const char *arg);
void ext4_parse_sb(struct ext4_super_block *sb);
+typedef void (*fs_config_func_t)(const char *path, int dir, unsigned *uid, unsigned *gid,
+ unsigned *mode);
+
+struct selabel_handle;
+
+int make_ext4fs_internal(int fd, const char *directory,
+ const char *mountpoint, fs_config_func_t fs_config_func, int gzip,
+ int sparse, int crc, int wipe, int init_itabs,
+ struct selabel_handle *sehnd);
+
#ifdef __cplusplus
}
#endif
#else
+#include <selinux/selinux.h>
+#include <selinux/label.h>
+#include <selinux/android.h>
+
#define O_BINARY 0
#endif
}
}
-int make_ext4fs_sparse_fd(int fd, s64 len,
+int make_ext4fs_sparse_fd(int fd, long long len,
const char *mountpoint, struct selabel_handle *sehnd)
{
reset_ext4fs_info();
return make_ext4fs_internal(fd, NULL, mountpoint, NULL, 0, 1, 0, 0, 0, sehnd);
}
-int make_ext4fs(const char *filename, s64 len,
+int make_ext4fs(const char *filename, long long len,
const char *mountpoint, struct selabel_handle *sehnd)
{
int fd;
#ifndef _MAKE_EXT4FS_H_
#define _MAKE_EXT4FS_H_
-#include "ext4_utils.h"
-#include "ext4.h"
-
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef USE_MINGW
-#include <selinux/selinux.h>
-#include <selinux/label.h>
-#include <selinux/android.h>
-#else
struct selabel_handle;
-#endif
-
-typedef void (*fs_config_func_t)(const char *path, int dir, unsigned *uid, unsigned *gid,
- unsigned *mode);
-void reset_ext4fs_info();
-int make_ext4fs(const char *filename, s64 len,
+int make_ext4fs(const char *filename, long long len,
const char *mountpoint, struct selabel_handle *sehnd);
-int make_ext4fs_sparse_fd(int fd, s64 len,
+int make_ext4fs_sparse_fd(int fd, long long len,
const char *mountpoint, struct selabel_handle *sehnd);
-int make_ext4fs_internal(int fd, const char *directory,
- const char *mountpoint, fs_config_func_t fs_config_func, int gzip,
- int sparse, int crc, int wipe, int init_itabs,
- struct selabel_handle *sehnd);
#ifdef __cplusplus
}
#include <fcntl.h>
#include <libgen.h>
+#include <stdio.h>
#include <unistd.h>
#if defined(__linux__)
#include <private/android_filesystem_config.h>
#endif
+#ifndef USE_MINGW
+#include <selinux/selinux.h>
+#include <selinux/label.h>
+#include <selinux/android.h>
+#else
+struct selabel_handle;
+#endif
+
#include "make_ext4fs.h"
+#include "ext4_utils.h"
#ifndef USE_MINGW /* O_BINARY is windows-specific flag */
#define O_BINARY 0