Hi!
> > > > Current implementation does not cleanup console settings if abort was
> > > > selected by user.
> > > > This should fix it.
> > >
> > > I prefer the appended patch.
> >
> > One of the key rules of procedural programming:
> > Don't write the same code at different places...
> > The same for memory pool size and termination handlers...
> > If someone will add a new initialization/cleanup to this function you
> > will end up
> > with the same bug again and again.
>
> Great theory.
>
> Still, your patch is _functionally_ wrong and mine is functionally correct.
>
> The appended one is probably nicer, though.
ACK and thanks.
Pavel
> Index: suspend/suspend.c
> ===================================================================
> --- suspend.orig/suspend.c
> +++ suspend/suspend.c
> @@ -510,7 +510,8 @@ static int save_image(struct swap_map_ha
> case ABORT_KEY_CODE:
> if (abort_possible) {
> printf(" aborted!\n");
> - return -EINTR;
> + error = -EINTR;
> + goto Exit;
> }
> break;
> case REBOOT_KEY_CODE:
> @@ -531,6 +532,7 @@ static int save_image(struct swap_map_ha
> if (!error)
> printf(" done (%u pages)\n", nr_pages);
>
> +Exit:
> if (abort_possible)
> splash.restore_abort(&savedtrm);
>
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures)
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Suspend-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/suspend-devel