Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2182308ybi; Thu, 20 Jun 2019 10:25:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxaB+06zlwwlJ1CQN7K4Ts7KXJeKYwYIpK2Kpau41Xgjdl10qxpxgbn4DlIypJ19AZVI4TO X-Received: by 2002:a62:6083:: with SMTP id u125mr4199756pfb.208.1561051510049; Thu, 20 Jun 2019 10:25:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561051510; cv=none; d=google.com; s=arc-20160816; b=g4FmFdLBiQ+OPh5f7AKxrqAgFfwU9KMsF7tBpfGFahlsjbdecIIqI7RTl4m5rczDMS dC5Rcmvdo6rhloM9Ua5UrsSU4uq+68q/DHtWONue6vmyn/VlfsljjxyG7BCsGkbbENx7 sv6I2RcpSCV2MFWoOOukN9jWPuEL+et5Xk1iHdO3jW2F+VvkuG1fU/Lhfp7bSWl3qrxD 4vGGgnVLxW5GRmGfOFzNDR+gdPZJ7ExJ1/TXe+rGP59OTPHryHXm7/hkKrV7OYddQLLo dF2dMunRZWCaW98ZX74u2kP/ozkUyUkonSuuImW79UfslhW5sTfEJclsO8Ep/+Db3ulR yVAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=586q93trGkcGISVFlxTu0MYtP/Zjkyx9dVxOsh9CY3I=; b=u1HgJ1ujqf9Teo73qCoGEEAizUY3wxaUBQnNLdIVX+Opxy+aa27LVcbpnPeqLvR94q l56Njsre/yZ5cH3Qz8jESvvC8hjlKCcWS00TN0RYpauFBYxlODKDjoYtuq3U4D+JDG85 zjrj0Fl0z7s6RP/9lI5hpVwli5SwzTZQeEMlAeLlNbK3lAH19wYRqRYcswUXAdbx0V1e VF0tMZBSxmeV8M42WXikbRpWhxbl2R4u4KjFDUu9t8pjJqG4wE5aVF4UtsDvRlsNsZFe wNzr1e+fGwcmFkFnc9ef2ckKooFOoEz/3AKtqJxA4/bXHOgy7mAw8SwxjlrVKtOHnNAh 5M9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=HvXDP2bz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t18si93345pfh.29.2019.06.20.10.24.55; Thu, 20 Jun 2019 10:25:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=HvXDP2bz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726703AbfFTRYR (ORCPT + 99 others); Thu, 20 Jun 2019 13:24:17 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:52578 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732166AbfFTRXT (ORCPT ); Thu, 20 Jun 2019 13:23:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=586q93trGkcGISVFlxTu0MYtP/Zjkyx9dVxOsh9CY3I=; b=HvXDP2bzaC9H2iftsZKuOSiOO0 dCcmrjehgibvlvWR2SQVybSQa1RkxRfNxp4LnpIMG2PApfnSFZbqxxslFU6gN/EbyEfum7Y6UZuZU Q1NJ7A6KUo7L8ffz+/bmAEvgQqWKqZTLf2qBNIWWM5SF7y68bft8jENFGsx7zxXMh8TJe5yMACVZE BgysKCDiK0oT/CE5/misbHNdIlb2mOGtQMwOCHaE1DrXpFpYywaG+fHVsi6O4DsEEvLynvApuBAyt YjmN5pKnXpejO7zVbkAInAZ1tvjvuMceMfg3zhPVaQPCwjonis0OYl2Acm9MGlrTt6YGByAG/Y/ok JF7fnqCw==; Received: from [177.97.20.138] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1he0mM-0008Rt-Dj; Thu, 20 Jun 2019 17:23:18 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.92) (envelope-from ) id 1he0mJ-0000DO-R5; Thu, 20 Jun 2019 14:23:15 -0300 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, Jonathan Corbet Subject: [PATCH v2 12/22] scripts/get_abi.pl: add a validate command Date: Thu, 20 Jun 2019 14:23:04 -0300 Message-Id: X-Mailer: git-send-email 2.21.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sometimes, we just want the parser to retrieve all symbols from ABI, in order to check for parsing errors. So, add a new "validate" command. While here, update the man/help pages. Signed-off-by: Mauro Carvalho Chehab --- scripts/get_abi.pl | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/scripts/get_abi.pl b/scripts/get_abi.pl index c5038a0a7313..774e9b809ead 100755 --- a/scripts/get_abi.pl +++ b/scripts/get_abi.pl @@ -25,7 +25,7 @@ pod2usage(2) if (scalar @ARGV < 1 || @ARGV > 2); my ($cmd, $arg) = @ARGV; -pod2usage(2) if ($cmd ne "search" && $cmd ne "rest"); +pod2usage(2) if ($cmd ne "search" && $cmd ne "rest" && $cmd ne "validate"); pod2usage(2) if ($cmd eq "search" && !$arg); require Data::Dumper if ($debug); @@ -82,7 +82,7 @@ sub parse_abi { my $sep = $2; my $content = $3; - if (!($new_tag =~ m/(what|date|kernelversion|contact|description|users)/)) { + if (!($new_tag =~ m/(what|where|date|kernelversion|contact|description|users)/)) { if ($tag eq "description") { # New "tag" is actually part of # description. Don't consider it a tag @@ -368,7 +368,7 @@ print STDERR Data::Dumper->Dump([\%data], [qw(*data)]) if ($debug); # if ($cmd eq "rest") { output_rest; -} else { +} elsif ($cmd eq "search") { search_symbols; } @@ -381,7 +381,7 @@ abi_book.pl - parse the Linux ABI files and produce a ReST book. =head1 SYNOPSIS -B [--debug] [] +B [--debug] [--man] [--help] [--dir=] [] Where can be: @@ -389,7 +389,9 @@ Where can be: B [SEARCH_REGEX] - search for [SEARCH_REGEX] inside ABI -B - output the ABI in ReST markup language +B - output the ABI in ReST markup language + +B - validate the ABI contents =back @@ -451,11 +453,11 @@ $ scripts/get_abi.pl rest --dir Documentation/ABI/obsolete =head1 BUGS -Report bugs to Mauro Carvalho Chehab +Report bugs to Mauro Carvalho Chehab =head1 COPYRIGHT -Copyright (c) 2016-2017 by Mauro Carvalho Chehab . +Copyright (c) 2016-2019 by Mauro Carvalho Chehab . License GPLv2: GNU GPL version 2 . -- 2.21.0