Received: from list by lists.gnu.org with archive (Exim 4.71) id 1f43H1-0003LB-Ps for mharc-grub-devel@gnu.org; Thu, 05 Apr 2018 07:41:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f43Gz-0003IC-3R for grub-devel@gnu.org; Thu, 05 Apr 2018 07:41:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f43Gv-0007rg-Vz for grub-devel@gnu.org; Thu, 05 Apr 2018 07:41:45 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:47836) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f43Gv-0007me-JI for grub-devel@gnu.org; Thu, 05 Apr 2018 07:41:41 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w35BH2sG180523; Thu, 5 Apr 2018 11:41:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2017-10-26; bh=V4ldyL7eu7iQJj98wRlBRcv+wOZESUOd1ZwqrB28Eq0=; b=A4BS9pH08MRw9XbxePQMayHNOuO2RZFAwJ42M2BBjhQEKtnnkmuhrx8XUdpDll9pkWSX CUzqb6SLs8Y/JiU58g0jdyIl4O3cGbkwcthGzjNfXRuRcs92e+hSRvtKmARKWirzlMSi aBGByGAQqDLwguFrB9AshFEC642PD9OgEzrwJvNoqtkI5W9Ke9BnXCpcc0xrm3KpBkfD RrPHGng8inS0y0ZteA2/tbAtEZ3hnOmXhi99TBOPYNl80vwQYREk9IlOcOzkEheVK/fT VWS8njHM5nCWkh+82w3k4ccKmALm3tElrYIDBKknPHHNjZpF3CItTD4ZaDkWmrSVu4oS /Q== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2120.oracle.com with ESMTP id 2h5jsu835v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 05 Apr 2018 11:41:38 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w35Bfc5G002195 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 5 Apr 2018 11:41:38 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w35BfbU5017845; Thu, 5 Apr 2018 11:41:38 GMT Received: from olila.local.net-space.pl (/10.175.208.178) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 05 Apr 2018 04:41:37 -0700 Date: Thu, 5 Apr 2018 13:41:33 +0200 From: Daniel Kiper To: Hans de Goede Cc: grub-devel@gnu.org Subject: Re: [PATCH 1/4] Add new "version" command Message-ID: <20180405114133.GR26100@olila.local.net-space.pl> References: <20180328145028.21555-1-hdegoede@redhat.com> <20180328145028.21555-2-hdegoede@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180328145028.21555-2-hdegoede@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8853 signatures=668697 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1804050119 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 141.146.126.78 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Apr 2018 11:41:46 -0000 On Wed, Mar 28, 2018 at 04:50:25PM +0200, Hans de Goede wrote: > Add a new "version" command which prints the grub PACKAGE_STRING + > build time and date. This is useful to check if the expected version is > running, for e.g. trouble-shooting purposes. If you really need this I would consider setting some set of variables. Currently GRUB2 provides grub_cpu and grub_platform. So, why not set e.g. grub_version, grub_patchlevel, grub_sublevel and grub_extraversion (I have taken the names from Linux kernel but we can use anything else which make sense). This way you can get what you need using "set" command and scripts may use variables to identify GRUB2 version. Ahhh... What about grub_commit if it is available too? Daniel