From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it1-f195.google.com (mail-it1-f195.google.com [209.85.166.195]) by dpdk.org (Postfix) with ESMTP id 9780091 for ; Wed, 31 Oct 2018 16:46:57 +0100 (CET) Received: by mail-it1-f195.google.com with SMTP id k206-v6so18923999ite.0 for ; Wed, 31 Oct 2018 08:46:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qwilt-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=6q5oxCOxtMPbNlmQsXCmymuTddvCP69uGhsAku+UQd0=; b=vTx+hjrPPJBKEqEKDL8gfyXR4xQJPScXF2JksNcu53vVOJbrZa0Y1JuJ4ceSRfik6S jmd4aJOCagOWh5fpxJzqqsAr+UBD+SKCIl8sBDd+UmeZZCbZrdMnS1U4EjyQzklMEvFL zbInnkIzQoUQ88QgJTL69hs5+BBHmmJLBs80Ptk8I2T5rLYVnJb/U+z272P6nhtwJHyy LM+7GUKkUNtnwn4ZzOp1z61eUbq2MTVorX9LJTQpGEkktjk3oNWdqN55WXCg6REmpGPd FQvE+Hyl9RTHgu4iyy2sJgvCDayfevFx8P2FZlcp1D0wq4yb3m7FpuKczcIzbCYlUyrp K3jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=6q5oxCOxtMPbNlmQsXCmymuTddvCP69uGhsAku+UQd0=; b=p7L1R7NvtTddkQwyC1+xNVXy5RHN00zj6X8zAknsDb+WOja9SelRocb2G5C+78fc8m uzAZ4x/QQQibUm74dIsZsIwcIWyxg7i/tyNnsKtFshTa1FYRzd44FN2AyCx+UO39NNTJ w/J+tOwxFo1X/KIgadmcrAGmozhkSR/b3sMmjt4Ll9C7i8/PN0hoINNfSXcElQwAalwi Q2JREzorkXPi65mgxnfxg36wrUiGHTLmILhK/wo6vO7o4k9PwI/EMB9mlZIxXCNt89DZ BP8C5IxiMYay0M3NVKMkJWNfM/jwxbciFo7f7cz5ZadTKy1P73Q9ON7Pp+/EheRQKF4q T3bA== X-Gm-Message-State: AGRZ1gLTjTBXE6sea4rek37e8QVZ3VUkDRSES27FYAsiLkFPV5ipO4Ad dzTSyPD2n2cvpVIO+qdtGfgnYnLlxDgOn8tf4pDpGpSLXdk= X-Google-Smtp-Source: AJdET5f+PzOfF/ygpZm7ZZECxNxqKUYWKRnmp9F55P8qHuS1d+U2KTkF8iGx7ieCuPyWZ58KT0fwVLQWsGCLr6kqQhI= X-Received: by 2002:a24:220c:: with SMTP id o12-v6mr2204273ito.2.1541000816889; Wed, 31 Oct 2018 08:46:56 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:5502:0:0:0:0:0 with HTTP; Wed, 31 Oct 2018 08:46:56 -0700 (PDT) In-Reply-To: <20181031110548.31184-1-thomas@monjalon.net> References: <20181031110548.31184-1-thomas@monjalon.net> From: Arnon Warshavsky Date: Wed, 31 Oct 2018 17:46:56 +0200 Message-ID: To: Thomas Monjalon Cc: dev@dpdk.org, john.mcnamara@intel.com, marko.kovacevic@intel.com Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] devtools: check wrong svg include in patches X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2018 15:46:58 -0000 Hi Thomas Glad the function gets to be reused :) Now that it has more than one consumer apparently the function check_forbidden_additions() cannot be fed by stdin. I got it working with 3 changes: 1. call the awk script with $tmpinput as a parameter instead of stdin. This aligns with Neils changes from previous version 2. Escaped the spaces from the regex , as the awk script uses spaces to tell multiple forbidden expressions apart (which now I see sucks ...), and added an extra backslash 3. call the function with no parameters (not needed anymore) awk -v FOLDERS="lib drivers" \ -v EXPRESSIONS="rte_panic\\\( rte_exit\\\(" \ -v RET_ON_FAIL=1 \ - -f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk - + -f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk *$tmpinput* + + awk -v FOLDERS='doc' \ + -v EXPRESSIONS='*::[[:space:]]*[^[:space:]]*\\\.svg*' \ + -v RET_ON_FAIL=1 \ + -f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk *$tmpinput* ! $verbose || printf '\nChecking forbidden tokens additions:\n' - report=$(check_forbidden_additions *<"$tmpinput"*) + report=$(check_forbidden_additions) thanks /Arnon