cvs commit: ALFS/nALFS/src/handlers stage.c

kpfleming at linuxfromscratch.org kpfleming at linuxfromscratch.org
Sat Feb 7 21:23:59 PST 2004


kpfleming    04/02/07 22:23:59

  Modified:    nALFS/src handlers.c handlers.h
               nALFS/src/handlers stage.c
  Log:
  add HYTPE_STAGE to handler_type enum, for handlers that are <stage> or equivalents
  make alloc_base_dir* and alloc_stage_shell functions search for HTYPE_STAGE instead of hardcoded "stage" handler name
  
  Revision  Changes    Path
  1.15      +9 -3      ALFS/nALFS/src/handlers.c
  
  Index: handlers.c
  ===================================================================
  RCS file: /home/cvsroot/ALFS/nALFS/src/handlers.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- handlers.c	8 Feb 2004 05:12:35 -0000	1.14
  +++ handlers.c	8 Feb 2004 05:23:58 -0000	1.15
  @@ -359,7 +359,9 @@
   	}
   
   	for (s = el->parent; s; s = s->parent) {
  -		if (Is_element_name(s, "stage")) {
  +		if (!s->handler) continue;
  +
  +		if (s->handler->info->type & HTYPE_STAGE) {
   			element_s *sinfo;
   
   			if ((sinfo = first_param("stageinfo", s)) == NULL) {
  @@ -386,7 +388,9 @@
   	}
   
   	for (s = el->parent; s; s = s->parent) {
  -		if (Is_element_name(s, "stage")) {
  +		if (!s->handler) continue;
  +
  +		if (s->handler->info->type & HTYPE_STAGE) {
   			element_s *sinfo;
   
   			if ((sinfo = first_param("stageinfo", s)) == NULL) {
  @@ -408,7 +412,9 @@
   	char *shell = "sh";
   
   	for (s = el->parent; s; s = s->parent) {
  -		if (Is_element_name(s, "stage")) {
  +		if (!s->handler) continue;
  +
  +		if (s->handler->info->type & HTYPE_STAGE) {
   			element_s *sinfo;
   
   			if ((sinfo = first_param("stageinfo", s)) == NULL) {
  
  
  
  1.10      +1 -0      ALFS/nALFS/src/handlers.h
  
  Index: handlers.h
  ===================================================================
  RCS file: /home/cvsroot/ALFS/nALFS/src/handlers.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- handlers.h	8 Feb 2004 05:12:35 -0000	1.9
  +++ handlers.h	8 Feb 2004 05:23:59 -0000	1.10
  @@ -38,6 +38,7 @@
   	HTYPE_TRUE_RESULT = 16,	/* handler should be run for a true test */
   	HTYPE_FALSE_RESULT = 32,/* handler should be run for a false test */
   	HTYPE_EXECUTE = 64,
  +	HTYPE_STAGE = 128,      /* handler is a stage container */
   } handler_type_e;
   
   typedef enum handler_data_e {
  
  
  
  1.16      +7 -7      ALFS/nALFS/src/handlers/stage.c
  
  Index: stage.c
  ===================================================================
  RCS file: /home/cvsroot/ALFS/nALFS/src/handlers/stage.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- stage.c	6 Feb 2004 05:54:36 -0000	1.15
  +++ stage.c	8 Feb 2004 05:23:59 -0000	1.16
  @@ -474,7 +474,7 @@
   		.syntax_version = "3.0",
   		.parameters = stage_parameters,
   		.main = stage_main,
  -		.type = HTYPE_NORMAL,
  +		.type = HTYPE_NORMAL | HTYPE_STAGE,
   		.alloc_data = NULL,
   		.is_action = 0,
   		.priority = 0
  @@ -487,7 +487,7 @@
   		.syntax_version = "3.1",
   		.parameters = stage_parameters,
   		.main = stage_main,
  -		.type = HTYPE_NORMAL,
  +		.type = HTYPE_NORMAL | HTYPE_STAGE,
   		.alloc_data = NULL,
   		.is_action = 0,
   		.priority = 0
  @@ -498,7 +498,7 @@
   		.syntax_version = "3.1",
   		.parameters = stage_parameters,
   		.main = then_main,
  -		.type = HTYPE_TRUE_RESULT,
  +		.type = HTYPE_TRUE_RESULT | HTYPE_STAGE,
   		.alloc_data = NULL,
   		.is_action = 0,
   		.priority = 0
  @@ -509,7 +509,7 @@
   		.syntax_version = "3.1",
   		.parameters = stage_parameters,
   		.main = else_main,
  -		.type = HTYPE_FALSE_RESULT,
  +		.type = HTYPE_FALSE_RESULT | HTYPE_STAGE,
   		.alloc_data = NULL,
   		.is_action = 0,
   		.priority = 0
  @@ -522,7 +522,7 @@
   		.syntax_version = "3.2",
   		.parameters = stage_parameters,
   		.main = stage_main,
  -		.type = HTYPE_NORMAL,
  +		.type = HTYPE_NORMAL | HTYPE_STAGE,
   		.alloc_data = NULL,
   		.is_action = 0,
   		.priority = 0
  @@ -533,7 +533,7 @@
   		.syntax_version = "3.2",
   		.parameters = stage_parameters,
   		.main = then_main,
  -		.type = HTYPE_TRUE_RESULT,
  +		.type = HTYPE_TRUE_RESULT | HTYPE_STAGE,
   		.alloc_data = NULL,
   		.is_action = 0,
   		.priority = 0
  @@ -544,7 +544,7 @@
   		.syntax_version = "3.2",
   		.parameters = stage_parameters,
   		.main = else_main,
  -		.type = HTYPE_FALSE_RESULT,
  +		.type = HTYPE_FALSE_RESULT | HTYPE_STAGE,
   		.alloc_data = NULL,
   		.is_action = 0,
   		.priority = 0
  
  
  



More information about the alfs-log mailing list