]> sourceware.org Git - systemtap.git/commitdiff
PR16766 cont'd: unbreak --runtime=dyninst
authorFrank Ch. Eigler <fche@redhat.com>
Fri, 28 Mar 2014 19:24:19 +0000 (15:24 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Fri, 28 Mar 2014 19:26:08 +0000 (15:26 -0400)
* translate.cxx: While emitting systemtap_module_refresh(), protect
  the printk diagnostics with #if defined(__KERNEL__).

translate.cxx

index 17dedd469fbbdf5ff8318c27fd4627dbd6433a57..90b04d890524177a835564746bc44d11c4af67a2 100644 (file)
@@ -1887,7 +1887,9 @@ c_unparser::emit_module_refresh ()
   o->newline() << "int state = atomic_read (session_state());";
   o->newline() << "if (state != STAP_SESSION_RUNNING && state != STAP_SESSION_STARTING) {";
   // cannot _stp_warn etc. since we're not in probe context
-  o->newline(1) << "printk (KERN_ERR \"stap module notifier triggered in unexpected state %d\", state);";
+  o->newline(1) << "#if defined(__KERNEL__)";
+  o->newline() << "printk (KERN_ERR \"stap module notifier triggered in unexpected state %d\", state);";
+  o->newline() << "#endif";
   o->newline() << "return;";
   o->newline(-1) << "}";
 
This page took 0.03788 seconds and 5 git commands to generate.