summaryrefslogtreecommitdiffstats
path: root/hash.cxx
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2008-08-09 12:09:01 -0400
committerFrank Ch. Eigler <fche@elastic.org>2008-08-09 12:09:01 -0400
commitd9736de16f58966ff0fd7f9e7391d6beba8d7366 (patch)
treee795e54ac0537d30bcfd2d54e724eaac08ff1c14 /hash.cxx
parent12a7f85b2dd19fbfa34c81f6cba15015a8a2723d (diff)
downloadsystemtap-steved-d9736de16f58966ff0fd7f9e7391d6beba8d7366.tar.gz
systemtap-steved-d9736de16f58966ff0fd7f9e7391d6beba8d7366.tar.xz
systemtap-steved-d9736de16f58966ff0fd7f9e7391d6beba8d7366.zip
prep find_executable() for use by process() probes
Diffstat (limited to 'hash.cxx')
-rw-r--r--hash.cxx16
1 files changed, 7 insertions, 9 deletions
diff --git a/hash.cxx b/hash.cxx
index 2c1bfb25..79458319 100644
--- a/hash.cxx
+++ b/hash.cxx
@@ -126,16 +126,14 @@ find_hash (systemtap_session& s, const string& script)
h.add(s.runtime_path);
// Hash compiler path, size, and mtime. We're just going to assume
- // we'll be using gcc, which should be correct most of the time.
- string gcc_path;
- if (find_executable("gcc", gcc_path))
+ // we'll be using gcc. XXX: getting kbuild to spit out out would be
+ // better.
+ string gcc_path = find_executable ("gcc");
+ if (stat(gcc_path.c_str(), &st) == 0)
{
- if (stat(gcc_path.c_str(), &st) == 0)
- {
- h.add(gcc_path);
- h.add(st.st_size);
- h.add(st.st_mtime);
- }
+ h.add(gcc_path);
+ h.add(st.st_size);
+ h.add(st.st_mtime);
}
// Hash the systemtap size and mtime. We could use VERSION/DATE,