Module Name: src
Committed By: uwe
Date: Thu May 12 22:08:55 UTC 2022
Modified Files:
src/usr.sbin/wsfontload: wsfontload.c
Log Message:
wsfontload: O_RDONLY is enough to list the fonts with -l
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/wsfontload/wsfontload.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/wsfontload/wsfontload.c
diff -u src/usr.sbin/wsfontload/wsfontload.c:1.23 src/usr.sbin/wsfontload/wsfontload.c:1.24
--- src/usr.sbin/wsfontload/wsfontload.c:1.23 Sat Apr 24 07:52:07 2021
+++ src/usr.sbin/wsfontload/wsfontload.c Thu May 12 22:08:55 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: wsfontload.c,v 1.23 2021/04/24 07:52:07 wiz Exp $ */
+/* $NetBSD: wsfontload.c,v 1.24 2022/05/12 22:08:55 uwe Exp $ */
/*
* Copyright (c) 1999
@@ -199,7 +199,7 @@ main(int argc, char **argv)
if (argc > 1)
usage();
- wsfd = open(wsdev, O_RDWR, 0);
+ wsfd = open(wsdev, listfonts ? O_RDONLY : O_RDWR, 0);
if (wsfd < 0)
err(2, "open ws-device %s", wsdev);