Blame SOURCES/replace_obsolete_init_and_fini.patch

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