Hi!
> > Normal error convention is 0 for success, -ERRNO for a problem. This
> > seems to use something different.
>
> The return value of this function is put into `abort_possible' which
> is used as a boolean in the rest of the code.
>
> abort_possible = splash.prepare_abort(&savedtrm, &newtrm);
>
> I could of course reverse the logic here in:
>
> prepare_abort {
> ret = tcgetattr(0, oldtrm)
>
> if (!ret) {
> ....
> ret = tcsetattr(0, TCSANOW, newtrm);
> }
>
> return ret;
> }
>
> ...
>
> abort_possible = !splash.prepare_abort(&savedtrm, &newtrm);
>
>
> Would that be better?
Yes.
> > > + printf(" aborted!\n");
> > > + return -EINTR;
> > > }
> >
> > Do we want to do something else than printf() in splash case here?
>
> Mayb. For now all printf are hidden by the splash screen.
> They only get a progress bar, that is what they asked for...
Ok, no problem.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures)
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Suspend-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/suspend-devel