Hi!
> To be able to abort suspending while using splashy, we have to move the
> abort logic to the splashy struct so it can be overridden when
> libsplashy is used for splashy support.
>
> OK to commit?
Looks ok, but...:
> @@ -32,6 +34,33 @@
> printf(prompt);
> return getchar();
> }
> +static int prepare_abort(struct termios *oldtrm, struct termios *newtrm) {
Codingstyle: { goes on new line.
> + int ret;
> +
> + ret = !tcgetattr(0, oldtrm);
You are mixing tabs and spaces here. Fix it to use tabs.
> + if (ret) {
> + *newtrm = *oldtrm;
> + newtrm->c_cc[VMIN] = 0;
> + newtrm->c_cc[VTIME] = 1;
> + newtrm->c_iflag = IGNBRK | IGNPAR | ICRNL | IMAXBEL;
> + newtrm->c_lflag = 0;
> + ret = !tcsetattr(0, TCSANOW, newtrm);
> + }
> +
> + return ret;
> +}
Normal error convention is 0 for success, -ERRNO for a problem. This
seems to use something different.
> + if (abort_possible &&
> + splash.key_pressed(ABORT_KEY_CODE) ) {
And no space between ") )".
> + printf(" aborted!\n");
> + return -EINTR;
> }
Do we want to do something else than printf() in splash case here?
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