Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/shark/ofw cnattach functions should return zero on ...



details:   https://anonhg.NetBSD.org/src/rev/5acfd376199f
branches:  trunk
changeset: 574397:5acfd376199f
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sun Feb 27 18:24:49 2005 +0000

description:
cnattach functions should return zero on success, non-zero on failure.

diffstat:

 sys/arch/shark/ofw/vga_ofbus.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (39 lines):

diff -r 3bd7899a141f -r 5acfd376199f sys/arch/shark/ofw/vga_ofbus.c
--- a/sys/arch/shark/ofw/vga_ofbus.c    Sun Feb 27 15:37:33 2005 +0000
+++ b/sys/arch/shark/ofw/vga_ofbus.c    Sun Feb 27 18:24:49 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vga_ofbus.c,v 1.6 2005/01/09 15:29:27 tsutsui Exp $ */
+/* $NetBSD: vga_ofbus.c,v 1.7 2005/02/27 18:24:49 tsutsui Exp $ */
 
 /*
  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vga_ofbus.c,v 1.6 2005/01/09 15:29:27 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vga_ofbus.c,v 1.7 2005/02/27 18:24:49 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -110,17 +110,17 @@
        if ((chosen_phandle = OF_finddevice("/chosen")) == -1 ||
            OF_getprop(chosen_phandle, "stdout", &stdout_ihandle, 
            sizeof(stdout_ihandle)) != sizeof(stdout_ihandle)) {
-               return 0;
+               return ENXIO;
        }
        stdout_ihandle = of_decode_int((unsigned char *)&stdout_ihandle);
        if ((stdout_phandle = OF_instance_to_package(stdout_ihandle)) == -1 ||
            OF_getprop(stdout_phandle, "device_type", buf, sizeof(buf)) <= 0) {
-               return 0;
+               return ENXIO;
        }
 
        if (strcmp(buf, "display") != 0) {
                /* The display is not stdout device. */
-               return 0;
+               return ENXIO;
        }
                
        if (OF_call_method("text-mode3", stdout_ihandle, 0, 0) != 0) {



Home | Main Index | Thread Index | Old Index