Source-Changes-HG archive

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

[src/riastradh-drm2]: src/sys/external/bsd/drm2/drm Print a warning if the dr...



details:   https://anonhg.NetBSD.org/src/rev/ebf9fd44f5bd
branches:  riastradh-drm2
changeset: 788362:ebf9fd44f5bd
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Jul 24 03:26:02 2013 +0000

description:
Print a warning if the drm(4) unit number is >=64.

diffstat:

 sys/external/bsd/drm2/drm/drm_drv.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r b1caa4d24368 -r ebf9fd44f5bd sys/external/bsd/drm2/drm/drm_drv.c
--- a/sys/external/bsd/drm2/drm/drm_drv.c       Wed Jul 24 03:25:47 2013 +0000
+++ b/sys/external/bsd/drm2/drm/drm_drv.c       Wed Jul 24 03:26:02 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_drv.c,v 1.1.2.10 2013/07/24 03:23:00 riastradh Exp $       */
+/*     $NetBSD: drm_drv.c,v 1.1.2.11 2013/07/24 03:26:02 riastradh Exp $       */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.1.2.10 2013/07/24 03:23:00 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.1.2.11 2013/07/24 03:26:02 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -257,8 +257,10 @@
        KASSERT(dev->driver != NULL);
        KASSERT(device_unit(self) >= 0);
 
-       if (device_unit(self) >= 64) /* XXX Need to do something here!  */
+       if (device_unit(self) >= 64) { /* XXX Need to do something here!  */
+               aprint_error_dev(self, "can't handle >=64 drm devices!");
                return;
+       }
 
        for (i = 0; i < __arraycount(drm_minor_types); i++) {
                sc->sc_minor[i].index = (i * 64) + device_unit(self);



Home | Main Index | Thread Index | Old Index