From 77a5c1f9949be4bdf3ebc6fb969debd68a9ebd27 Mon Sep 17 00:00:00 2001 From: jistone Date: Fri, 3 Mar 2006 18:37:33 +0000 Subject: 2006-03-03 Josh Stone * main.cxx (main): search forward for dashes in the kernel release, to work properly with release names with more than one dash. * parse.cxx (eval_pp_conditional): ditto * tapsets.cxx (profile_derived_probe::profile_derived_probe): ditto * safety/safety.py (StaticSafety::__build_search_suffixes): ditto, and add copyright & GPL tag --- safety/safety.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'safety/safety.py') diff --git a/safety/safety.py b/safety/safety.py index 4a2094f9..f02c30b3 100755 --- a/safety/safety.py +++ b/safety/safety.py @@ -3,6 +3,14 @@ # vim: noet sw=4 ts=4 enc=utf-8 "A static safety-checker for SystemTap modules." +# Copyright (C) 2006 Intel Corporation. +# +# This file is part of systemtap, and is free software. You can +# redistribute it and/or modify it under the terms of the GNU General +# Public License (GPL); either version 2, or (at your option) any +# later version. + + # in python 2.4, set & frozenset are builtins # in python 2.3, the equivalents live in the 'sets' module from sys import hexversion as __hexversion @@ -86,7 +94,7 @@ class StaticSafety: ss.add(relsfx + archsfx) # add kernel version (2.6.NN) + arch - dash_i = relsfx.rfind('-') + dash_i = relsfx.find('-') if dash_i > 0: ss.add(relsfx[:dash_i]) ss.add(relsfx[:dash_i] + archsfx) -- cgit