Remove leading zeros from node id

This commit is contained in:
Antonio Lignan 2014-10-21 10:08:19 +02:00
parent 6b562237ff
commit e8c49dd29e

View file

@ -68,11 +68,11 @@ ifeq ($(HOST_OS),Darwin)
cut -f 2 -d ,) cut -f 2 -d ,)
CMOTES=$(MOTES) CMOTES=$(MOTES)
REFNUM = $(shell $(MOTELIST) -c 2>&- | \ REFNUM = $(shell $(MOTELIST) -c 2>&- | \
cut -f 1 -d , | tail -c5) cut -f 1 -d , | tail -c5 | sed 's/^0*//')
ifneq (,$(REFNUM)) ifneq (,$(REFNUM))
# No device fo-und # No device fo-und
ifeq (,$(findstring und, $(REFNUM))) ifeq (,$(findstring und, $(REFNUM)))
CFLAGS += -DSERIALNUM=$(REFNUM) CFLAGS += -DSERIALNUM=$(REFNUM:0%=%)
endif endif
endif endif
endif endif
@ -89,7 +89,7 @@ else
perl -ne 'print $$1 . " " if(m-(/dev/\w+)-);') perl -ne 'print $$1 . " " if(m-(/dev/\w+)-);')
CMOTES=$(MOTES) CMOTES=$(MOTES)
REFNUM = $(shell $(MOTELIST) -c 2>&- | \ REFNUM = $(shell $(MOTELIST) -c 2>&- | \
cut -f 1 -d , | tail -c5 ) cut -f 1 -d , | tail -c5 | sed 's/^0*//')
ifneq (,$(REFNUM)) ifneq (,$(REFNUM))
# No device fo-und # No device fo-und
ifeq (,$(findstring und, $(REFNUM))) ifeq (,$(findstring und, $(REFNUM)))