diff options
Diffstat (limited to 'build/files.c')
-rw-r--r-- | build/files.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/build/files.c b/build/files.c index 7fb7e0478..5d5856421 100644 --- a/build/files.c +++ b/build/files.c @@ -1270,7 +1270,6 @@ static void genCpioListAndHeader(FileList fl, a = (char *)(fi->apath + fi->fc); *a = '\0'; - fi->fmapflags = xcalloc(sizeof(*fi->fmapflags), fi->fc); fi->astriplen = 0; if (fl->buildRoot) fi->astriplen = strlen(fl->buildRoot); @@ -1280,6 +1279,11 @@ static void genCpioListAndHeader(FileList fl, fi->fuser = _free(fi->fuser); fi->fgroup = _free(fi->fgroup); + fi->mapflags = CPIO_MAP_PATH | + CPIO_MAP_TYPE | CPIO_MAP_MODE | CPIO_MAP_UID | CPIO_MAP_GID; + if (isSrc) + fi->mapflags |= CPIO_FOLLOW_SYMLINKS; + /* Make the cpio list */ for (i = 0, flp = fl->fileList; i < fi->fc; i++, flp++) { char * b; @@ -1323,11 +1327,6 @@ static void genCpioListAndHeader(FileList fl, continue; } fi->actions[i] = FA_COPYOUT; - fi->fmapflags[i] = CPIO_MAP_PATH | - CPIO_MAP_TYPE | CPIO_MAP_MODE | CPIO_MAP_UID | CPIO_MAP_GID; - if (isSrc) - fi->fmapflags[i] |= CPIO_FOLLOW_SYMLINKS; - } if (fip) *fip = fi; |