summaryrefslogtreecommitdiffstats
path: root/iutil.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2003-01-14 05:06:46 +0000
committerMike Fulbright <msf@redhat.com>2003-01-14 05:06:46 +0000
commitf31cff062d616096f74f54f66e8ce29659109f09 (patch)
tree70619b90e74208334bc29d2b905dcc9d4a0d1ce9 /iutil.py
parent78df9af2edd6f35ae3f070172cb8ec8bd7412d32 (diff)
downloadanaconda-f31cff062d616096f74f54f66e8ce29659109f09.tar.gz
anaconda-f31cff062d616096f74f54f66e8ce29659109f09.tar.xz
anaconda-f31cff062d616096f74f54f66e8ce29659109f09.zip
give option to quiet this down now its called in autopart.py:growParts() a whole lot
Diffstat (limited to 'iutil.py')
-rw-r--r--iutil.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/iutil.py b/iutil.py
index 95c70493d..042b94d1c 100644
--- a/iutil.py
+++ b/iutil.py
@@ -3,7 +3,7 @@
#
# Erik Troan <ewt@redhat.com>
#
-# Copyright 1999-2001 Red Hat, Inc.
+# Copyright 1999-2003 Red Hat, Inc.
#
# This software may be freely redistributed under the terms of the GNU
# library public license.
@@ -209,10 +209,12 @@ def memInstalled(corrected = 1):
return int(mem)
# try to keep 2.4 kernel swapper happy!
-def swapSuggestion():
+def swapSuggestion(quiet=0):
mem = memInstalled(corrected=0)/1024
mem = ((mem/16)+1)*16
- log("Detected %sM of memory", mem)
+ if not quiet:
+ log("Detected %sM of memory", mem)
+
if mem < 128:
minswap = 96
maxswap = 192
@@ -223,8 +225,9 @@ def swapSuggestion():
else:
minswap = mem
maxswap = 2*mem
-
- log("Swap attempt of %sM to %sM", minswap, maxswap)
+
+ if not quiet:
+ log("Swap attempt of %sM to %sM", minswap, maxswap)
return (minswap, maxswap)