[flashrom] [PATCH] remove exit call from show_id
David Hendricks
dhendrix at google.com
Wed May 30 21:24:20 CEST 2012
Seems trivial, and I think you're also helping to make sure memory alloc'd
in doit() gets free'd properly. So:
Acked-by: David Hendricks <dhendrix at google.com>
Thanks for doing this!
On Wed, May 30, 2012 at 11:21 AM, Niklas Söderlund <niso at kth.se> wrote:
> Sorry I forgot,
>
> Signed-off-by: Niklas Söderlund <niso at kth.se>
>
> On 05/30/2012 08:18 PM, Niklas Söderlund wrote:
>
> > The only caller is able to check the return code and handle it correctly
> > ---
> > flashrom.c | 5 ++++-
> > layout.c | 2 +-
> > 2 files changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/flashrom.c b/flashrom.c
> > index ec8137b..f6597e5 100644
> > --- a/flashrom.c
> > +++ b/flashrom.c
> > @@ -1781,7 +1781,10 @@ int doit(struct flashctx *flash, int force, const
> char *filename, int read_it,
> >
> > #if CONFIG_INTERNAL == 1
> > if (programmer == PROGRAMMER_INTERNAL)
> > - show_id(newcontents, size, force);
> > + if (show_id(newcontents, size, force)) {
> > + ret = 1;
> > + goto out;
> > + }
> > #endif
> > }
> >
> > diff --git a/layout.c b/layout.c
> > index 379ee8c..0512638 100644
> > --- a/layout.c
> > +++ b/layout.c
> > @@ -137,7 +137,7 @@ int show_id(uint8_t *bios, int size, int force)
> > "\n\n",
> > mainboard_vendor, mainboard_part,
> lb_vendor,
> > lb_part);
> > - exit(1);
> > + return 1;
> > }
> > }
> >
>
>
>
> _______________________________________________
> flashrom mailing list
> flashrom at flashrom.org
> http://www.flashrom.org/mailman/listinfo/flashrom
>
--
David Hendricks (dhendrix)
Systems Software Engineer, Google Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.flashrom.org/pipermail/flashrom/attachments/20120530/791748c2/attachment.html>
More information about the flashrom
mailing list