Hi,

If the prepare-kernel.sh script is executed with the --default option,
but no default patch can be found for the selected linux kernel
version, the script incorrectly tries to continue (and hangs executing
a malformed grep command)

If no default patch can be found, the $adeos_default_patch variable is
set /dev/null. This filename in this variable is later checked for
readability with 'test -r', which succeeds for /dev/null. This causes
the script to continue with an invalid patch, and subsequently hangs
on the following command:

adeos_version=`grep '^#define.*IPIPE_ARCH_STRING.*"' $asm_ipipe_h
2>/dev/null|head -n1|sed -e 's,.*"\(.*\)"$,\1,'`

where
asm_ipipe_h=`ls
$linux_tree/include/asm-{$linux_arch,$xenomai_arch}/ipipe.h
2>/dev/null|head -n1

But since the patch failed, $asm_ipipe_h is also empty, the grep
command translates to:
grep  ^#define.*IPIPE_ARCH_STRING.*"
so grep waits for input since no files are given, and the
prepare-kernel.sh script is effectively blocked (without useful
output).

Please find in attachment a patch that adds a check for /dev/null
instead of simply 'test -r', and adds some output in case no default
patch could be found.

Best regards,
Thomas

Attachment: xenomai-05-improve-output-of-prepare-kernel-script.patch
Description: Binary data

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to