diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2008-06-29 10:14:19 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2008-06-29 10:14:19 -0400 |
commit | 37ddf6e5fa1530adc3a7236379a3a88dfef33d53 (patch) | |
tree | ad7c05df8b0ebeafa75cfee1ed569bf2722091e2 /runtime/staprun/mainloop.c | |
parent | 53ca410a6a6032c2cde6aac6e95b57c68585e48a (diff) | |
download | systemtap-steved-37ddf6e5fa1530adc3a7236379a3a88dfef33d53.tar.gz systemtap-steved-37ddf6e5fa1530adc3a7236379a3a88dfef33d53.tar.xz systemtap-steved-37ddf6e5fa1530adc3a7236379a3a88dfef33d53.zip |
STP_RELOCATE message for kernel relocatability (re)adaption, starting implementation
Diffstat (limited to 'runtime/staprun/mainloop.c')
-rw-r--r-- | runtime/staprun/mainloop.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/runtime/staprun/mainloop.c b/runtime/staprun/mainloop.c index 2bbadbc9..42037473 100644 --- a/runtime/staprun/mainloop.c +++ b/runtime/staprun/mainloop.c @@ -19,27 +19,6 @@ static int use_old_transport = 0; //enum _stp_sig_type { sig_none, sig_done, sig_detach }; //static enum _stp_sig_type got_signal = sig_none; -/** - * send_request - send request to kernel over control channel - * @type: the relay-app command id - * @data: pointer to the data to be sent - * @len: length of the data to be sent - * - * Returns 0 on success, negative otherwise. - */ -int send_request(int type, void *data, int len) -{ - char buf[1024]; - - /* Before doing memcpy, make sure 'buf' is big enough. */ - if ((len + 4) > (int)sizeof(buf)) { - _err("exceeded maximum send_request size.\n"); - return -1; - } - memcpy(buf, &type, 4); - memcpy(&buf[4], data, len); - return write(control_channel, buf, len + 4); -} static void *signal_thread(void *arg) { @@ -308,8 +287,8 @@ int stp_main_loop(void) setvbuf(ofp, (char *)NULL, _IOLBF, 0); setup_main_signals(); - dbug(2, "in main loop\n"); + send_request(STP_READY, NULL, 0); /* handle messages from control channel */ |