|
|
|
@ -13,6 +13,10 @@
|
|
|
|
|
#include <fcntl.h>
|
|
|
|
|
|
|
|
|
|
#include <private/android_filesystem_config.h>
|
|
|
|
|
//XXX
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
#include <private/fs_config.h>
|
|
|
|
|
//XXX
|
|
|
|
|
|
|
|
|
|
/* NOTES
|
|
|
|
|
**
|
|
|
|
@ -100,7 +104,11 @@ static void _eject(struct stat *s, char *out, int olen, char *data, unsigned dat
|
|
|
|
|
putchar(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifdef CFIG_NO_FIX_STAT
|
|
|
|
|
#warning CFIG_NO_FIX_STAT defined, will not fix_stat() defined in Android
|
|
|
|
|
#else
|
|
|
|
|
fix_stat(out, s);
|
|
|
|
|
#endif
|
|
|
|
|
// fprintf(stderr, "_eject %s: mode=0%o\n", out, s->st_mode);
|
|
|
|
|
|
|
|
|
|
printf("%06x%08x%08x%08x%08x%08x%08x"
|
|
|
|
@ -172,7 +180,7 @@ static void _archive_dir(char *in, char *out, int ilen, int olen)
|
|
|
|
|
|
|
|
|
|
int size = 32;
|
|
|
|
|
int entries = 0;
|
|
|
|
|
char** names = malloc(size * sizeof(char*));
|
|
|
|
|
char** names = (char**) malloc(size * sizeof(char*));
|
|
|
|
|
if (names == NULL) {
|
|
|
|
|
fprintf(stderr, "failed to allocate dir names array (size %d)\n", size);
|
|
|
|
|
exit(1);
|
|
|
|
@ -187,7 +195,7 @@ static void _archive_dir(char *in, char *out, int ilen, int olen)
|
|
|
|
|
|
|
|
|
|
if (entries >= size) {
|
|
|
|
|
size *= 2;
|
|
|
|
|
names = realloc(names, size * sizeof(char*));
|
|
|
|
|
names = (char**) realloc(names, size * sizeof(char*));
|
|
|
|
|
if (names == NULL) {
|
|
|
|
|
fprintf(stderr, "failed to reallocate dir names array (size %d)\n",
|
|
|
|
|
size);
|
|
|
|
|