All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brad Mouring <brad.mouring@ni.com>
To: Andrei Borzenkov <arvidjaar@gmail.com>
Cc: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [RFC][PATCH] cmd: test: Add bitwise AND, document the feature
Date: Mon, 17 Apr 2017 15:42:18 -0500	[thread overview]
Message-ID: <20170417204218.GA8217@zardoz.amer.corp.natinst.com> (raw)
In-Reply-To: <1fa967c5-e4ef-f911-9d67-8190cc5951b9@gmail.com>

On Thu, Apr 13, 2017 at 06:20:24AM +0300, Andrei Borzenkov wrote:
> 12.04.2017 21:10, Brad Mouring пишет:
> > 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.
> > 
> > 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).
> > 
> 
> See recent discussion about arithmetic operations. This could also be
> 
> if $((a&b)); then
>  ...
> fi
> 
> 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


      reply	other threads:[~2017-04-17 20:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-12 18:10 [RFC][PATCH] cmd: test: Add bitwise AND, document the feature Brad Mouring
2017-04-13  3:20 ` Andrei Borzenkov
2017-04-17 20:42   ` Brad Mouring [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170417204218.GA8217@zardoz.amer.corp.natinst.com \
    --to=brad.mouring@ni.com \
    --cc=arvidjaar@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.