Module Name:    src
Committed By:   cegger
Date:           Thu Dec 16 07:59:10 UTC 2010

Modified Files:
        src/sys/arch/i386/xbox: xboxfb.c

Log Message:
ioctl: KNF switch-case


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/i386/xbox/xboxfb.c

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

Modified files:

Index: src/sys/arch/i386/xbox/xboxfb.c
diff -u src/sys/arch/i386/xbox/xboxfb.c:1.13 src/sys/arch/i386/xbox/xboxfb.c:1.14
--- src/sys/arch/i386/xbox/xboxfb.c:1.13	Wed Apr 28 19:17:04 2010
+++ src/sys/arch/i386/xbox/xboxfb.c	Thu Dec 16 07:59:10 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: xboxfb.c,v 1.13 2010/04/28 19:17:04 dyoung Exp $	*/
+/*	$NetBSD: xboxfb.c,v 1.14 2010/12/16 07:59:10 cegger Exp $	*/
 
 /*
  * Copyright (c) 2007 Jared D. McNeill <jmcne...@invisible.ca>
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xboxfb.c,v 1.13 2010/04/28 19:17:04 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xboxfb.c,v 1.14 2010/12/16 07:59:10 cegger Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -244,40 +244,39 @@
 	struct vcons_screen *ms = vd->active;
 
 	switch (cmd) {
-		case WSDISPLAYIO_GTYPE:
-			*(u_int *)data = WSDISPLAY_TYPE_PCIMISC;
-			return 0;
-
-		case WSDISPLAYIO_GINFO:
-			wdf = (void *)data;
-			wdf->height = xboxfb_console_height;
-			wdf->width = xboxfb_console_width;
-			wdf->depth = ms->scr_ri.ri_depth;
-			wdf->cmsize = 256;
-			return 0;
-
-		case WSDISPLAYIO_GETCMAP:
-			return EINVAL;
-
-		case WSDISPLAYIO_PUTCMAP:
-			return EINVAL;
-
-		case WSDISPLAYIO_LINEBYTES:
-			*(u_int *)data = ms->scr_ri.ri_stride;
-			return 0;
-
-		case WSDISPLAYIO_SMODE:
-			{
-				int new_mode = *(int *)data;
-				if (new_mode != sc->sc_mode) {
-					sc->sc_mode = new_mode;
-					if (new_mode == WSDISPLAYIO_MODE_EMUL) {
-						xboxfb_clear_fb(sc);
-						vcons_redraw_screen(vd->active);
-					}
+	case WSDISPLAYIO_GTYPE:
+		*(u_int *)data = WSDISPLAY_TYPE_PCIMISC;
+		return 0;
+
+	case WSDISPLAYIO_GINFO:
+		wdf = (void *)data;
+		wdf->height = xboxfb_console_height;
+		wdf->width = xboxfb_console_width;
+		wdf->depth = ms->scr_ri.ri_depth;
+		wdf->cmsize = 256;
+		return 0;
+
+	case WSDISPLAYIO_GETCMAP:
+		return EINVAL;
+
+	case WSDISPLAYIO_PUTCMAP:
+		return EINVAL;
+
+	case WSDISPLAYIO_LINEBYTES:
+		*(u_int *)data = ms->scr_ri.ri_stride;
+		return 0;
+
+	case WSDISPLAYIO_SMODE: {
+			int new_mode = *(int *)data;
+			if (new_mode != sc->sc_mode) {
+				sc->sc_mode = new_mode;
+				if (new_mode == WSDISPLAYIO_MODE_EMUL) {
+					xboxfb_clear_fb(sc);
+					vcons_redraw_screen(vd->active);
 				}
 			}
-			return 0;
+		}
+		return 0;
 	}
 	return EPASSTHROUGH;
 }

Reply via email to