32 lines
565 B
Diff
32 lines
565 B
Diff
--- crash-trace-command-2.0/trace.c.orig
|
|
+++ crash-trace-command-2.0/trace.c
|
|
@@ -1536,23 +1535,21 @@ static struct command_table_entry comman
|
|
|
|
static int ftrace_initialized;
|
|
|
|
-int _init(void)
|
|
+void __attribute__((constructor))
|
|
+trace_init(void)
|
|
{
|
|
if (ftrace_init() < 0)
|
|
- return 0;
|
|
+ return;
|
|
|
|
ftrace_initialized = 1;
|
|
register_extension(command_table);
|
|
-
|
|
- return 1;
|
|
}
|
|
|
|
-int _fini(void)
|
|
+void __attribute__((destructor))
|
|
+trace_fini(void)
|
|
{
|
|
if (ftrace_initialized)
|
|
ftrace_destroy();
|
|
-
|
|
- return 1;
|
|
}
|
|
|
|
#define TRACE_CMD_FILE_VERSION_STRING "6"
|