diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/usr/errl/parser/makefile | 8 | ||||
| -rwxr-xr-x | src/usr/errl/parser/scanforsrcs.pl | 15 | 
2 files changed, 15 insertions, 8 deletions
| diff --git a/src/usr/errl/parser/makefile b/src/usr/errl/parser/makefile index dd9f132bf..e0307c629 100644 --- a/src/usr/errl/parser/makefile +++ b/src/usr/errl/parser/makefile @@ -49,9 +49,9 @@ CFLAGS:=-g -O0   -I $(ROOTPATH)/src/include/usr -I ${GENDIR}  all: gen_pass code_pass -gen_pass:  mkdirs  ${SRCPARSE_HEADER_TARGET}  ${GENDIR}/comps.C +gen_pass:  mkdirs  ${GENDIR}/comps.C -code_pass: ${IMGDIR}/errlparser +code_pass: ${SRCPARSE_HEADER_TARGET} ${IMGDIR}/errlparser  # errlparserbase and errlusrparser are plugins stuff, not errlparser.   # OBJFILES = ${OBJDIR}/errlparserbase.o	${OBJDIR}/errlusrparser.o @@ -63,7 +63,7 @@ mkdirs:  	mkdir -p ${GENDIR}  # Parse for error log tags in the Hostboot code, and generate hostBootSrcParse.H -${SRCPARSE_HEADER_TARGET} : +${SRCPARSE_HEADER_TARGET} ::  	./scanforsrcs.pl -b ${ROOTPATH} -o ${GENDIR}  ${GENDIR}/comps.C: ${ROOTPATH}/src/include/usr/hbotcompid.H @@ -72,7 +72,7 @@ ${GENDIR}/comps.C: ${ROOTPATH}/src/include/usr/hbotcompid.H  	sed 's/const compId_t \([A-Z0-9]*\)_COMP_ID[ =\t]*\(0[xX][0-9a-fA-F]*\).*/{ "\1", \2 },/' \  	> $@ -${OBJDIR}/errlparser.o: errlparser.C ${ROOTPATH}/src/include/usr/errl/hberrltypes.H ${GENDIR}/comps.C  +${OBJDIR}/errlparser.o: errlparser.C ${ROOTPATH}/src/include/usr/errl/hberrltypes.H ${GENDIR}/comps.C ${SRCPARSE_HEADER_TARGET}  	$(CC) -c  $(CFLAGS)  -o $@  $< diff --git a/src/usr/errl/parser/scanforsrcs.pl b/src/usr/errl/parser/scanforsrcs.pl index 6c187a848..4f6cb73da 100755 --- a/src/usr/errl/parser/scanforsrcs.pl +++ b/src/usr/errl/parser/scanforsrcs.pl @@ -238,11 +238,17 @@ $fh = openHeaderFile();  # Start writing the main header file that will be included by errlparser.C  startMainHeaderFile( $fh ); +my $found_dup = 0; +  # Write each case statement for printing  foreach my $key (sort(keys(%Comps)))  {      writePrintStatement( $fh, $key, \@{$Comps{$key}} );  } +if($found_dup > 0) +{ +    die( "ERROR! Duplicate hash found!\n" ); +}  # Finish writing the header  finishMainHeaderFile( $fh ); @@ -672,19 +678,20 @@ sub writePrintStatement          debugMsg( "Reason Code: $reasonCode" );          # If we've got a duplicate Module Id/Reason code go, on to the -        # next one.  We can't have duplicates, and its been asked that -        # we don't have compile errors because of it. +        # next one.  We can't have duplicates, so if we do we set found_dup +        # so that we can die after this loop          if( "$modId.$reasonCode" eq $caseHash{ $compName } )          {              debugMsg( "Hash exists, skip subsequent." ); -            # Print a warning message +            # Print a error message              print "\n#################################################################\n"; -            print "  WARNING - Duplicate hash found for:\n"; +            print "  ERROR - Duplicate hash found for:\n";              print "      component     $compName\n";              print "      module id     $modId\n";              print "      reason code   $reasonCode\n";              print "#################################################################\n"; +            $found_dup = 1;              next;          }          else | 

