From b38d9a7d9219f6bc2ea04219d87575ab127bb32e Mon Sep 17 00:00:00 2001 From: hunt Date: Fri, 14 Sep 2007 16:11:12 +0000 Subject: 2007-09-14 Martin Hunt * ctl.c (init_ctl_channel): Return 1 if the ctl file opened was for the old relayfs transport. * mainloop.c (init_stapio): Don't call using_old_transport(). Use the return of init_ctl_channel() instead. (using_old_transport): Deleted. --- runtime/staprun/ctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'runtime/staprun/ctl.c') diff --git a/runtime/staprun/ctl.c b/runtime/staprun/ctl.c index 72592bdf..d0b07260 100644 --- a/runtime/staprun/ctl.c +++ b/runtime/staprun/ctl.c @@ -16,11 +16,13 @@ int init_ctl_channel(void) { char buf[PATH_MAX]; struct statfs st; + int old_transport = 0; if (statfs("/sys/kernel/debug", &st) == 0 && (int) st.f_type == (int) DEBUGFS_MAGIC) { if (sprintf_chk(buf, "/sys/kernel/debug/systemtap/%s/cmd", modname)) return -1; } else { + old_transport = 1; if (sprintf_chk(buf, "/proc/systemtap/%s/cmd", modname)) return -1; } @@ -34,7 +36,7 @@ int init_ctl_channel(void) perr("Couldn't open control channel '%s'", buf); return -1; } - return 0; + return old_transport; } void close_ctl_channel(void) -- cgit