[Initng-svn] r4385 - in initng/trunk: plugins/reload plugins/service_file

svn at initng.thinktux.net svn at initng.thinktux.net
Wed Jun 7 11:16:06 CEST 2006


Author: jimmy
Date: Wed Jun  7 11:16:04 2006
New Revision: 4385

Modified:
   initng/trunk/plugins/reload/initng_reload.c
   initng/trunk/plugins/service_file/initng_service_file.c
   initng/trunk/src/initng_process_db.c
   initng/trunk/src/initng_process_db.h

Log:
Cleanup pipe() code.


Modified: initng/trunk/plugins/reload/initng_reload.c
==============================================================================
--- initng/trunk/plugins/reload/initng_reload.c	(original)
+++ initng/trunk/plugins/reload/initng_reload.c	Wed Jun  7 11:16:04 2006
@@ -233,7 +233,6 @@
 					op->pipe[0] = entry.process[pnr].stdout1;
 					op->pipe[1] = entry.process[pnr].stdout2;
 					op->dir = BUFFERED_OUT_PIPE;
-					op->pipet = PIPE_STDOUT;
 					op->targets[0] = 1;
 					op->targets[1] = 2;
 					add_pipe(op, process);

Modified: initng/trunk/plugins/service_file/initng_service_file.c
==============================================================================
--- initng/trunk/plugins/service_file/initng_service_file.c	(original)
+++ initng/trunk/plugins/service_file/initng_service_file.c	Wed Jun  7 11:16:04 2006
@@ -761,7 +761,7 @@
 	add_process(process, new_active);
 
 	/* create and unidirectional pipe */
-	current_pipe = pipe_new(PIPE_CTRL_IN, IN_AND_OUT_PIPE);
+	current_pipe = pipe_new(IN_AND_OUT_PIPE);
 	if (current_pipe)
 	{
 		/* we want this pipe to get fd 3, in the fork */

Modified: initng/trunk/src/initng_process_db.c
==============================================================================
--- initng/trunk/src/initng_process_db.c	(original)
+++ initng/trunk/src/initng_process_db.c	Wed Jun  7 11:16:04 2006
@@ -40,7 +40,7 @@
  * This function creates a new pipe, and creates a new
  * pipe struct entry.
  */
-pipe_h *pipe_new(e_pipet type, e_dir dir)
+pipe_h *pipe_new(e_dir dir)
 {
 	pipe_h *pipe_struct = i_calloc(1, sizeof(pipe_h));
 
@@ -48,7 +48,6 @@
 		return (NULL);
 
 	/* set the type */
-	pipe_struct->pipet = type;
 	pipe_struct->dir = dir;
 
 	/* return the pointer */
@@ -84,7 +83,7 @@
 	INIT_LIST_HEAD(&new_p->pipes.list);
 
 	/* create the output pipe */
-	current_pipe = pipe_new(PIPE_STDOUT, BUFFERED_OUT_PIPE);
+	current_pipe = pipe_new(BUFFERED_OUT_PIPE);
 	if (!current_pipe)
 	{
 		free(new_p);

Modified: initng/trunk/src/initng_process_db.h
==============================================================================
--- initng/trunk/src/initng_process_db.h	(original)
+++ initng/trunk/src/initng_process_db.h	Wed Jun  7 11:16:04 2006
@@ -44,16 +44,6 @@
 	P_FREE = 1,
 } e_pst;
 
-/* the types that can be set to a pipe list */
-typedef enum
-{
-	PIPE_UNKNOWN = 0,
-	PIPE_STDOUT = 1,
-	PIPE_STDIN = 2,
-	PIPE_CTRL_OUT = 3,
-	PIPE_CTRL_IN = 4,
-} e_pipet;
-
 typedef enum
 {
 	UNKNOWN_PIPE = 0,
@@ -69,9 +59,6 @@
 	/* this array contains the pipe fds */
 	int pipe[2];
 
-	/* Whats this type?, this will be a pointer to a struct in the future */
-	e_pipet pipet;
-
 	/* The direction of the stream, an OUTPUT or INPUT ?? */
 	e_dir dir;
 
@@ -148,7 +135,7 @@
 #define add_process(pss, sss) list_add(&(pss)->list, &(sss)->processes.list);
 
 /* used for browing pipes */
-pipe_h *pipe_new(e_pipet type, e_dir dir);
+pipe_h *pipe_new(e_dir dir);
 
 #define add_pipe(PIPE, PROCESS) list_add(&(PIPE)->list, &(PROCESS)->pipes.list);
 #define while_pipes(CURRENT, PROCESS) list_for_each_entry_prev(CURRENT, &(PROCESS)->pipes.list, list)


More information about the Initng-svn mailing list