Fix wrong prom_getoption() return value checks
This commit is contained in:
parent
dee7f461a0
commit
2dfd1d809c
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ffb.c,v 1.27 2006/07/04 18:14:44 martin Exp $ */
|
||||
/* $NetBSD: ffb.c,v 1.28 2006/08/18 11:17:25 martin Exp $ */
|
||||
/* $OpenBSD: creator.c,v 1.20 2002/07/30 19:48:15 jason Exp $ */
|
||||
|
||||
/*
|
||||
@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ffb.c,v 1.27 2006/07/04 18:14:44 martin Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ffb.c,v 1.28 2006/08/18 11:17:25 martin Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
@ -178,7 +178,7 @@ ffb_attach(struct ffb_softc *sc)
|
||||
? strtoul(buf, NULL, 10)
|
||||
: 80;
|
||||
|
||||
maxrow = (prom_getoption("screen-#rows", buf, sizeof buf) != 0)
|
||||
maxrow = (prom_getoption("screen-#rows", buf, sizeof buf) == 0)
|
||||
? strtoul(buf, NULL, 10)
|
||||
: 34;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: zs.c,v 1.60 2006/03/28 23:22:08 thorpej Exp $ */
|
||||
/* $NetBSD: zs.c,v 1.61 2006/08/18 11:17:25 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
@ -45,7 +45,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.60 2006/03/28 23:22:08 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.61 2006/08/18 11:17:25 martin Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -799,7 +799,7 @@ zs_console_flags(int promunit, int node, int channel)
|
||||
/* Default to channel 0 if there are no explicit prom args */
|
||||
cookie = 0;
|
||||
if (node == prom_instance_to_package(prom_stdin())) {
|
||||
if (prom_getoption("input-device", buf, sizeof buf) != 0 &&
|
||||
if (prom_getoption("input-device", buf, sizeof buf) == 0 &&
|
||||
strcmp("ttyb", buf) == 0)
|
||||
cookie = 1;
|
||||
|
||||
@ -808,7 +808,7 @@ zs_console_flags(int promunit, int node, int channel)
|
||||
}
|
||||
|
||||
if (node == prom_instance_to_package(prom_stdout())) {
|
||||
if (prom_getoption("output-device", buf, sizeof buf) != 0 &&
|
||||
if (prom_getoption("output-device", buf, sizeof buf) == 0 &&
|
||||
strcmp("ttyb", buf) == 0)
|
||||
cookie = 1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user