mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen: fix unspecified behavior in tr invocation
The result of the command is undefined according to the specification if
the "string2" argument in tr is shorter than "string1". GNU tr behaves
correctly by extending "string2" to repeat the last character.
Fixes: eb61a4fb14 ("xen: fix header guard generation for asm-generic headers")
Reported-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
448826d95d
commit
09a338ae72
1 file changed
+1
-1
@@ -34,7 +34,7 @@ unwanted := $(filter-out $(generic-y) $(generated-y),$(old-headers))
|
||||
quiet_cmd_wrap = WRAP $@
|
||||
cmd_wrap = \
|
||||
arch=$$(echo $@ | sed -n 's:.*arch/\([^/]*\)/.*:\1:p' | tr a-z A-Z); \
|
||||
upper=$$(echo $*.h | tr a-z A-Z | tr '/.-' '__'); \
|
||||
upper=$$(echo $*.h | tr a-z A-Z | tr '/.-' '___'); \
|
||||
echo "\#ifndef $${arch}_GENERIC_$${upper}" > $@.new; \
|
||||
echo "\#define $${arch}_GENERIC_$${upper}" >> $@.new; \
|
||||
echo "\#include <asm-generic/$*.h>" >> $@.new; \
|
||||
|
||||