Blame SOURCES/rhbz1051649.9.patch

f43afa
From 53d72bca75a2bfc75bceea0d094131c9d53bd942 Mon Sep 17 00:00:00 2001
f43afa
From: "Frank Ch. Eigler" <fche@redhat.com>
f43afa
Date: Fri, 28 Mar 2014 15:24:19 -0400
f43afa
Subject: [PATCH] PR16766 cont'd: unbreak --runtime=dyninst
f43afa
f43afa
* translate.cxx: While emitting systemtap_module_refresh(), protect
f43afa
  the printk diagnostics with #if defined(__KERNEL__).
f43afa
---
f43afa
 translate.cxx | 4 +++-
f43afa
 1 file changed, 3 insertions(+), 1 deletion(-)
f43afa
f43afa
diff --git a/translate.cxx b/translate.cxx
f43afa
index 17dedd4..90b04d8 100644
f43afa
--- a/translate.cxx
f43afa
+++ b/translate.cxx
f43afa
@@ -1887,7 +1887,9 @@ c_unparser::emit_module_refresh ()
f43afa
   o->newline() << "int state = atomic_read (session_state());";
f43afa
   o->newline() << "if (state != STAP_SESSION_RUNNING && state != STAP_SESSION_STARTING) {";
f43afa
   // cannot _stp_warn etc. since we're not in probe context
f43afa
-  o->newline(1) << "printk (KERN_ERR \"stap module notifier triggered in unexpected state %d\", state);";
f43afa
+  o->newline(1) << "#if defined(__KERNEL__)";
f43afa
+  o->newline() << "printk (KERN_ERR \"stap module notifier triggered in unexpected state %d\", state);";
f43afa
+  o->newline() << "#endif";
f43afa
   o->newline() << "return;";
f43afa
   o->newline(-1) << "}";
f43afa
 
f43afa
-- 
f43afa
1.8.3.1
f43afa