diff mbox

[3/3] kernelscan.sh: remove -E and -P phases to parsing

Message ID 1461750818-17590-4-git-send-email-colin.king@canonical.com
State Accepted
Headers show

Commit Message

Colin Ian King April 27, 2016, 9:53 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Just parse the input without the need to use the -E and -P phases

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/utilities/kernelscan.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alex Hung April 29, 2016, 8:39 a.m. UTC | #1
On 2016-04-27 05:53 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Just parse the input without the need to use the -E and -P phases
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/utilities/kernelscan.sh | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/utilities/kernelscan.sh b/src/utilities/kernelscan.sh
> index 63600eb..65aa436 100755
> --- a/src/utilities/kernelscan.sh
> +++ b/src/utilities/kernelscan.sh
> @@ -42,7 +42,7 @@ fi
>   scan_source_file()
>   {
>   	if [ -f $1 ]; then
> -		$KERNELSCAN < $1 -E | gcc -E $CONFIGS - | $KERNELSCAN -P > $TMP
> +		$KERNELSCAN -P < $1 > $TMP
>   		if [ $(stat -c%s $TMP) -gt 0 ]; then
>   			echo "Source: $1"
>   			cat $TMP
>


Acked-by: Alex Hung <alex.hung@canonical.com>
Ivan Hu April 29, 2016, 8:56 a.m. UTC | #2
On 04/27/2016 05:53 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Just parse the input without the need to use the -E and -P phases
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/utilities/kernelscan.sh | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/utilities/kernelscan.sh b/src/utilities/kernelscan.sh
> index 63600eb..65aa436 100755
> --- a/src/utilities/kernelscan.sh
> +++ b/src/utilities/kernelscan.sh
> @@ -42,7 +42,7 @@ fi
>   scan_source_file()
>   {
>   	if [ -f $1 ]; then
> -		$KERNELSCAN < $1 -E | gcc -E $CONFIGS - | $KERNELSCAN -P > $TMP
> +		$KERNELSCAN -P < $1 > $TMP
>   		if [ $(stat -c%s $TMP) -gt 0 ]; then
>   			echo "Source: $1"
>   			cat $TMP
Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff mbox

Patch

diff --git a/src/utilities/kernelscan.sh b/src/utilities/kernelscan.sh
index 63600eb..65aa436 100755
--- a/src/utilities/kernelscan.sh
+++ b/src/utilities/kernelscan.sh
@@ -42,7 +42,7 @@  fi
 scan_source_file()
 {
 	if [ -f $1 ]; then
-		$KERNELSCAN < $1 -E | gcc -E $CONFIGS - | $KERNELSCAN -P > $TMP
+		$KERNELSCAN -P < $1 > $TMP
 		if [ $(stat -c%s $TMP) -gt 0 ]; then
 			echo "Source: $1"
 			cat $TMP