Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic MLX_GET_SYSDRIVE expects the unit number returned...



details:   https://anonhg.NetBSD.org/src/rev/1807ba68d271
branches:  trunk
changeset: 526012:1807ba68d271
user:      ad <ad%NetBSD.org@localhost>
date:      Tue Apr 23 11:57:45 2002 +0000

description:
MLX_GET_SYSDRIVE expects the unit number returned in *arg. Should fix PR
14116.

diffstat:

 sys/dev/ic/mlx.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r 7b7d404f0cc9 -r 1807ba68d271 sys/dev/ic/mlx.c
--- a/sys/dev/ic/mlx.c  Tue Apr 23 10:38:37 2002 +0000
+++ b/sys/dev/ic/mlx.c  Tue Apr 23 11:57:45 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mlx.c,v 1.15 2001/11/13 13:14:41 lukem Exp $   */
+/*     $NetBSD: mlx.c,v 1.16 2002/04/23 11:57:45 ad Exp $      */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mlx.c,v 1.15 2001/11/13 13:14:41 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mlx.c,v 1.16 2002/04/23 11:57:45 ad Exp $");
 
 #include "ld.h"
 
@@ -855,8 +855,10 @@
                for (i = 0; i < MLX_MAX_DRIVES; i++) {
                        ms = &mlx->mlx_sysdrive[i];
                        if (ms->ms_dv != NULL)
-                               if (ms->ms_dv->dv_xname[2] == '0' + *arg)
-                                       return (i);
+                               if (ms->ms_dv->dv_xname[2] == '0' + *arg) {
+                                       *arg = i;
+                                       return (0);
+                               }
                }
                return (ENOENT);
        }



Home | Main Index | Thread Index | Old Index