]> git.wh0rd.org - sysvinit.git/commitdiff
Make sure bootlogd findpty() returns an error value when it fails to
authorPetter Reinholdtsen <pere@hungry.com>
Sun, 22 Nov 2009 22:22:09 +0000 (22:22 +0000)
committerPetter Reinholdtsen <pere@hungry.com>
Sun, 22 Nov 2009 22:22:09 +0000 (22:22 +0000)
find a usable pty.  Patch from Rob Leslie via Debian.

git-svn-id: svn://svn.sv.gnu.org/sysvinit/sysvinit/trunk@22 456724a4-4300-0410-8514-c89748c515a2

doc/Changelog
src/bootlogd.c

index fc507c346bf77b2f8b224b0ed2ce0a2f569165cf..9a9c63caf762f8aef1e3976ff2c109e98085fd51 100644 (file)
@@ -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 <pere@hungry.com>  Sun, 12 Jul 2009 19:58:10 +0200
 
index 924f50292669f5ac43f9a157e94cf2d9c7ea2a10..e2eb4d8a68faf635e1f9e7329b8d290834a05928 100644 (file)
@@ -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);