mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: barebox@lists.infradead.org, lst@pengutronix.de
Subject: Re: [PATCH] scripts/rsatoc: fix printing of error message, if environment variable doen't contain a path
Date: Mon, 3 Aug 2020 21:18:29 +0200	[thread overview]
Message-ID: <20200803191829.GD31536@pengutronix.de> (raw)
In-Reply-To: <20200729111240.24702-1-mkl@pengutronix.de>

On Wed, Jul 29, 2020 at 01:12:40PM +0200, Marc Kleine-Budde wrote:
> Fixes: 128ad3cbe043 ("scripts: Add rsatoc tool")
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> ---
>  scripts/rsatoc.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

Applied to master, thanks

Sascha

> 
> diff --git a/scripts/rsatoc.c b/scripts/rsatoc.c
> index 647380214092..9410f33a654f 100644
> --- a/scripts/rsatoc.c
> +++ b/scripts/rsatoc.c
> @@ -471,10 +471,12 @@ int main(int argc, char *argv[])
>  		path++;
>  
>  		if (!strncmp(path, "__ENV__", 7)) {
> -			path = getenv(path + 7);
> +			const char *orig_path = path;
> +			
> +			path = getenv(orig_path + 7);
>  			if (!path) {
>  				fprintf(stderr, "%s doesn't contain a path\n",
> -					path + 7);
> +					orig_path + 7);
>  				exit(1);
>  			}
>  		}
> -- 
> 2.20.1
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
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:[~2020-08-03 19:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29 11:12 Marc Kleine-Budde
2020-08-03 19:18 ` 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=20200803191829.GD31536@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=lst@pengutronix.de \
    --cc=mkl@pengutronix.de \
    /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