Source-Changes-HG archive

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

[src/trunk]: src/sbin/wsconsctl fail on error, not on success.



details:   https://anonhg.NetBSD.org/src/rev/1e6ed54ba27f
branches:  trunk
changeset: 1023688:1e6ed54ba27f
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Wed Sep 22 14:15:29 2021 +0000

description:
fail on error, not on success.

diffstat:

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

diffs (18 lines):

diff -r 9def1be098eb -r 1e6ed54ba27f sbin/wsconsctl/keyboard.c
--- a/sbin/wsconsctl/keyboard.c Wed Sep 22 11:33:54 2021 +0000
+++ b/sbin/wsconsctl/keyboard.c Wed Sep 22 14:15:29 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: keyboard.c,v 1.11 2020/09/13 07:35:15 mlelstv Exp $ */
+/*     $NetBSD: keyboard.c,v 1.12 2021/09/22 14:15:29 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -200,7 +200,7 @@
 {
 
        if (field_by_value(&kbmode)->flags & FLG_SET) {
-               if (ioctl(fd, WSKBDIO_SETMODE, &kbmode) == 0)
+               if (ioctl(fd, WSKBDIO_SETMODE, &kbmode) < 0)
                        err(EXIT_FAILURE, "WSKBDIO_SETMODE");
                pr_field(field_by_value(&kbmode), " -> ");
        }



Home | Main Index | Thread Index | Old Index