From: David Smith Date: Thu, 24 Feb 2011 21:44:11 +0000 (-0600) Subject: Fixed PMID generation code to stay with the max limit. X-Git-Tag: release-1.5~200 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=5e0b2cdfad42fe8f185792671860fd6619b156f0;p=systemtap.git Fixed PMID generation code to stay with the max limit. * pcp/src/pmdas/logger/GNUmakefile.in: Instead of going up from 511, go down from 511 (since 511 is the max for a PMID). --- diff --git a/pcp/src/pmdas/logger/GNUmakefile.in b/pcp/src/pmdas/logger/GNUmakefile.in index 26a0d3744..381093b73 100644 --- a/pcp/src/pmdas/logger/GNUmakefile.in +++ b/pcp/src/pmdas/logger/GNUmakefile.in @@ -104,9 +104,10 @@ END { if (found == 0) { print "Warning: domain $(DOMAIN) not found in $(STDPMID_ if (found > 1) { print "Botch: multiple definitions for domain $(DOMAIN) found in $(STDPMID_PCP) or $(STDPMID_LOCAL)"; exit(-1) }\ }' $(STDPMID_PCP) $(STDPMID_LOCAL) # If we didn't find $(DOMAIN), find a free number and use it. -# Starting looking for a free number just past 511 (DYNAMIC_PMID). +# Starting looking for a free number at the end of the range - one +# less than 511 (DYNAMIC_PMID). @if ! $(GREP) -q $(DOMAIN) $@; then \ - num=512; \ + num=510; \ while true ; do \ if ! $(GREP) -q $$num $(STDPMID_PCP) $(STDPMID_LOCAL); then \ echo "Using generated $$num as domain $(DOMAIN) pmid"; \ @@ -116,7 +117,7 @@ END { if (found == 0) { print "Warning: domain $(DOMAIN) not found in $(STDPMID_ echo "#define $(DOMAIN) $$num" >> $@; \ break; \ fi; \ - num=`expr $$num + 1`; \ + num=`expr $$num - 1`; \ done; \ fi endif