summaryrefslogtreecommitdiffstats
path: root/cache.cxx
diff options
context:
space:
mode:
authorElliott Baron <ebaron@toriamos.yyz.redhat.com>2008-10-20 10:44:52 -0400
committerElliott Baron <ebaron@toriamos.yyz.redhat.com>2008-10-20 10:44:52 -0400
commit6b1730cb635b8d671bca8c3df173db3f1282ecdb (patch)
tree0ec95b40c26591002a89a25c928772295a80605f /cache.cxx
parentf9e62cd9ca858f8fdd3a46f4b9e42b47092fc423 (diff)
parentaacc3f504dc5e52a8c5a30a469e2c8b9bb9986bd (diff)
downloadsystemtap-steved-6b1730cb635b8d671bca8c3df173db3f1282ecdb.tar.gz
systemtap-steved-6b1730cb635b8d671bca8c3df173db3f1282ecdb.tar.xz
systemtap-steved-6b1730cb635b8d671bca8c3df173db3f1282ecdb.zip
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Diffstat (limited to 'cache.cxx')
-rw-r--r--cache.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/cache.cxx b/cache.cxx
index 750e2309..acab0b84 100644
--- a/cache.cxx
+++ b/cache.cxx
@@ -158,11 +158,13 @@ clean_cache(systemtap_session& s)
}
else
{
- //file doesnt exist or error
- if (s.verbose > 1)
- clog << "Missing cache limit file " << s.cache_path << "/" << SYSTEMTAP_CACHE_MAX_FILENAME << ", I/O error or invalid content." << endl;
+ //file doesnt exist, create a default size
+ ofstream default_cache_max(cache_max_filename.c_str(), ios::out);
+ default_cache_max << SYSTEMTAP_CACHE_DEFAULT_MB << endl;
+ cache_mb_max = SYSTEMTAP_CACHE_DEFAULT_MB;
- return;
+ if (s.verbose > 1)
+ clog << "Cache limit file " << s.cache_path << "/" << SYSTEMTAP_CACHE_MAX_FILENAME << " missing, creating default." << endl;
}
//glob for all kernel modules in the cache dir