From 56bae3425ce425d5f0424887caa77d95a88b9803 Mon Sep 17 00:00:00 2001 From: hunt Date: Sun, 18 Mar 2007 18:19:26 +0000 Subject: 2007-03-18 Martin Hunt * staprun.h (VERSION_CMD): Command to use for version check. Changes to support runtime decision on new or old transport. * mainloop.c (init_staprun): Check the kernel version at runtime instead of at compile time. (cleanup_and_exit): Call the correct relayfs close function. (stp_main_loop): Call the correct relayfs init function. * relay.c: Remove ifdef wrapper. File is always compiled and used if the kernel version is appropriate. * relay_old.c: Ditto. --- runtime/staprun/relay_old.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'runtime/staprun/relay_old.c') diff --git a/runtime/staprun/relay_old.c b/runtime/staprun/relay_old.c index e4ab5fe6..049d193a 100644 --- a/runtime/staprun/relay_old.c +++ b/runtime/staprun/relay_old.c @@ -12,9 +12,7 @@ */ #include "staprun.h" -#ifdef STP_OLD_TRANSPORT -int out_fd[NR_CPUS]; /* temporary per-cpu output written here for relayfs, filebase0...N */ static char *percpu_tmpfilebase = "stpd_cpu"; static int relay_fd[NR_CPUS]; @@ -53,7 +51,7 @@ static void close_relayfs_files(int cpu) /** * close_all_relayfs_files - close and munmap buffers and output files */ -void close_relayfs(void) +void close_oldrelayfs(void) { int i; @@ -212,7 +210,7 @@ static void *reader_thread(void *data) * * Returns 0 if successful, negative otherwise */ -int init_relayfs(struct _stp_msg_trans *t) +int init_oldrelayfs(struct _stp_msg_trans *t) { int i, j; struct statfs st; @@ -274,4 +272,3 @@ err: return -1; } -#endif /* STP_OLD_TRANSPORT */ -- cgit