pull/14/head
cfig 7 years ago
parent 68b167e7f0
commit ef6e73fa50

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

Loading…
Cancel
Save