diff options
author | Erik Troan <ewt@redhat.com> | 2001-01-12 19:14:09 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 2001-01-12 19:14:09 +0000 |
commit | 311b94823a85c1a7b09b60a9f6259372256ea66b (patch) | |
tree | 1ad77c97cf83fe54a4566b11b96afe6f4b5e0076 | |
parent | 46963f51b4b262b64d1a310ee2c397e447331706 (diff) | |
download | anaconda-311b94823a85c1a7b09b60a9f6259372256ea66b.tar.gz anaconda-311b94823a85c1a7b09b60a9f6259372256ea66b.tar.xz anaconda-311b94823a85c1a7b09b60a9f6259372256ea66b.zip |
provide symbolic names for ram thresholds
-rw-r--r-- | isys/isys.c | 9 | ||||
-rw-r--r-- | isys/isys.h | 4 | ||||
-rw-r--r-- | isys/isys.py | 4 |
3 files changed, 16 insertions, 1 deletions
diff --git a/isys/isys.c b/isys/isys.c index 82530b12b..a5f9725cc 100644 --- a/isys/isys.c +++ b/isys/isys.c @@ -741,7 +741,14 @@ static PyObject * smpAvailable(PyObject * s, PyObject * args) { } void init_isys(void) { - Py_InitModule("_isys", isysModuleMethods); + PyObject * m, * d; + + m = Py_InitModule("_isys", isysModuleMethods); + d = PyModule_GetDict(m); + + PyDict_SetItemString(d, "MIN_RAM", PyInt_FromLong(MIN_RAM)); + PyDict_SetItemString(d, "MIN_GUI_RAM", PyInt_FromLong(MIN_GUI_RAM)); + PyDict_SetItemString(d, "EARLY_SWAP_RAM", PyInt_FromLong(EARLY_SWAP_RAM)); } static PyObject * doConfigNetDevice(PyObject * s, PyObject * args) { diff --git a/isys/isys.h b/isys/isys.h index 9c9f929a1..b00ffde5f 100644 --- a/isys/isys.h +++ b/isys/isys.h @@ -3,6 +3,10 @@ #define MIN_ROOTPART_SIZE_MB 250 +#define MIN_RAM 17000 /* 20M or so */ +#define MIN_GUI_RAM 35000 +#define EARLY_SWAP_RAM 34000 + enum driverMajor { DRIVER_NONE = 0, DRIVER_SCSI, DRIVER_NET, DRIVER_CDROM, DRIVER_PCMCIA, DRIVER_FS, DRIVER_OTHER = 1000}; enum driverMinor { DRIVER_MINOR_NONE = 0, DRIVER_MINOR_ETHERNET, diff --git a/isys/isys.py b/isys/isys.py index a7956825f..5aa14bdf4 100644 --- a/isys/isys.py +++ b/isys/isys.py @@ -6,6 +6,10 @@ import os.path mountCount = {} +MIN_RAM = _isys.MIN_RAM +MIN_GUI_RAM = _isys.MIN_GUI_RAM +EARLY_SWAP_RAM = _isys.EARLY_SWAP_RAM + def spaceAvailable(device, fsystem = "ext2"): mount(device, "/mnt/space", fstype = fsystem) space = _isys.devSpaceFree("/mnt/space/.") |