summaryrefslogtreecommitdiffstats
path: root/isys
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-08-14 02:00:12 +0000
committerJeremy Katz <katzj@redhat.com>2003-08-14 02:00:12 +0000
commitc540e134193f9759873ced09b0156c6219983101 (patch)
treeb36013fe219e6c3d8762bf2a0a32b538ac5c0373 /isys
parent3f01dfc8e9d6b8bf25b79b1cbda94ca0ff4ada09 (diff)
downloadanaconda-c540e134193f9759873ced09b0156c6219983101.tar.gz
anaconda-c540e134193f9759873ced09b0156c6219983101.tar.xz
anaconda-c540e134193f9759873ced09b0156c6219983101.zip
merge from taroon-branch. all kinds of miscellaneous bugfixes, including
* firewall update * iSeries PReP size * ppc mediacheck * tzdata stuff * cmdline mode * pkg defaults screen
Diffstat (limited to 'isys')
-rw-r--r--isys/isys.py19
-rw-r--r--isys/lang.c6
-rw-r--r--isys/probe.c6
3 files changed, 28 insertions, 3 deletions
diff --git a/isys/isys.py b/isys/isys.py
index b0ecc9fee..91bb42951 100644
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -313,6 +313,25 @@ def isUsableDasd(device):
def isLdlDasd(device):
return _isys.isLdlDasd(device)
+# read /proc/dasd/devices and get a mapping between devs and the dasdnum
+def getDasdDevPort():
+ ret = {}
+ f = open("/proc/dasd/devices", "r")
+ lines = f.readlines()
+ f.close()
+
+ for line in lines:
+ index = line.index("(")
+ dasdnum = line[:index]
+
+ start = line[index:].find("dasd")
+ end = line[start:].find(":")
+ dev = line[start:end + start].strip()
+
+ ret[dev] = dasdnum
+
+ return ret
+
def makeDevInode(name, fn=None):
if fn:
_isys.mkdevinode(name, fn)
diff --git a/isys/lang.c b/isys/lang.c
index 177e02126..e85b8041f 100644
--- a/isys/lang.c
+++ b/isys/lang.c
@@ -82,6 +82,7 @@ int loadKeymap(gzFile stream) {
int count = 0;
int magic;
short keymap[NR_KEYS];
+ struct stat sb;
#if defined (__s390__) || defined (__s390x__)
return 0;
@@ -89,6 +90,11 @@ int loadKeymap(gzFile stream) {
if (isVioConsole())
return 0;
+ /* assume that if we're already on a pty loading a keymap is silly */
+ fstat(0, &sb);
+ if (major(sb.st_rdev) == 3 || major(sb.st_rdev) == 136)
+ return 0;
+
if (gunzip_read(stream, &magic, sizeof(magic)) != sizeof(magic))
return -EIO;
diff --git a/isys/probe.c b/isys/probe.c
index ad7d3a42c..3645e88b3 100644
--- a/isys/probe.c
+++ b/isys/probe.c
@@ -121,7 +121,7 @@ int kdFindNetList(struct knownDevices * devices, int code) {
s = readFD(fd, &buf);
close(fd);
if (s < 0) {
- fprintf(stderr, "error reading /proc/net/dev!\n");
+ /* fprintf(stderr, "error reading /proc/net/dev!\n");*/
return 1;
}
@@ -708,7 +708,7 @@ static int ProcPartitionsGetDevices(struct knownDevices * devices) {
if (i < 1) {
close(fd);
free (buf);
- fprintf(stderr, "error reading /proc/partitions!\n");
+ /* fprintf(stderr, "error reading /proc/partitions!\n");*/
return 1;
}
close(fd);
@@ -793,7 +793,7 @@ static int ataraidGetDevices(struct knownDevices * devices) {
if (i < 1) {
close(fd);
free (buf);
- fprintf(stderr, "error reading /proc/partitions!\n");
+ /*fprintf(stderr, "error reading /proc/partitions!\n");*/
return 1;
}
close(fd);