From a655ff03c59722c229a40909d0de9e3dfe63483e Mon Sep 17 00:00:00 2001 From: David Smith Date: Tue, 26 May 2009 14:08:57 -0500 Subject: Cleanup and better original transport support. * runtime/print.h: Moved _stp_reserve_bytes() prototype here. * runtime/vsprintf.c (_stp_vsnprintf): Includes print.h to get _stp_reserve_bytes() prototype. * runtime/transport/transport.c (_stp_remove_root_dir): Better cleanup for STP_TRANSPORT_VERSION == 1. (_stp_transport_fs_close): Ditto. --- runtime/transport/transport.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'runtime/transport/transport.c') diff --git a/runtime/transport/transport.c b/runtime/transport/transport.c index ab0806f2..8425536a 100644 --- a/runtime/transport/transport.c +++ b/runtime/transport/transport.c @@ -470,8 +470,13 @@ static void _stp_remove_root_dir(void) errk("Unable to lock transport directory.\n"); return; } - if (simple_empty(__stp_root_dir)) + if (simple_empty(__stp_root_dir)) { +#if STP_TRANSPORT_VERSION == 1 + relayfs_remove_dir(__stp_root_dir); +#else debugfs_remove(__stp_root_dir); +#endif + } _stp_unlock_transport_dir(); __stp_root_dir = NULL; } @@ -529,7 +534,11 @@ static void _stp_transport_fs_close(void) _stp_transport_data_fs_close(); if (__stp_module_dir) { +#if STP_TRANSPORT_VERSION == 1 + relayfs_remove_dir(__stp_module_dir); +#else debugfs_remove(__stp_module_dir); +#endif __stp_module_dir = NULL; } -- cgit