Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/wsfontload wsfontload: O_RDONLY is enough to list t...



details:   https://anonhg.NetBSD.org/src/rev/bc30a55cce15
branches:  trunk
changeset: 366061:bc30a55cce15
user:      uwe <uwe%NetBSD.org@localhost>
date:      Thu May 12 22:08:55 2022 +0000

description:
wsfontload: O_RDONLY is enough to list the fonts with -l

diffstat:

 usr.sbin/wsfontload/wsfontload.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r ffd733f01215 -r bc30a55cce15 usr.sbin/wsfontload/wsfontload.c
--- a/usr.sbin/wsfontload/wsfontload.c  Thu May 12 20:57:49 2022 +0000
+++ b/usr.sbin/wsfontload/wsfontload.c  Thu May 12 22:08:55 2022 +0000
@@ -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 @@
        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);
 



Home | Main Index | Thread Index | Old Index