Module Name:    src
Committed By:   mlelstv
Date:           Wed Sep 22 14:15:29 UTC 2021

Modified Files:
        src/sbin/wsconsctl: keyboard.c

Log Message:
fail on error, not on success.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sbin/wsconsctl/keyboard.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/wsconsctl/keyboard.c
diff -u src/sbin/wsconsctl/keyboard.c:1.11 src/sbin/wsconsctl/keyboard.c:1.12
--- src/sbin/wsconsctl/keyboard.c:1.11	Sun Sep 13 07:35:15 2020
+++ src/sbin/wsconsctl/keyboard.c	Wed Sep 22 14:15:29 2021
@@ -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 @@ keyboard_put_values(int fd)
 {
 
 	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), " -> ");
 	}

Reply via email to