[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tyndur-devel] [PATCH 1/7] init: init.h benutzen statt lokal deklarieren



* init: Wer Datenstrukturen einer Headerdatei benutzt, sollte diese
  Headerdatei auch einbinden anstatt Code zu duplizieren.

Signed-off-by: Kevin Wolf <kevin@xxxxxxxxxx>
---
 src/modules/include/init.h |    2 --
 src/modules/init/init.c    |    8 +-------
 2 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/src/modules/include/init.h b/src/modules/include/init.h
index aa18fd5..195511a 100644
--- a/src/modules/include/init.h
+++ b/src/modules/include/init.h
@@ -35,7 +35,6 @@
 
 extern void stdio_init(void);
 
-#ifndef MODULE_INIT
 
 void init_service_register(char* name);
 pid_t init_service_get(char* name);
@@ -45,7 +44,6 @@ void init_process_exit(int result);
 pid_t init_execute(const char* cmd);
 
 
-#endif //ifndef _INIT_H_
 
 
 #ifdef _USE_START_
diff --git a/src/modules/init/init.c b/src/modules/init/init.c
index 400175c..573bccd 100644
--- a/src/modules/init/init.c
+++ b/src/modules/init/init.c
@@ -49,6 +49,7 @@
 #include "dir.h"
 #include "sleep.h"
 #include "zlib.h"
+#include <init.h>
 
 #define ELF_MAGIC 0x464C457F
 #define PAGE_OFFSET(a) (a % 0x1000)
@@ -60,13 +61,6 @@
 
 int main(void) { return 0; }
 
-struct service_s
-{
-    pid_t   pid;
-    char*   name;
-};
-
-
 void rpc_service_register(pid_t pid, uint32_t correlation_id, size_t data_size, void* data);
 void rpc_service_get(pid_t pid, uint32_t correlation_id, size_t data_size, void* data);
 void rpc_service_get_name(pid_t pid, uint32_t correlation_id, size_t data_size, void* data);
-- 
1.6.0.2