]> sourceware.org Git - systemtap.git/commitdiff
Fixed PMID generation code to stay with the max limit.
authorDavid Smith <dsmith@redhat.com>
Thu, 24 Feb 2011 21:44:11 +0000 (15:44 -0600)
committerDavid Smith <dsmith@redhat.com>
Thu, 24 Feb 2011 21:44:11 +0000 (15:44 -0600)
* pcp/src/pmdas/logger/GNUmakefile.in: Instead of going up from 511, go
  down from 511 (since 511 is the max for a PMID).

pcp/src/pmdas/logger/GNUmakefile.in

index 26a0d37449ca5259ea8013253a97f78c158c6b2f..381093b73e99a7534f5c7b77c7f05983dbe305a1 100644 (file)
@@ -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
This page took 0.029209 seconds and 5 git commands to generate.