summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/mar/mar-extract-only.c
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2000-12-12 21:02:34 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2000-12-12 21:02:34 +0000
commit7852f76ee05551c05a4f833f9a55bec15f44f85d (patch)
tree55da3253c21abc70b968e6a2ed7cb10a041dd6bb /mdk-stage1/mar/mar-extract-only.c
parentd3c2d12831c70b135b630319a072588d298449da (diff)
downloaddrakx-backup-do-not-use-7852f76ee05551c05a4f833f9a55bec15f44f85d.tar
drakx-backup-do-not-use-7852f76ee05551c05a4f833f9a55bec15f44f85d.tar.gz
drakx-backup-do-not-use-7852f76ee05551c05a4f833f9a55bec15f44f85d.tar.bz2
drakx-backup-do-not-use-7852f76ee05551c05a4f833f9a55bec15f44f85d.tar.xz
drakx-backup-do-not-use-7852f76ee05551c05a4f833f9a55bec15f44f85d.zip
add "list-contents" feature to mar-extract-only
Diffstat (limited to 'mdk-stage1/mar/mar-extract-only.c')
-rw-r--r--mdk-stage1/mar/mar-extract-only.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/mdk-stage1/mar/mar-extract-only.c b/mdk-stage1/mar/mar-extract-only.c
index b1079880e..fc9e9e55f 100644
--- a/mdk-stage1/mar/mar-extract-only.c
+++ b/mdk-stage1/mar/mar-extract-only.c
@@ -52,6 +52,24 @@ gzerr(gzFile f) /* decrease code size */
#endif /* _STANDALONE_ */
+char **
+mar_list_contents(struct mar_stream *s)
+{
+ struct mar_element * elem = s->first_element;
+ char * tmp_contents[500];
+ char ** answ;
+ int i = 0;
+ while (elem)
+ {
+ tmp_contents[i++] = strdup(elem->filename);
+ elem = elem->next_element;
+ }
+ tmp_contents[i++] = NULL;
+ answ = (char **) malloc(sizeof(char *) * i);
+ memcpy(answ, tmp_contents, sizeof(char *) * i);
+ return answ;
+}
+
int
mar_calc_integrity(struct mar_stream *s)
{