예제 #1
0
/*
 * extract all binaries (type 'b') and all data files (type 'x') to the filesystem
 * and checks for dependencies (type 'd'). If dependencies are found, extract them.
 */
int extractBinaries(ARCHIVE_STATUS *status_list[])
{
	TOC * ptoc = status_list[SELF]->tocbuff;
	VS("Extracting binaries\n");
	while (ptoc < status_list[SELF]->tocend) {
		if (ptoc->typcd == 'b' || ptoc->typcd == 'x' || ptoc->typcd == 'Z')
			if (extract2fs(status_list[SELF], ptoc))
				return -1;

        if (ptoc->typcd == 'd') {
            if (extractDependency(status_list, ptoc->name) == -1)
                return -1;
        }
		ptoc = incrementTocPtr(status_list[SELF], ptoc);
	}
	return 0;
}
예제 #2
0
/*
 * extract all binaries (type 'b') and all data files (type 'x') to the filesystem
 * and checks for dependencies (type 'd'). If dependencies are found, extract them.
 */
int extractBinaries(ARCHIVE_STATUS *status_list[])
{
	TOC * ptoc = status_list[SELF]->tocbuff;
	VS("Extracting binaries\n");
	while (ptoc < status_list[SELF]->tocend) {
		if (ptoc->typcd == ARCHIVE_ITEM_BINARY || ptoc->typcd == ARCHIVE_ITEM_DATA ||
                ptoc->typcd == ARCHIVE_ITEM_ZIPFILE)
			if (extract2fs(status_list[SELF], ptoc))
				return -1;

        if (ptoc->typcd == ARCHIVE_ITEM_DEPENDENCY) {
            if (extractDependency(status_list, ptoc->name) == -1)
                return -1;
        }
		ptoc = incrementTocPtr(status_list[SELF], ptoc);
	}
	return 0;
}