diff options
author | David Cantrell <dcantrell@redhat.com> | 2006-03-24 16:02:27 +0000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2006-03-24 16:02:27 +0000 |
commit | 45744e5958b008cf6f8375fd7c10e3506eb4afab (patch) | |
tree | 1c30bee5b1259b144e9e147885498ccadda3f26e | |
parent | 72eb48a7e39830dd47ce5b4a83ce840d24a26854 (diff) | |
download | anaconda-45744e5958b008cf6f8375fd7c10e3506eb4afab.tar.gz anaconda-45744e5958b008cf6f8375fd7c10e3506eb4afab.tar.xz anaconda-45744e5958b008cf6f8375fd7c10e3506eb4afab.zip |
Build it up, tear it down. Since we're destroying isys from the inside,
figured I'd remove isys.getpagesize() since the Python resource module
has that.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | fsset.py | 5 | ||||
-rw-r--r-- | isys/isys.c | 6 | ||||
-rw-r--r-- | isys/isys.py | 6 | ||||
-rw-r--r-- | partedUtils.py | 4 |
5 files changed, 15 insertions, 14 deletions
@@ -1,3 +1,11 @@ +2006-03-24 David Cantrell <dcantrell@redhat.com> + + * fsset.py: Use resource.getpagesize() instead of isys.getpagesize(). + * partedUtils.py: Likewise. + + * isys/isys.c: Removed doGetPageSize(). + * isys/isys.py: replace getpagesize() with resource.getpagesize(). + 2006-03-24 Peter Jones <pjones@redhat.com> * Makefile.inc: Fix selinux conditional inclusion. @@ -17,6 +17,7 @@ import string import isys import iutil import os +import resource import posix import stat import errno @@ -742,7 +743,7 @@ class swapFileSystem(FileSystemType): def mount(self, device, mountpoint, readOnly=0, bindMount=0): - pagesize = isys.getpagesize() + pagesize = resource.getpagesize() buf = None if pagesize > 2048: num = pagesize @@ -800,7 +801,7 @@ class swapFileSystem(FileSystemType): entry.setLabel(label) def clobberDevice(self, entry, chroot): - pagesize = isys.getpagesize() + pagesize = resource.getpagesize() dev = entry.device.setupDevice(chroot) try: fd = os.open(dev, os.O_RDWR) diff --git a/isys/isys.c b/isys/isys.c index 95baf70a1..50a892719 100644 --- a/isys/isys.c +++ b/isys/isys.c @@ -104,7 +104,6 @@ static PyObject * doSync(PyObject * s, PyObject * args); static PyObject * doisIsoImage(PyObject * s, PyObject * args); static PyObject * getFramebufferInfo(PyObject * s, PyObject * args); static PyObject * printObject(PyObject * s, PyObject * args); -static PyObject * doGetPageSize(PyObject * s, PyObject * args); static PyObject * py_bind_textdomain_codeset(PyObject * o, PyObject * args); static PyObject * getLinkStatus(PyObject * s, PyObject * args); static PyObject * py_getDasdPorts(PyObject * s, PyObject * args); @@ -160,7 +159,6 @@ static PyMethodDef isysModuleMethods[] = { { "sync", (PyCFunction) doSync, METH_VARARGS, NULL}, { "isisoimage", (PyCFunction) doisIsoImage, METH_VARARGS, NULL}, { "fbinfo", (PyCFunction) getFramebufferInfo, METH_VARARGS, NULL}, - { "getpagesize", (PyCFunction) doGetPageSize, METH_VARARGS, NULL}, { "printObject", (PyCFunction) printObject, METH_VARARGS, NULL}, { "bind_textdomain_codeset", (PyCFunction) py_bind_textdomain_codeset, METH_VARARGS, NULL}, { "getLinkStatus", (PyCFunction) getLinkStatus, METH_VARARGS, NULL }, @@ -1246,10 +1244,6 @@ static PyObject * getFramebufferInfo(PyObject * s, PyObject * args) { return Py_BuildValue("(iii)", fb.xres, fb.yres, fb.bits_per_pixel); } -static PyObject * doGetPageSize(PyObject * s, PyObject * args) { - return Py_BuildValue("i", getpagesize()); -} - static PyObject * getLinkStatus(PyObject * s, PyObject * args) { char *dev; int ret; diff --git a/isys/isys.py b/isys/isys.py index 32512b863..eea59db21 100644 --- a/isys/isys.py +++ b/isys/isys.py @@ -25,6 +25,7 @@ import sys import kudzu import iutil import warnings +import resource import logging log = logging.getLogger("anaconda") @@ -608,7 +609,7 @@ def readSwapLabel_int(device): except: return label - pagesize = getpagesize() + pagesize = resource.getpagesize() try: buf = os.read(fd, pagesize) os.close(fd) @@ -833,9 +834,6 @@ def ideCdRwList(): return newList -def getpagesize(): - return _isys.getpagesize() - def getLinkStatus(dev): return _isys.getLinkStatus(dev) diff --git a/partedUtils.py b/partedUtils.py index 332b284e7..799d1c16f 100644 --- a/partedUtils.py +++ b/partedUtils.py @@ -19,7 +19,7 @@ import parted import math -import os, sys, string, struct +import os, sys, string, struct, resource from product import * import fsset @@ -410,7 +410,7 @@ def sniffFilesystemType(device): except: pass - pagesize = isys.getpagesize() + pagesize = resource.getpagesize() if pagesize > 2048: num = pagesize else: |