summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/monitordisk.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/bitbake/lib/bb/monitordisk.py b/bitbake/lib/bb/monitordisk.py
index 9baba5e73b..946919396b 100644
--- a/bitbake/lib/bb/monitordisk.py
+++ b/bitbake/lib/bb/monitordisk.py
@@ -136,10 +136,13 @@ def getInterval(configuration):
136 136
137 """ Get the disk space interval """ 137 """ Get the disk space interval """
138 138
139 # The default value is 50M and 5K.
140 spaceDefault = 50 * 1024 * 1024
141 inodeDefault = 5 * 1024
142
139 interval = configuration.getVar("BB_DISKMON_WARNINTERVAL", True) 143 interval = configuration.getVar("BB_DISKMON_WARNINTERVAL", True)
140 if not interval: 144 if not interval:
141 # The default value is 50M and 5K. 145 return spaceDefault, inodeDefault
142 return 50 * 1024 * 1024, 5 * 1024
143 else: 146 else:
144 # The disk space or inode interval is optional, but it should 147 # The disk space or inode interval is optional, but it should
145 # have a correct value once it is specified 148 # have a correct value once it is specified
@@ -151,12 +154,16 @@ def getInterval(configuration):
151 if not intervalSpace: 154 if not intervalSpace:
152 printErr("Invalid disk space interval value in BB_DISKMON_WARNINTERVAL: %s" % intervalRe.group(1)) 155 printErr("Invalid disk space interval value in BB_DISKMON_WARNINTERVAL: %s" % intervalRe.group(1))
153 return None, None 156 return None, None
157 else:
158 intervalSpace = spaceDefault
154 intervalInode = intervalRe.group(2) 159 intervalInode = intervalRe.group(2)
155 if intervalInode: 160 if intervalInode:
156 intervalInode = convertGMK(intervalInode) 161 intervalInode = convertGMK(intervalInode)
157 if not intervalInode: 162 if not intervalInode:
158 printErr("Invalid disk inode interval value in BB_DISKMON_WARNINTERVAL: %s" % intervalRe.group(2)) 163 printErr("Invalid disk inode interval value in BB_DISKMON_WARNINTERVAL: %s" % intervalRe.group(2))
159 return None, None 164 return None, None
165 else:
166 intervalInode = inodeDefault
160 return intervalSpace, intervalInode 167 return intervalSpace, intervalInode
161 else: 168 else:
162 printErr("Invalid interval value in BB_DISKMON_WARNINTERVAL: %s" % interval) 169 printErr("Invalid interval value in BB_DISKMON_WARNINTERVAL: %s" % interval)