mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Ian Abbott <abbotti@mev.co.uk>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] commands: add ':' as alias for 'true'
Date: Wed, 17 May 2017 15:56:51 +0200	[thread overview]
Message-ID: <20170517135651.nj6xmqgml63kpkeq@pengutronix.de> (raw)
In-Reply-To: <20170517114649.26061-1-abbotti@mev.co.uk>

On Wed, May 17, 2017 at 12:46:49PM +0100, Ian Abbott wrote:
> ':' is the null command, sometimes used in shell scripts (especially
> after 'then'), but it is not yet supported by barebox.  It is supposed
> to do nothing, successfully, just like the 'true' command, so add it as
> an alias.
> 
> Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
> ---
>  commands/true.c | 3 +++
>  1 file changed, 3 insertions(+)

Not sure how useful this is, but it's trivial, so why not?
Applied, thanks

Sascha

> 
> diff --git a/commands/true.c b/commands/true.c
> index 24dea4692..b850f5165 100644
> --- a/commands/true.c
> +++ b/commands/true.c
> @@ -26,7 +26,10 @@ static int do_true(int argc, char *argv[])
>  	return 0;
>  }
>  
> +static const char *true_aliases[] = { ":", NULL};
> +
>  BAREBOX_CMD_START(true)
> +	.aliases	= true_aliases,
>  	.cmd		= do_true,
>  	BAREBOX_CMD_DESC("do nothing, successfully")
>  	BAREBOX_CMD_GROUP(CMD_GRP_SCRIPT)
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2017-05-17 13:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-17 11:46 Ian Abbott
2017-05-17 13:56 ` Sascha Hauer [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=20170517135651.nj6xmqgml63kpkeq@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=abbotti@mev.co.uk \
    --cc=barebox@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox