summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorad <ad@NetBSD.org>2002-04-23 11:57:45 +0000
committerad <ad@NetBSD.org>2002-04-23 11:57:45 +0000
commitea92353d5883501cc9ee3d6e63c1911e3c978370 (patch)
treeba245fcdc875fa658f118c0e0c8b509d674db1f2 /sys/dev
parentcf06149dac0a4f7263cae74ecfeaa33ce8d981cd (diff)
MLX_GET_SYSDRIVE expects the unit number returned in *arg. Should fix PR
14116.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/mlx.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/ic/mlx.c b/sys/dev/ic/mlx.c
index dee337d716a..46d8371c915 100644
--- a/sys/dev/ic/mlx.c
+++ b/sys/dev/ic/mlx.c
@@ -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 @@ mlxioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
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);
}