Move add_to_list from libunarchive to libbb so it can be of more general use (eg ifupdown). Changed the name to llist_add_to as i plan on adding more llist_ functions as needed (e.g. llist_free).
This commit is contained in:
@@ -53,7 +53,6 @@ LIBUNARCHIVE-y:= \
|
||||
\
|
||||
archive_copy_file.o \
|
||||
\
|
||||
add_to_list.o \
|
||||
check_header_gzip.o \
|
||||
check_trailer_gzip.o \
|
||||
data_align.o \
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "unarchive.h"
|
||||
#include "libbb.h"
|
||||
|
||||
extern const llist_t *add_to_list(const llist_t *old_head, const char *new_item)
|
||||
{
|
||||
llist_t *new_head;
|
||||
|
||||
new_head = xmalloc(sizeof(llist_t));
|
||||
new_head->data = new_item;
|
||||
new_head->link = old_head;
|
||||
|
||||
return(new_head);
|
||||
}
|
||||
@@ -171,7 +171,7 @@ extern char get_header_tar(archive_handle_t *archive_handle)
|
||||
archive_handle->action_header(archive_handle->file_header);
|
||||
archive_handle->flags |= ARCHIVE_EXTRACT_QUIET;
|
||||
archive_handle->action_data(archive_handle);
|
||||
archive_handle->passed = add_to_list(archive_handle->passed, archive_handle->file_header->name);
|
||||
archive_handle->passed = llist_add_to(archive_handle->passed, archive_handle->file_header->name);
|
||||
} else {
|
||||
data_skip(archive_handle);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user