]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/sys-bsd.c
make establish_ppp and open_ppp_loopback return the correct fd
[ppp.git] / pppd / sys-bsd.c
index b830e01c3935851040b4a3ab96571639db2fa4ca..afb644eda8d17629c86befccdf8aef430798e384 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: sys-bsd.c,v 1.37 1999/03/16 02:57:06 paulus Exp $";
+static char rcsid[] = "$Id: sys-bsd.c,v 1.38 1999/03/16 22:53:47 paulus Exp $";
 /*     $NetBSD: sys-bsd.c,v 1.1.1.3 1997/09/26 18:53:04 christos Exp $ */
 #endif
 
@@ -202,7 +202,7 @@ file in the ppp-2.2 distribution.\n";
 /*
  * establish_ppp - Turn the serial port into a ppp interface.
  */
-void
+int
 establish_ppp(fd)
     int fd;
 {
@@ -265,6 +265,8 @@ establish_ppp(fd)
        || fcntl(fd, F_SETFL, initfdflags | O_NONBLOCK) == -1) {
        warn("Couldn't set device to non-blocking mode: %m");
     }
+
+    return fd;
 }
 
 /*
@@ -464,7 +466,7 @@ int fd, on;
  * packets in demand mode, and connect it to a ppp interface.
  * Here we use a pty.
  */
-void
+int
 open_ppp_loopback()
 {
     int flags;
@@ -512,6 +514,7 @@ open_ppp_loopback()
        }
     }
 
+    return loop_master;
 }