[PATCH 3/4] Remove no longer used isys EDD code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Note this patch also removes the following line (in the middle of the EDD
block):
handleSegv = _isys.handleSegv

This is intentional, as that line was present in isys.py twice.
---
 isys/isys.c  |   24 -----------------
 isys/isys.py |   79 ----------------------------------------------------------
 2 files changed, 0 insertions(+), 103 deletions(-)

diff --git a/isys/isys.c b/isys/isys.c
index 13173cc..6a2d18d 100644
--- a/isys/isys.c
+++ b/isys/isys.c
@@ -106,8 +106,6 @@ static PyObject * py_bind_textdomain_codeset(PyObject * o, PyObject * args);
 static PyObject * py_getDasdPorts(PyObject * s, PyObject * args);
 static PyObject * py_isUsableDasd(PyObject * s, PyObject * args);
 static PyObject * py_isLdlDasd(PyObject * s, PyObject * args);
-static PyObject * doProbeBiosDisks(PyObject * s, PyObject * args);
-static PyObject * doGetBiosDisk(PyObject * s, PyObject * args); 
 static PyObject * doSegvHandler(PyObject *s, PyObject *args);
 static PyObject * doAuditDaemon(PyObject *s);
 static PyObject * doPrefixToNetmask(PyObject *s, PyObject *args);
@@ -142,8 +140,6 @@ static PyMethodDef isysModuleMethods[] = {
     { "getDasdPorts", (PyCFunction) py_getDasdPorts, METH_VARARGS, NULL},
     { "isUsableDasd", (PyCFunction) py_isUsableDasd, METH_VARARGS, NULL},
     { "isLdlDasd", (PyCFunction) py_isLdlDasd, METH_VARARGS, NULL},
-    { "biosDiskProbe", (PyCFunction) doProbeBiosDisks, METH_VARARGS,NULL},
-    { "getbiosdisk",(PyCFunction) doGetBiosDisk, METH_VARARGS,NULL},
     { "handleSegv", (PyCFunction) doSegvHandler, METH_VARARGS, NULL },
     { "auditdaemon", (PyCFunction) doAuditDaemon, METH_NOARGS, NULL },
     { "prefix2netmask", (PyCFunction) doPrefixToNetmask, METH_VARARGS, NULL },
@@ -624,26 +620,6 @@ py_bind_textdomain_codeset(PyObject * o, PyObject * args) {
     return NULL;
 }
 
-static PyObject * doProbeBiosDisks(PyObject * s, PyObject * args) {
-    if (!PyArg_ParseTuple(args, "")) return NULL;
-
-
-    return Py_BuildValue("i", probeBiosDisks());
-}
-
-static PyObject * doGetBiosDisk(PyObject * s, PyObject * args) {
-    char *mbr_sig;
-    char *diskname;
-            
-    if (!PyArg_ParseTuple(args, "s", &mbr_sig)) return NULL;
-
-    if ((diskname = getBiosDisk(mbr_sig)))
-        return Py_BuildValue("s", diskname);
-
-    Py_INCREF(Py_None);
-    return Py_None;
-}
-
 static PyObject * doSegvHandler(PyObject *s, PyObject *args) {
     void *array[20];
     size_t size;
diff --git a/isys/isys.py b/isys/isys.py
index 8fa8cb9..8c1e2a1 100755
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -254,85 +254,6 @@ def getDasdState(dev):
 
     return 0
 
-def doProbeBiosDisks():
-    if not iutil.isX86():
-        return None
-    return _isys.biosDiskProbe()
-
-def doGetBiosDisk(mbrSig):
-    return _isys.getbiosdisk(mbrSig)
-
-handleSegv = _isys.handleSegv
-
-
-def compareDrives(first, second):
-    from storage.devicelibs.dm import dm_node_from_name
-
-    biosdisks = {}
-    for d in range(80, 80 + 15):
-        disk = doGetBiosDisk("%d" %(d,))
-        #print("biosdisk of %s is %s" %(d, disk))
-        if disk is not None:
-            biosdisks[disk] = d
-
-    # convert /dev/mapper/foo -> /dev/dm-#, as that is what is in biosdisks
-    if os.access("/dev/mapper/%s" % first, os.F_OK):
-        first = dm_node_from_name(first)
-    if os.access("/dev/mapper/%s" % second, os.F_OK):
-        second = dm_node_from_name(second)
-
-    if biosdisks.has_key(first) and biosdisks.has_key(second):
-        one = biosdisks[first]
-        two = biosdisks[second]
-        if (one < two):
-            return -1
-        elif (one > two):
-            return 1
-
-    # if one is in the BIOS and the other not prefer the one in the BIOS
-    if biosdisks.has_key(first):
-        return -1
-    if biosdisks.has_key(second):
-        return 1
-
-    if first.startswith("hd"):
-        type1 = 0
-    elif first.startswith("sd"):
-        type1 = 1
-    elif (first.startswith("vd") or first.startswith("xvd")):
-        type1 = -1
-    else:
-        type1 = 2
-
-    if second.startswith("hd"):
-        type2 = 0
-    elif second.startswith("sd"):
-	type2 = 1
-    elif (second.startswith("vd") or second.startswith("xvd")):
-        type2 = -1
-    else:
-	type2 = 2
-
-    if (type1 < type2):
-	return -1
-    elif (type1 > type2):
-	return 1
-    else:
-	len1 = len(first)
-	len2 = len(second)
-
-	if (len1 < len2):
-	    return -1
-	elif (len1 > len2):
-	    return 1
-	else:
-	    if (first < second):
-		return -1
-	    elif (first > second):
-		return 1
-
-    return 0
-
 def resetResolv():
     return _isys.resetresolv()
 
-- 
1.6.5.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux