]> sourceware.org Git - systemtap.git/commitdiff
Cleanup and better original transport support.
authorDavid Smith <dsmith@redhat.com>
Tue, 26 May 2009 19:08:57 +0000 (14:08 -0500)
committerDavid Smith <dsmith@redhat.com>
Tue, 26 May 2009 19:08:57 +0000 (14:08 -0500)
* 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/print.h
runtime/transport/transport.c
runtime/vsprintf.c

index d5c588a33c3b0799b8f254c9ab10005bbc542993..c2731a2f326ff734b7299248f15c6335c9612aad 100644 (file)
@@ -12,5 +12,6 @@
 
 static int _stp_print_init(void);
 static void _stp_print_cleanup(void);
+static void *_stp_reserve_bytes(int numbytes);
 
 #endif /* _STP_PRINT_H_ */
index ab0806f2b456b765ef47f5860e4b9f0614f3acdb..8425536a983e3c85e23dd4d588945f4fcd05f639 100644 (file)
@@ -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;
        }
 
index 674946b9dc26bb557f197171654b143111be5da0..5875d50983b56772ea2a8804f0b7b5d3bee4e336 100644 (file)
 #ifndef _VSPRINTF_C_
 #define _VSPRINTF_C_
 
+#include "print.h"
 #include "transport/transport.h"
 
-//forward declaration for _stp_vsnprintf
-static void * _stp_reserve_bytes (int);
-
 static int skip_atoi(const char **s)
 {
        int i=0;
This page took 0.03411 seconds and 5 git commands to generate.