summaryrefslogtreecommitdiffstats
path: root/isys
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>1999-11-30 22:23:45 +0000
committerMatt Wilson <msw@redhat.com>1999-11-30 22:23:45 +0000
commitbeeb609dffdeb0414ca4658911e5dcb4dd8006a9 (patch)
treeca5f92d6c694f54af9cf48f0161571e8d5fa86c3 /isys
parentf687e3cd850fb2378252c6d2fb0c3bbac2ef3107 (diff)
downloadanaconda-beeb609dffdeb0414ca4658911e5dcb4dd8006a9.tar.gz
anaconda-beeb609dffdeb0414ca4658911e5dcb4dd8006a9.tar.xz
anaconda-beeb609dffdeb0414ca4658911e5dcb4dd8006a9.zip
o changes needed to use rpmio from rpm HEADr0-7-3
o typo in exception screen o other things that came along the way.
Diffstat (limited to 'isys')
-rw-r--r--isys/Makefile4
-rw-r--r--isys/cpio.c12
-rw-r--r--isys/cpio.h12
-rw-r--r--isys/isys.c6
-rw-r--r--isys/otherinsmod.c4
5 files changed, 21 insertions, 17 deletions
diff --git a/isys/Makefile b/isys/Makefile
index 5f042e567..56c76c1e6 100644
--- a/isys/Makefile
+++ b/isys/Makefile
@@ -1,8 +1,8 @@
include ../Makefile.inc
ARCH := $(patsubst i%86,i386,$(shell uname -m))
-ARCH := $(patsubst sparc%,sparc,$(ARCH))
-CFLAGS = -I/usr/include/python1.5 -I.. -g
+ARCH := $(patsubst sparc%,sparc,$(ARCH))
+CFLAGS = -I/usr/include/python1.5 -I.. -g -I/usr/include/rpm
OBJECTS = nfsmount.o dns.o mount_clnt.o mount_xdr.o imount.o \
smp.o moduleinfo.o devnodes.o cpio.o probe.o
STATICOBJS = otherinsmod.o
diff --git a/isys/cpio.c b/isys/cpio.c
index 06e41502f..87631d8f6 100644
--- a/isys/cpio.c
+++ b/isys/cpio.c
@@ -10,8 +10,8 @@
int installCpioFile(FD_t fd, char * cpioName, char * outName, int inWin) {
struct cpioFileMapping map;
int rc;
- char * failedFile;
- CFD_t cfdbuf, *cfd = &cfdbuf;
+ const char * failedFile;
+ FD_t cfd;
if (outName) {
map.archivePath = cpioName;
@@ -19,12 +19,12 @@ int installCpioFile(FD_t fd, char * cpioName, char * outName, int inWin) {
map.mapFlags = CPIO_MAP_PATH;
}
- cfd->cpioIoType = cpioIoTypeGzFd;
- cfd->cpioGzFd = gzdFdopen(fdDup(fdFileno(fd)), "r");
-
+ (void) Fflush(fd);
+ cfd = Fdopen(fdDup(Fileno(fd)), "r.gzdio");
+
rc = cpioInstallArchive(cfd, outName ? &map : NULL, 1, NULL, NULL,
&failedFile);
- gzdClose(cfd->cpioGzFd);
+ Fclose(cfd);
if (rc || access(outName, R_OK)) {
return -1;
diff --git a/isys/cpio.h b/isys/cpio.h
index 44301aee9..2ee92f1ce 100644
--- a/isys/cpio.h
+++ b/isys/cpio.h
@@ -3,7 +3,11 @@
#include <zlib.h>
#define HAVE_ZLIB_H 1
-#include <rpm/rpmio.h>
+#include <glob.h> /* XXX rpmlib.h */
+#include <dirent.h> /* XXX rpmlib.h */
+
+#define HAVE_LIBIO 1
+#include <rpmlib.h>
#define CPIO_MAP_PATH (1 << 0)
#define CPIO_MAP_MODE (1 << 1)
@@ -49,9 +53,9 @@ typedef struct CFD {
typedef void (*cpioCallback)(struct cpioCallbackInfo * filespec, void * data);
/* librpm provides these */
-int cpioInstallArchive(CFD_t *cfd, struct cpioFileMapping * mappings,
- int numMappings, cpioCallback cb, void * cbData,
- char ** failedFile);
+int cpioInstallArchive(FD_t cfd, struct cpioFileMapping * mappings,
+ int numMappings, cpioCallback cb, void * cbData,
+ const char ** failedFile);
const char *cpioStrerror(int rc);
int installCpioFile(FD_t fd, char * cpioName, char * outName, int inWin);
diff --git a/isys/isys.c b/isys/isys.c
index aa291a803..5f76d0a27 100644
--- a/isys/isys.c
+++ b/isys/isys.c
@@ -366,8 +366,8 @@ static PyObject * doGetOpt(PyObject * s, PyObject * pyargs) {
argv[i] = NULL;
- optCon = poptGetContext("", PyList_Size(argList), argv, options,
- POPT_CONTEXT_KEEP_FIRST);
+ optCon = poptGetContext("", PyList_Size(argList), (const char **) argv,
+ options, POPT_CONTEXT_KEEP_FIRST);
if ((rc = poptGetNextOpt(optCon)) < -1) {
i = strlen(poptBadOption(optCon, POPT_BADOPTION_NOALIAS)) +
@@ -725,7 +725,7 @@ static PyObject * doPoptParse(PyObject * s, PyObject * args) {
if (!PyArg_ParseTuple(args, "s", &str)) return NULL;
- if (poptParseArgvString(str, &argc, &argv)) {
+ if (poptParseArgvString(str, &argc, (const char ***) &argv)) {
PyErr_SetString(PyExc_ValueError, "bad string for parsing");
return NULL;
}
diff --git a/isys/otherinsmod.c b/isys/otherinsmod.c
index 814d60286..256fbc19c 100644
--- a/isys/otherinsmod.c
+++ b/isys/otherinsmod.c
@@ -56,8 +56,8 @@ int ourInsmodCommand(int argc, char ** argv) {
/* Try two balls on sparc64, one elsewhere */
for (i = 0; ; i++) {
/* it might be having a ball */
- fd = fdOpen(ballPath, O_RDONLY, 0);
- if (fdFileno(fd) < 0) {
+ fd = Fopen(ballPath, "r.fdio");
+ if (!fd || Ferror(fd)) {
free(ballPath);
return 1;
}