Received: from list by lists.gnu.org with archive (Exim 4.71) id 1d0DTk-0005Zf-1Y for mharc-grub-devel@gnu.org; Mon, 17 Apr 2017 16:42:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37098) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0DTh-0005ZX-Ey for grub-devel@gnu.org; Mon, 17 Apr 2017 16:42:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d0DTe-0001Ol-2t for grub-devel@gnu.org; Mon, 17 Apr 2017 16:42:29 -0400 Received: from mx0a-00010702.pphosted.com ([148.163.156.75]:41184 helo=mx0b-00010702.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d0DTd-0001NK-Q0 for grub-devel@gnu.org; Mon, 17 Apr 2017 16:42:25 -0400 Received: from pps.filterd (m0098781.ppops.net [127.0.0.1]) by mx0a-00010702.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v3HKaDbJ019061; Mon, 17 Apr 2017 15:42:21 -0500 Received: from ni.com (skprod3.natinst.com [130.164.80.24]) by mx0a-00010702.pphosted.com with ESMTP id 29ufhvbwqn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 17 Apr 2017 15:42:20 -0500 Received: from us-aus-exhub1.ni.corp.natinst.com (us-aus-exhub1.ni.corp.natinst.com [130.164.68.41]) by us-aus-skprod3.natinst.com (8.16.0.17/8.16.0.17) with ESMTPS id v3HKgJwf009270 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 17 Apr 2017 15:42:19 -0500 Received: from us-aus-exch4.ni.corp.natinst.com (130.164.68.14) by us-aus-exhub1.ni.corp.natinst.com (130.164.68.41) with Microsoft SMTP Server (TLS) id 15.0.1156.6; Mon, 17 Apr 2017 15:42:19 -0500 Received: from us-aus-exhub2.ni.corp.natinst.com (130.164.68.32) by us-aus-exch4.ni.corp.natinst.com (130.164.68.14) with Microsoft SMTP Server (TLS) id 15.0.1156.6; Mon, 17 Apr 2017 15:42:18 -0500 Received: from ni.com (130.164.49.7) by us-aus-exhub2.ni.corp.natinst.com (130.164.68.32) with Microsoft SMTP Server id 15.0.1156.6 via Frontend Transport; Mon, 17 Apr 2017 15:42:18 -0500 Received: by ni.com (sSMTP sendmail emulation); Mon, 17 Apr 2017 15:42:18 -0500 Date: Mon, 17 Apr 2017 15:42:18 -0500 From: Brad Mouring To: Andrei Borzenkov CC: The development of GNU GRUB Subject: Re: [RFC][PATCH] cmd: test: Add bitwise AND, document the feature Message-ID: <20170417204218.GA8217@zardoz.amer.corp.natinst.com> References: <20170412181025.15643-1-brad.mouring@ni.com> <1fa967c5-e4ef-f911-9d67-8190cc5951b9@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: <1fa967c5-e4ef-f911-9d67-8190cc5951b9@gmail.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-04-17_18:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1704170182 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-04-17_18:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_policy_notspam policy=outbound_policy score=30 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=30 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1704170181 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-00010702.pphosted.com id v3HKaDbJ019061 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.75 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: Mon, 17 Apr 2017 20:42:30 -0000 On Thu, Apr 13, 2017 at 06:20:24AM +0300, Andrei Borzenkov wrote: > 12.04.2017 21:10, Brad Mouring =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > > Currently, there is not a good way to control script flow based on > > bitwise values. This initially led to NI adding the ability to read > > a specific bit from a port-mapped register to control bootflow. > >=20 > > Here, we add a more generic ability to test the bitwise AND of a > > value available to the grub scripting environment. This obviates the > > need for the inbit command (which is currently OOT). > >=20 >=20 > See recent discussion about arithmetic operations. This could also be >=20 > if $((a&b)); then > ... > fi >=20 > I think it is more generic than single specific test. I can appreciate the sentiment, but are you asking me to implement some/all of the functionality of the double-paren arith expansion, partially duplicating the functionality of the test/[ command, simply because (( a & b )) is more bash-ful than [ a -bwa b ]? I'm not trying to bake-in any sort of assumption here, in fact, I'm just trying to get clarification. Thanks, Brad