From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f180.google.com (mail-pf0-f180.google.com [209.85.192.180]) by dpdk.org (Postfix) with ESMTP id 194E32BF4 for ; Mon, 15 Jan 2018 23:20:42 +0100 (CET) Received: by mail-pf0-f180.google.com with SMTP id 23so8683318pfp.3 for ; Mon, 15 Jan 2018 14:20:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GtC2ahd95ZPG/BbVDOIHrOpHe9YhmlwZb6dq2w7O3r4=; b=ct3ECcUpCTOuuwNQ3z8x0oy1KWrA0KcxP54wqHcVlnMut2eUeeKEoQDMJLTe+SRkYG lpl1Gsqrrdn6Fdrs8M2KcfRGxVXKsjMVOm4ykC5ZQia0gi6iEO76jZwqKFzF4zS5U7DM o1jnN42el1lMJH5xCyxLOiesU4036D1oBoNNrosZTs36szd/XTIfhqn/HbK3hMp9uDlm JxtFR9LZn5PeqgMuOslkBV4ioawmqMiMww8/iR5zyDNoX0agXIy8IdIbYnxDiOsVhBBQ MrAUBGVK9wxnFRliXs+YXL9zFPUtRjKx1bzoBwWJGh2aID5OXhJgFH2DqGiwf90d2sci HgRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GtC2ahd95ZPG/BbVDOIHrOpHe9YhmlwZb6dq2w7O3r4=; b=JzrQQrIW17CCdnOJoKKg77V09yn+98f8i0byXVH8C4ZVDbzI/qymqTTzJSfCYYm2Jk Ad3IOq55L3nIngLjGRWmO/149ejWsDVzKl1IUX11ZW7oS3+3PHnU7Rt64rJUc0dHeJfF 5Mjv7tn07z42UVtByN4RS59B7DdGwbtBM2lZXsZzWkbN13mrHkKRhwu1CYaHPjivveq5 8G251vUxS5C2uIjWDpfbvvT/JsIn8dFqa170LIFoWxTu/BMlXibNRqezpFPL97RCCEek ICuwgl3ELohBXSXzlcmxlI5T4hKuIz5XpEmX8gd37xL/apk+yepL6TYAyKPl0iVdkPVn q0Tw== X-Gm-Message-State: AKwxytd1Zz0EM7ccUTsryFqpy6rwEDM52hDSvOnfpPT18kFjLIQgSL2P FN0DLzPzIo8PfPyrzxTDaCAcxQ== X-Google-Smtp-Source: ACJfBoszsysC+ew3pVMHVX615QUzSv7Wg/EvsVneeQd9Qp2khlV6JOKef8h5sXuzmDK3uDnBoI3WqQ== X-Received: by 10.101.78.207 with SMTP id w15mr5505520pgq.349.1516054841141; Mon, 15 Jan 2018 14:20:41 -0800 (PST) Received: from xeon-e3 (204-195-18-133.wavecable.com. [204.195.18.133]) by smtp.gmail.com with ESMTPSA id r84sm699485pfk.92.2018.01.15.14.20.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Jan 2018 14:20:41 -0800 (PST) Date: Mon, 15 Jan 2018 14:20:38 -0800 From: Stephen Hemminger To: Neil Horman Cc: dev@dpdk.org, thomas@monjalon.net, john.mcnamara@intel.com, bruce.richardson@intel.com, Ferruh Yigit Message-ID: <20180115142038.217d9a1e@xeon-e3> In-Reply-To: <20180115190545.25687-1-nhorman@tuxdriver.com> References: <20180115190545.25687-1-nhorman@tuxdriver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] checkpatches.sh: Add checks for ABI symbol addition 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: Mon, 15 Jan 2018 22:20:42 -0000 On Mon, 15 Jan 2018 14:05:45 -0500 Neil Horman wrote: > > +build_map_changes() > +{ > + local fname=$1 > + local mapdb=$2 > + > + cat $fname | filterdiff -i *.map | awk ' You don't need cat, use shell redirection same for later while loop. > + BEGIN {map="";sym="";ar="";sec=""; in_sec=0} > + /[-+] a\/.*\.map/ {map=$2} > + /+.*{/ {gsub("+","");sec=$1; in_sec=1} Add some whitespace and indentation to awk? > + /.*}/ {in_sec=0} > + /^+.*[^:*];/ {gsub(";","");sym=$2; > + if (in_sec == 1) { > + print map " " sym " " sec " add" > + } > + } > + /^-.*[^:*];/ {gsub(";","");sym=$2; > + if (in_sec == 1) { > + print map " " sym " " sec " del" > + } > + }' > ./$mapdb > + > + sort $mapdb | uniq > ./$mapdb.2 sort -u > + mv -f $mapdb.2 $mapdb > + > +} > +