summaryrefslogtreecommitdiffstats
path: root/libopkg
diff options
context:
space:
mode:
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-11-16 20:37:24 (EST)
committer graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-11-16 20:37:24 (EST)
commitbc43fa87c22eef3c77947711a3a0b049dfabf4ea (patch)
treefbb66cae79a4a1d404ba335ec68b814d5be01a33 /libopkg
parent86eec753b604f7576aca622db7dfe1fb309b01a7 (diff)
Remove unused function.
git-svn-id: http://opkg.googlecode.com/svn/trunk@322 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg')
-rw-r--r--libopkg/pkg_extract.c61
-rw-r--r--libopkg/pkg_extract.h1
2 files changed, 0 insertions, 62 deletions
diff --git a/libopkg/pkg_extract.c b/libopkg/pkg_extract.c
index 7f22ff3..4257d59 100644
--- a/libopkg/pkg_extract.c
+++ b/libopkg/pkg_extract.c
@@ -92,67 +92,6 @@ int pkg_extract_data_files_to_dir(pkg_t *pkg, const char *dir)
return 0;
}
-int pkg_extract_data_file_names_to_file(pkg_t *pkg, const char *file_name)
-{
- int err=0;
- char *line, *data_file;
- FILE *file;
- FILE *tmp;
-
- file = fopen(file_name, "w");
- if (file == NULL) {
- fprintf(stderr, "%s: ERROR: Failed to open %s for writing.\n",
- __FUNCTION__, file_name);
- return EINVAL;
- }
-
- tmp = tmpfile();
- if (pkg->installed_files) {
- str_list_elt_t *elt;
- for (elt = str_list_first(pkg->installed_files); elt; elt = str_list_next(pkg->installed_files, elt)) {
- fprintf(file, "%s\n", (char *)elt->data);
- }
- } else {
- err = pkg_extract_data_file_names_to_stream(pkg, tmp);
- if (err) {
- fclose(file);
- fclose(tmp);
- return err;
- }
-
- /* Fixup data file names by removing the initial '.' */
- rewind(tmp);
- while (1) {
- line = file_read_line_alloc(tmp);
- if (line == NULL) {
- break;
- }
-
- data_file = line;
- if (*data_file == '.') {
- data_file++;
- }
-
- if (*data_file != '/') {
- fputs("/", file);
- }
-
- /* I have no idea why, but this is what dpkg does */
- if (strcmp(data_file, "/\n") == 0) {
- fputs("/.\n", file);
- } else {
- fputs(data_file, file);
- }
- free(line);
- line=NULL;
- }
- }
- fclose(tmp);
- fclose(file);
-
- return err;
-}
-
int pkg_extract_data_file_names_to_stream(pkg_t *pkg, FILE *file)
{
char *buffer = NULL;
diff --git a/libopkg/pkg_extract.h b/libopkg/pkg_extract.h
index f5be157..b83b41b 100644
--- a/libopkg/pkg_extract.h
+++ b/libopkg/pkg_extract.h
@@ -26,7 +26,6 @@ int pkg_extract_control_files_to_dir_with_prefix(pkg_t *pkg,
const char *dir,
const char *prefix);
int pkg_extract_data_files_to_dir(pkg_t *pkg, const char *dir);
-int pkg_extract_data_file_names_to_file(pkg_t *pkg, const char *file_name);
int pkg_extract_data_file_names_to_stream(pkg_t *pkg, FILE *file);
#endif