Make sure bootlogd findpty() returns an error value when it fails to

find a usable pty.  Patch from Rob Leslie via Debian.
This commit is contained in:
Petter Reinholdtsen 2009-11-22 22:22:09 +00:00
parent 5b95f110af
commit 8debc401f8
2 changed files with 3 additions and 1 deletions

View File

@ -22,6 +22,8 @@ sysvinit (2.88dsf) UNRELEASED; urgency=low
* Rewrite findtty() in bootlogd to recursively search /dev/ for the * Rewrite findtty() in bootlogd to recursively search /dev/ for the
correct device, to handle terminal devices for example in /dev/pty/. correct device, to handle terminal devices for example in /dev/pty/.
Patch from Debian. 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 <pere@hungry.com> Sun, 12 Jul 2009 19:58:10 +0200 -- Petter Reinholdtsen <pere@hungry.com> Sun, 12 Jul 2009 19:58:10 +0200

View File

@ -198,7 +198,7 @@ int findpty(int *master, int *slave, char *name)
} }
if (found) break; if (found) break;
} }
if (found < 0) return -1; if (!found) return -1;
if (name) strcpy(name, tty); if (name) strcpy(name, tty);