summaryrefslogtreecommitdiffstats
path: root/sbin/startslip
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-03-31 22:51:00 +0000
committerbrian <brian@FreeBSD.org>1997-03-31 22:51:00 +0000
commitcb7f5ad55578fad7245152f0f9b7647830a53a2b (patch)
tree2c78d1ecaf1cdd58a514ff6e9ba36cc4bc7becdf /sbin/startslip
parent8871c2899e1277da4a3d19c3cbbc4d2fae060306 (diff)
downloadFreeBSD-src-cb7f5ad55578fad7245152f0f9b7647830a53a2b.zip
FreeBSD-src-cb7f5ad55578fad7245152f0f9b7647830a53a2b.tar.gz
Remove the syslog stuff, and allow various return values
in uu_lock(). Add uu_lockerr() for turning the results of uu_lock into something printable. Remove bogus section in man page about race conditions allowing both processes to get the lock. Include libutil.h and use uu_lock() correctly where it should. Suggested by: ache@freebsd.org
Diffstat (limited to 'sbin/startslip')
-rw-r--r--sbin/startslip/startslip.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sbin/startslip/startslip.c b/sbin/startslip/startslip.c
index 90d928c..60d97e0 100644
--- a/sbin/startslip/startslip.c
+++ b/sbin/startslip/startslip.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: startslip.c,v 1.22 1997/02/22 14:33:20 peter Exp $
+ * $Id: startslip.c,v 1.23 1997/03/29 03:33:08 imp Exp $
*/
#ifndef lint
@@ -60,6 +60,7 @@ static char sccsid[] = "@(#)startslip.c 8.1 (Berkeley) 6/5/93";
#include <termios.h>
#include <time.h>
#include <unistd.h>
+#include <libutil.h>
#include <netinet/in.h>
#include <net/if.h>
@@ -289,7 +290,10 @@ restart:
}
printd("open");
if (uucp_lock) {
- if (uu_lock(dvname)) {
+ int res;
+ if ((res = uu_lock(dvname)) != UU_LOCK_OK) {
+ if (res != UU_LOCK_INUSE)
+ syslog(LOG_ERR, "uu_lock: %s", uu_lockerr(res));
syslog(LOG_ERR, "%s: can't lock %s", username, devicename);
goto restart;
}
OpenPOWER on IntegriCloud