summaryrefslogtreecommitdiffstats
path: root/collage
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2001-11-13 22:15:29 +0000
committerErik Troan <ewt@redhat.com>2001-11-13 22:15:29 +0000
commit251d974a658d07cac73b3a0904ddabd20bf6cc5c (patch)
treebaa0a221a6e4ed8347fdf47cd2b5d7d8d0ded285 /collage
parent532cd74ea3f297469f8785612081ebf36c5b1782 (diff)
downloadanaconda-251d974a658d07cac73b3a0904ddabd20bf6cc5c.tar.gz
anaconda-251d974a658d07cac73b3a0904ddabd20bf6cc5c.tar.xz
anaconda-251d974a658d07cac73b3a0904ddabd20bf6cc5c.zip
changes for diet
Diffstat (limited to 'collage')
-rw-r--r--collage/Makefile2
-rw-r--r--collage/commands.c16
2 files changed, 15 insertions, 3 deletions
diff --git a/collage/Makefile b/collage/Makefile
index 6696d3191..38450774d 100644
--- a/collage/Makefile
+++ b/collage/Makefile
@@ -2,7 +2,7 @@ include ../Makefile.inc
CFLAGS = -Wall -g -O2
LDFLAGS = -g
-LOADLIBES = -L../isys -lisys -lresolv -lz
+LOADLIBES = -L../isys -L../isys/gzlib -lisys -lgunzip -lresolv -lz
ifeq (.depend,$(wildcard .depend))
TARGET=all
diff --git a/collage/commands.c b/collage/commands.c
index 59e014681..802c90a5f 100644
--- a/collage/commands.c
+++ b/collage/commands.c
@@ -1,5 +1,6 @@
#include <errno.h>
#include <fcntl.h>
+#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -10,7 +11,6 @@
#include <sys/sysmacros.h>
#include <sys/statfs.h>
#include <unistd.h>
-#include <zlib.h>
#include "../isys/imount.h"
#include "../isys/isys.h"
@@ -19,6 +19,16 @@
#include "mount_by_label.h"
#include "../isys/cpio.h"
+int mygethostbyname(char * host, struct in_addr * address) {
+ struct hostent * hostinfo;
+
+ hostinfo = gethostbyname(host);
+ if (!hostinfo) return 1;
+
+ memcpy(address, hostinfo->h_addr_list[0], hostinfo->h_length);
+ return 0;
+}
+
static int copyfd(int to, int from);
static int copyfd(int to, int from) {
@@ -190,10 +200,12 @@ int uncpioCommand(int argc, char ** argv) {
return 1;
}
- cfd = gzdopen(0, "r");
+ cfd = gunzip_dopen(0);
rc = myCpioInstallArchive(cfd, NULL, 0, NULL, NULL, &fail);
+ gunzip_close(cfd);
+
if (rc) {
fprintf(stderr, "cpio failed on %s: ", fail);
if (rc & CPIOERR_CHECK_ERRNO)