diff --git a/doc/Changelog b/doc/Changelog index fc507c3..9a9c63c 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -22,6 +22,8 @@ sysvinit (2.88dsf) UNRELEASED; urgency=low * Rewrite findtty() in bootlogd to recursively search /dev/ for the correct device, to handle terminal devices for example in /dev/pty/. Patch from Debian. + * Make sure bootlogd findpty() returns an error value when it fails to + find a usable pty. Patch from Rob Leslie via Debian. -- Petter Reinholdtsen Sun, 12 Jul 2009 19:58:10 +0200 diff --git a/src/bootlogd.c b/src/bootlogd.c index 924f502..e2eb4d8 100644 --- a/src/bootlogd.c +++ b/src/bootlogd.c @@ -198,7 +198,7 @@ int findpty(int *master, int *slave, char *name) } if (found) break; } - if (found < 0) return -1; + if (!found) return -1; if (name) strcpy(name, tty);