Skip to content

Commit 5ba1807

Browse files
committed
Remove Android specific code paths
Signed-off-by: Jo-Philipp Wich <[email protected]>
1 parent fe8f2ce commit 5ba1807

File tree

4 files changed

+1
-326
lines changed

4 files changed

+1
-326
lines changed

canned_fs_config.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
#include <limits.h>
2121
#include <stdlib.h>
2222

23-
#include "private/android_filesystem_config.h"
24-
2523
#include "canned_fs_config.h"
2624

2725
typedef struct {

include/private/android_filesystem_config.h

Lines changed: 0 additions & 306 deletions
This file was deleted.

make_ext4fs.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ static u32 build_directory_structure(const char *full_path, const char *dir_path
147147
}
148148
uint64_t capabilities;
149149
if (fs_config_func != NULL) {
150-
#ifdef ANDROID
151150
unsigned int mode = 0;
152151
unsigned int uid = 0;
153152
unsigned int gid = 0;
@@ -157,9 +156,6 @@ static u32 build_directory_structure(const char *full_path, const char *dir_path
157156
dentries[i].uid = uid;
158157
dentries[i].gid = gid;
159158
dentries[i].capabilities = capabilities;
160-
#else
161-
error("can't set android permissions - built without android support");
162-
#endif
163159
}
164160

165161
if (S_ISREG(stat.st_mode)) {

make_ext4fs_main.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@
2525
#include <sys/disk.h>
2626
#endif
2727

28-
#ifdef ANDROID
29-
#include <private/android_filesystem_config.h>
30-
#endif
31-
3228
#include "make_ext4fs.h"
3329
#include "ext4_utils.h"
3430
#include "canned_fs_config.h"
@@ -64,7 +60,7 @@ int main(int argc, char **argv)
6460
time_t fixed_time = -1;
6561
FILE* block_list_file = NULL;
6662

67-
while ((opt = getopt(argc, argv, "l:j:b:g:i:I:L:a:T:C:B:fwzJsctv")) != -1) {
63+
while ((opt = getopt(argc, argv, "l:j:b:g:i:I:L:T:C:B:fwzJsctv")) != -1) {
6864
switch (opt) {
6965
case 'l':
7066
info.len = parse_num(optarg);
@@ -90,15 +86,6 @@ int main(int argc, char **argv)
9086
case 'f':
9187
force = 1;
9288
break;
93-
case 'a':
94-
#ifdef ANDROID
95-
mountpoint = optarg;
96-
#else
97-
fprintf(stderr, "can't set android permissions - built without android support\n");
98-
usage(argv[0]);
99-
exit(EXIT_FAILURE);
100-
#endif
101-
break;
10289
case 'w':
10390
wipe = 1;
10491
break;

0 commit comments

Comments
 (0)