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 --- parse.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'parse.cxx') diff --git a/parse.cxx b/parse.cxx index 04e01ebc..f7ea157b 100644 --- a/parse.cxx +++ b/parse.cxx @@ -1,5 +1,6 @@ // recursive descent parser for systemtap scripts // Copyright (C) 2005-2006 Red Hat Inc. +// 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 @@ -154,7 +155,7 @@ bool eval_pp_conditional (systemtap_session& s, string target_kernel_vr = s.kernel_release; string target_kernel_v = target_kernel_vr; // cut off any release code suffix - string::size_type dr = target_kernel_vr.rfind ('-'); + string::size_type dr = target_kernel_vr.find ('-'); if (dr > 0 && dr != string::npos) target_kernel_v = target_kernel_vr.substr (0, dr); -- cgit