summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarsten Hopp <karsten@redhat.de>2001-06-20 13:15:44 +0000
committerKarsten Hopp <karsten@redhat.de>2001-06-20 13:15:44 +0000
commit6a81b8274f1259a1a03189de0ff8841ff1e1d96a (patch)
tree00c81e07d8bb4acee580c043bd29f63fca0c9ae5
parent716d3e554119528a88cbaeb9ec8ffbe79e44ac1d (diff)
downloadanaconda-6a81b8274f1259a1a03189de0ff8841ff1e1d96a.tar.gz
anaconda-6a81b8274f1259a1a03189de0ff8841ff1e1d96a.tar.xz
anaconda-6a81b8274f1259a1a03189de0ff8841ff1e1d96a.zip
patches for s390
-rw-r--r--fonts/Makefile3
-rw-r--r--isys/devnodes.c12
-rw-r--r--isys/isys.c11
-rw-r--r--isys/isys.py1
-rw-r--r--isys/nfsmount.c4
-rw-r--r--isys/probe.c40
-rw-r--r--isys/smp.c29
-rw-r--r--iutil.py4
-rw-r--r--loader/loader.c6
-rw-r--r--loader/net.c47
-rw-r--r--textw/partitioning_text.py5
11 files changed, 160 insertions, 2 deletions
diff --git a/fonts/Makefile b/fonts/Makefile
index d4da8d7ca..edce9313c 100644
--- a/fonts/Makefile
+++ b/fonts/Makefile
@@ -20,3 +20,6 @@ sparc:
ia64:
./updfonts ia64
+
+s390:
+ ./updfonts s390
diff --git a/isys/devnodes.c b/isys/devnodes.c
index 624176bf3..54638964f 100644
--- a/isys/devnodes.c
+++ b/isys/devnodes.c
@@ -143,6 +143,18 @@ int devMakeInode(char * devName, char * path) {
minor = 1;
if (devName[3])
minor += devName[3] - '1';
+ } else if (!strncmp(devName, "dasd", 4)) {
+ /* IBM Dasd Drives */
+ type = S_IFBLK;
+ major = 94;
+ minor = ( devName[4] - 'a' ) * 4;
+ if (devName[5])
+ minor += devName[5] - '0';
+ } else if (!strncmp(devName, "mnd", 4)) {
+ /* IBM MiniDisk Drives */
+ type = S_IFBLK;
+ major = 95;
+ minor = devName[3] - 'a';
} else if (!strncmp(devName, "rd/", 3)) {
/* dac 960 "/rd/c0d0{p1}" */
type = S_IFBLK;
diff --git a/isys/isys.c b/isys/isys.c
index d61710d17..3f61b47ea 100644
--- a/isys/isys.c
+++ b/isys/isys.c
@@ -155,6 +155,7 @@ static void probedListDealloc (probedListObject * o);
static PyObject * probedListNet(probedListObject * s, PyObject * args);
static PyObject * probedListScsi(probedListObject * s, PyObject * args);
static PyObject * probedListIde(probedListObject * s, PyObject * args);
+static PyObject * probedListDasd(probedListObject * s, PyObject * args);
static int probedListLength(PyObject * o);
static PyObject * probedListSubscript(probedListObject * o, int item);
@@ -162,6 +163,7 @@ static PyMethodDef probedListObjectMethods[] = {
{ "updateNet", (PyCFunction) probedListNet, METH_VARARGS, NULL },
{ "updateScsi", (PyCFunction) probedListScsi, METH_VARARGS, NULL },
{ "updateIde", (PyCFunction) probedListIde, METH_VARARGS, NULL },
+ { "updateDasd", (PyCFunction) probedListDasd, METH_VARARGS, NULL },
{ NULL },
};
@@ -856,6 +858,15 @@ static PyObject * probedListScsi(probedListObject * o, PyObject * args) {
return Py_None;
}
+static PyObject * probedListDasd(probedListObject * o, PyObject * args) {
+ if (!PyArg_ParseTuple(args, "")) return NULL;
+
+ kdFindDasdList(&o->list, 0);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
int pdc_dev_running_raid(int fd);
#ifdef __i386__
diff --git a/isys/isys.py b/isys/isys.py
index 525877da4..d852c2a70 100644
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -175,6 +175,7 @@ def driveDict(klassArg):
p = _isys.ProbedList()
p.updateIde()
p.updateScsi()
+ p.updateDasd()
dict = {}
for (klass, dev, descr) in p:
diff --git a/isys/nfsmount.c b/isys/nfsmount.c
index f4151aa3a..85bc8d1ca 100644
--- a/isys/nfsmount.c
+++ b/isys/nfsmount.c
@@ -42,6 +42,7 @@
#include <netdb.h>
#include <rpc/rpc.h>
#include <rpc/pmap_prot.h>
+#include <rpcsvc/nfs_prot.h>
#include <rpc/pmap_clnt.h>
#include <sys/socket.h>
#include <sys/time.h>
@@ -53,7 +54,6 @@
#include "nfsmount.h"
#define NFS_NEED_KERNEL_TYPES
-#include <linux/nfs.h>
#include "mount_constants.h"
#include "nfs_mount4.h"
#undef NFS_NEED_KERNEL_TYPES
@@ -808,7 +808,7 @@ fail:
#endif
static struct {
- enum nfs_stat stat;
+ enum nfsstat stat;
int errnum;
} nfs_errtbl[] = {
{ NFS_OK, 0 },
diff --git a/isys/probe.c b/isys/probe.c
index a66956ef6..800a14ff8 100644
--- a/isys/probe.c
+++ b/isys/probe.c
@@ -404,6 +404,46 @@ bye:
return val;
}
+int kdFindDasdList(struct knownDevices * devices, int code) {
+ /* patch for s390 by Oliver Paukstadt <oliver.paukstadt@millenux.com> */
+ /* based upon code by Erik Tews <erik.tews@gmx.net> */
+
+ FILE * fd;
+ struct kddevice device;
+ char line[200];
+ char name[10];
+ char status[10];
+ char model[30];
+
+ if (access("/proc/dasd/devices", R_OK)) return 0;
+ /* a system without /proc/dasd/devices is nothing to worry about */
+
+ fd = fopen ("/proc/dasd/devices", "r");
+ if (fd == NULL) return 1;
+
+ /* Every line in this file is a harddisk */
+ while ((fgets(line, 190, fd)) != NULL) {
+
+ sscanf(line, "%*X %*[(A-Z)] at (%*d:%*d) is %[a-z0-9]:%s ", name, status);
+ /* Take every dasd, formated and unformated */
+
+ if (!deviceKnown(devices, name)) {
+ snprintf(model, sizeof(model), "IBM DASD (%s)", status);
+ device.class = CLASS_HD;
+ device.name = strdup(name);
+ device.model = strdup(model);
+ device.code = code;
+ addDevice(devices, device);
+ }
+ }
+ fclose (fd);
+
+ qsort(devices->known, devices->numKnown, sizeof(*devices->known),
+ sortDevices);
+ return 0;
+
+}
+
struct knownDevices kdInit(void) {
struct knownDevices kd;
diff --git a/isys/smp.c b/isys/smp.c
index 3ece6cd15..a7e577d65 100644
--- a/isys/smp.c
+++ b/isys/smp.c
@@ -39,6 +39,31 @@ int alphaDetectSMP(void)
}
#endif /* __alpha__ */
+#if defined (__s390__) || defined (__s390x__)
+int s390DetectSMP(void)
+{
+ int issmp = 0;
+ FILE *f;
+
+ f = fopen("/proc/cpuinfo", "r");
+ if (f) {
+ char buff[1024];
+
+ while (fgets (buff, 1024, f) != NULL) {
+ if (!strncmp (buff, "# processors : ", 18)) {
+ if (strtoul (buff + 18, NULL, 0) > 1)
+ issmp = 1;
+ break;
+ }
+ }
+ fclose(f);
+ } else
+ return -1;
+
+ return issmp;
+}
+#endif /* __s390__ */
+
#ifdef __sparc__
int sparcDetectSMP(void)
{
@@ -460,6 +485,10 @@ int detectSMP(void)
return isSMP = alphaDetectSMP();
#elif __ia64__
return isSMP = 1;
+#elif __s390__
+ return isSMP = s390DetectSMP();
+#elif __s390x__
+ return isSMP = s390DetectSMP();
#else
#error unknown architecture
#endif
diff --git a/iutil.py b/iutil.py
index 53566ef52..147f41df5 100644
--- a/iutil.py
+++ b/iutil.py
@@ -27,6 +27,10 @@ def SetFdDevice():
f.close()
elif iutil.getArch() == "alpha":
pass
+ elif iutil.getArch() == "s390":
+ return
+ elif iutil.getArch() == "s390x":
+ return
elif iutil.getArch() == "i386" or iutil.getArch() == "ia64":
# Look for the first IDE floppy device
drives = isys.floppyDriveDict()
diff --git a/loader/loader.c b/loader/loader.c
index a3759dc33..de1f31812 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -1378,13 +1378,16 @@ static char * doMountImage(char * location,
while (step != STEP_DONE) {
switch (step) {
case STEP_LANG:
+#if !defined (__s390__) && !defined (__s390x__)
chooseLanguage(lang, flags);
+#endif
defaultLang = 0;
step = STEP_KBD;
dir = 1;
break;
case STEP_KBD:
+#if !defined (__s390__) && !defined (__s390x__)
rc = chooseKeyboard (keymap, kbdtype, flags);
if (rc == LOADER_NOOP) {
@@ -1399,9 +1402,12 @@ static char * doMountImage(char * location,
step = STEP_LANG;
dir = -1;
} else {
+#endif
step = STEP_METHOD;
dir = 1;
+#if !defined (__s390__) && !defined (__s390x__)
}
+#endif
break;
case STEP_METHOD:
diff --git a/loader/net.c b/loader/net.c
index d1bdff79b..c147ba00b 100644
--- a/loader/net.c
+++ b/loader/net.c
@@ -296,7 +296,9 @@ int readNetConfig(char * device, struct networkDeviceConfig * cfg, int flags) {
struct in_addr addr;
char dhcpChoice;
char * chptr;
+ char * env;
+#if !defined(__s390__) && !defined(__s390x__)
text = newtTextboxReflowed(-1, -1,
_("Please enter the IP configuration for this machine. Each "
"item should be entered as an IP address in dotted-decimal "
@@ -437,6 +439,49 @@ int readNetConfig(char * device, struct networkDeviceConfig * cfg, int flags) {
}
} while (i != 2);
+#else /* s390 now */
+
+ /* quick and dirty hack by opaukstadt@millenux.com for s390 */
+ /* ctc stores remoteip in broadcast-field until pump.h is changed */
+ memset(&newCfg, 0, sizeof(newCfg));
+ strcpy(newCfg.dev.device, device);
+ newCfg.isDynamic = 0;
+ env = getenv("IPADDR");
+ if (env) {
+ inet_aton(env, &newCfg.dev.ip);
+ newCfg.dev.set |= PUMP_INTFINFO_HAS_IP;
+ }
+ env = getenv("NETMASK");
+ if (env) {
+ inet_aton(env, &newCfg.dev.netmask);
+ newCfg.dev.set |= PUMP_INTFINFO_HAS_NETMASK;
+ }
+ env = getenv("GATEWAY");
+ if (env) {
+ inet_aton(env, &newCfg.dev.gateway);
+ newCfg.dev.set |= PUMP_NETINFO_HAS_GATEWAY;
+ }
+ env = getenv("NETWORK");
+ if (env) {
+ inet_aton(env, &newCfg.dev.network);
+ newCfg.dev.set |= PUMP_INTFINFO_HAS_NETWORK;
+ }
+ if (!strncmp(newCfg.dev.device, "ctc", 3)) {
+ env = getenv("REMIP");
+ if (env) {
+ inet_aton(env, &newCfg.dev.broadcast);
+ newCfg.dev.set |= PUMP_INTFINFO_HAS_BROADCAST;
+ }
+ } else {
+ env = getenv("BROADCAST");
+ if (env) {
+ inet_aton(env, &newCfg.dev.broadcast);
+ newCfg.dev.set |= PUMP_INTFINFO_HAS_BROADCAST;
+ }
+ }
+#endif
+
+
#ifdef __STANDALONE__
if (!newCfg.isDynamic)
#endif
@@ -459,7 +504,9 @@ int readNetConfig(char * device, struct networkDeviceConfig * cfg, int flags) {
}
}
+#if !defined(__s390__) && !defined(__s390__)
newtPopWindow();
+#endif
if (!FL_TESTING(flags)) {
configureNetwork(cfg);
diff --git a/textw/partitioning_text.py b/textw/partitioning_text.py
index 1d97f6346..b1f67465b 100644
--- a/textw/partitioning_text.py
+++ b/textw/partitioning_text.py
@@ -33,6 +33,11 @@ class PartitionMethod:
return INSTALL_OK
+class DasdPreparation:
+ def __call__(self, screen, todo):
+ todo.skipFdisk = 1
+ return INSTALL_NOOP
+
class ManualPartitionWindow:
def __call__(self, screen, todo):
from newtpyfsedit import fsedit