diff options
Diffstat (limited to 'runtime/staprun')
-rw-r--r-- | runtime/staprun/ChangeLog | 5 | ||||
-rw-r--r-- | runtime/staprun/staprun_funcs.c | 2 | ||||
-rw-r--r-- | runtime/staprun/symbols.c | 13 |
3 files changed, 10 insertions, 10 deletions
diff --git a/runtime/staprun/ChangeLog b/runtime/staprun/ChangeLog index 3f373863..53545db2 100644 --- a/runtime/staprun/ChangeLog +++ b/runtime/staprun/ChangeLog @@ -1,3 +1,8 @@ +2008-01-21 Martin Hunt <hunt@redhat.com> + + * symbols.c (send_module): Simplify and use new send_data() function to keep + longword alignment. + 2008-01-14 Martin Hunt <hunt@redhat.com> PR4037 and fixes to better synchronize staprun and stapio. diff --git a/runtime/staprun/staprun_funcs.c b/runtime/staprun/staprun_funcs.c index ebf05b34..d1bba3f8 100644 --- a/runtime/staprun/staprun_funcs.c +++ b/runtime/staprun/staprun_funcs.c @@ -16,8 +16,6 @@ #include <grp.h> #include <pwd.h> -void cleanup(int rc); - void setup_staprun_signals(void) { struct sigaction a; diff --git a/runtime/staprun/symbols.c b/runtime/staprun/symbols.c index 5a4855b3..e33ee624 100644 --- a/runtime/staprun/symbols.c +++ b/runtime/staprun/symbols.c @@ -12,9 +12,8 @@ #include "staprun.h" /* send symbol data */ -static int send_data(void *data, int len) +static int send_data(int32_t type, void *data, int len) { - int32_t type = STP_SYMBOLS; if (write(control_channel, &type, 4) <= 0) return -1; return write(control_channel, data, len); @@ -158,11 +157,9 @@ static int send_module (char *mname) { char data[65536]; int len; - *(int32_t *)data = STP_MODULE; - len = get_sections(mname, data + sizeof(int32_t), - sizeof(data) - sizeof(int32_t)); + len = get_sections(mname, data, sizeof(data)); if (len > 0) { - if (write(control_channel, data, len + sizeof(int32_t)) <= 0) { + if (send_data(STP_MODULE, data, len) < 0) { _err("Loading of module %s failed. Exiting...\n", mname); return -1; } @@ -296,11 +293,11 @@ int do_kernel_symbols(void) goto err; /* send syms */ - if (send_data(syms, num_syms*struct_symbol_size) < 0) + if (send_data(STP_SYMBOLS, syms, num_syms*struct_symbol_size) < 0) goto err; /* send data */ - if (send_data(data_base, dataptr-data_base) < 0) + if (send_data(STP_SYMBOLS, data_base, dataptr-data_base) < 0) goto err; free(data_base); |