From 3ab547365e08d79b236c282459c248a0dcfb07c2 Mon Sep 17 00:00:00 2001 From: Jason Wright Date: Fri, 16 Oct 1998 14:14:43 +0000 Subject: Die quietly if the open fails with ENXIO --- usr.sbin/screenblank/screenblank.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'usr.sbin/screenblank/screenblank.c') diff --git a/usr.sbin/screenblank/screenblank.c b/usr.sbin/screenblank/screenblank.c index fdf633ce8bc..4032608c2f6 100644 --- a/usr.sbin/screenblank/screenblank.c +++ b/usr.sbin/screenblank/screenblank.c @@ -1,4 +1,4 @@ -/* $OpenBSD: screenblank.c,v 1.5 1998/06/03 17:00:09 deraadt Exp $ */ +/* $OpenBSD: screenblank.c,v 1.6 1998/10/16 14:14:42 jason Exp $ */ /* $NetBSD: screenblank.c,v 1.2 1996/02/28 01:18:34 thorpej Exp $ */ /*- @@ -265,6 +265,8 @@ change_state(state) if (dsp->ds_isfb == 0) continue; if ((fd = open(dsp->ds_path, O_RDWR, 0)) < 0) { + if (errno == ENXIO) + exit(1); warn("open: %s", dsp->ds_path); continue; } -- cgit v1.2.3