]> sourceware.org Git - systemtap.git/commitdiff
Hold System.map failures until both attempts fail
authorJosh Stone <jistone@redhat.com>
Wed, 28 Nov 2012 21:59:35 +0000 (13:59 -0800)
committerJosh Stone <jistone@redhat.com>
Wed, 28 Nov 2012 21:59:35 +0000 (13:59 -0800)
On RHEL4, System.map only exists in /boot/, so the first attempt under
/lib/modules/ was always spamming about its failure.  Now that error
message is delayed and printed iff /boot/ fails too.

Reported-by: William Cohen <wcohen@redhat.com>
session.cxx

index 6c29f4acdd94d308005633288961eacfc3a1c160..e7056f8e949609aa2578e60b5c87d110bf52d79c 100644 (file)
@@ -1515,8 +1515,8 @@ systemtap_session::parse_kernel_functions ()
   system_map.open(system_map_path.c_str(), ifstream::in);
   if (! system_map.is_open())
     {
-      clog << _F("Checking \"%s\" failed with error: %s\nEnsure kernel development headers & makefiles are installed",
-                 system_map_path.c_str(), strerror(errno)) << endl;
+      string error1 = _F("Checking \"%s\" failed with error: %s\nEnsure kernel development headers & makefiles are installed",
+                         system_map_path.c_str(), strerror(errno));
 
       string system_map_path2 = "/boot/System.map-" + kernel_release;
 
@@ -1524,6 +1524,7 @@ systemtap_session::parse_kernel_functions ()
       system_map.open(system_map_path2.c_str(), ifstream::in);
       if (! system_map.is_open())
         {
+          clog << error1 << endl;
           clog << _F("Checking \"%s\" failed with error: %s",
                      system_map_path2.c_str(), strerror(errno)) << endl;
           return 1;
This page took 0.03407 seconds and 5 git commands to generate.