CVS commit: src/usr.sbin/screenblank
Module Name:src Committed By: sevan Date: Mon Apr 8 20:18:15 UTC 2019 Modified Files: src/usr.sbin/screenblank: screenblank.1 Log Message: Offer a potential workaround to the caveat. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/screenblank/screenblank.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/screenblank/screenblank.1 diff -u src/usr.sbin/screenblank/screenblank.1:1.17 src/usr.sbin/screenblank/screenblank.1:1.18 --- src/usr.sbin/screenblank/screenblank.1:1.17 Sat Dec 29 18:34:59 2018 +++ src/usr.sbin/screenblank/screenblank.1 Mon Apr 8 20:18:14 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: screenblank.1,v 1.17 2018/12/29 18:34:59 wiz Exp $ +.\" $NetBSD: screenblank.1,v 1.18 2019/04/08 20:18:14 sevan Exp $ .\" .\" Copyright (c) 1996-2002 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd December 28, 2018 +.Dd April 8, 2019 .Dt SCREENBLANK 1 .Os .Sh NAME @@ -125,3 +125,9 @@ If the devices are on a file system moun and/or .Cm nodevmtime options, it will not function as expected. +A possible workaround is to use a script as such: +.Bd -literal -offset indent +#!/bin/sh +/usr/sbin/screenblank -d 0 -e 0 && read +/usr/bin/pkill screenblank +.Ed
CVS commit: src/usr.sbin/screenblank
Module Name:src Committed By: wiz Date: Sat Dec 29 18:34:59 UTC 2018 Modified Files: src/usr.sbin/screenblank: screenblank.1 Log Message: New sentence, new line. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/screenblank/screenblank.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/screenblank/screenblank.1 diff -u src/usr.sbin/screenblank/screenblank.1:1.16 src/usr.sbin/screenblank/screenblank.1:1.17 --- src/usr.sbin/screenblank/screenblank.1:1.16 Fri Dec 28 23:53:35 2018 +++ src/usr.sbin/screenblank/screenblank.1 Sat Dec 29 18:34:59 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: screenblank.1,v 1.16 2018/12/28 23:53:35 gutteridge Exp $ +.\" $NetBSD: screenblank.1,v 1.17 2018/12/29 18:34:59 wiz Exp $ .\" .\" Copyright (c) 1996-2002 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -119,8 +119,8 @@ File containing the pid of .Sh CAVEATS .Nm checks the access and modification times of the devices it is -monitoring to determine activity. If the devices are on a file system -mounted with the +monitoring to determine activity. +If the devices are on a file system mounted with the .Cm noatime and/or .Cm nodevmtime
CVS commit: src/usr.sbin/screenblank
Module Name:src Committed By: gutteridge Date: Fri Dec 28 23:53:35 UTC 2018 Modified Files: src/usr.sbin/screenblank: screenblank.1 Log Message: Add caveats section to the screenblank(1) man page to note issues will arise if /dev is on a file system mounted with noatime or nodevmtime. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/screenblank/screenblank.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/screenblank/screenblank.1 diff -u src/usr.sbin/screenblank/screenblank.1:1.15 src/usr.sbin/screenblank/screenblank.1:1.16 --- src/usr.sbin/screenblank/screenblank.1:1.15 Wed Apr 30 13:11:02 2008 +++ src/usr.sbin/screenblank/screenblank.1 Fri Dec 28 23:53:35 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: screenblank.1,v 1.15 2008/04/30 13:11:02 martin Exp $ +.\" $NetBSD: screenblank.1,v 1.16 2018/12/28 23:53:35 gutteridge Exp $ .\" .\" Copyright (c) 1996-2002 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd September 23, 2006 +.Dd December 28, 2018 .Dt SCREENBLANK 1 .Os .Sh NAME @@ -116,3 +116,12 @@ The console device for wscons machines. File containing the pid of .Nm . .El +.Sh CAVEATS +.Nm +checks the access and modification times of the devices it is +monitoring to determine activity. If the devices are on a file system +mounted with the +.Cm noatime +and/or +.Cm nodevmtime +options, it will not function as expected.
CVS commit: src/usr.sbin/screenblank
Module Name:src Committed By: joerg Date: Tue Aug 30 20:33:31 UTC 2011 Modified Files: src/usr.sbin/screenblank: screenblank.c Log Message: static + __dead To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/usr.sbin/screenblank/screenblank.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/screenblank/screenblank.c diff -u src/usr.sbin/screenblank/screenblank.c:1.28 src/usr.sbin/screenblank/screenblank.c:1.29 --- src/usr.sbin/screenblank/screenblank.c:1.28 Mon Jul 21 13:36:59 2008 +++ src/usr.sbin/screenblank/screenblank.c Tue Aug 30 20:33:30 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: screenblank.c,v 1.28 2008/07/21 13:36:59 lukem Exp $ */ +/* $NetBSD: screenblank.c,v 1.29 2011/08/30 20:33:30 joerg Exp $ */ /*- * Copyright (c) 1996-2002 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ #ifndef lint __COPYRIGHT("@(#) Copyright (c) 1996-2002\ The NetBSD Foundation, Inc. All rights reserved."); -__RCSID("$NetBSD: screenblank.c,v 1.28 2008/07/21 13:36:59 lukem Exp $"); +__RCSID("$NetBSD: screenblank.c,v 1.29 2011/08/30 20:33:30 joerg Exp $"); #endif #include @@ -68,9 +68,9 @@ #include "pathnames.h" -u_long setvideo = WSDISPLAYIO_SVIDEO; /* "set video" ioctl */ -int videoon = WSDISPLAYIO_VIDEO_ON; /* value for "on" */ -int videooff = WSDISPLAYIO_VIDEO_OFF; /* value for "off" */ +static u_long setvideo = WSDISPLAYIO_SVIDEO; /* "set video" ioctl */ +static int videoon = WSDISPLAYIO_VIDEO_ON; /* value for "on" */ +static int videooff = WSDISPLAYIO_VIDEO_OFF; /* value for "off" */ struct dev_stat { LIST_ENTRY(dev_stat) ds_link; /* linked list */ @@ -79,15 +79,14 @@ time_t ds_atime; /* time device last accessed */ time_t ds_mtime; /* time device last modified */ }; -LIST_HEAD(ds_list, dev_stat) ds_list; +static LIST_HEAD(ds_list, dev_stat) ds_list; -int main(int, char *[]); static void add_dev(const char *, int); static void change_state(int); static void cvt_arg(char *, struct timespec *); -static void sighandler(int); +__dead static void sighandler(int); static int is_graphics_fb(struct dev_stat *); -static void usage(void); +__dead static void usage(void); int main(int argc, char *argv[])