summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorsepotvin <sepotvin@FreeBSD.org>2008-09-12 17:40:17 +0000
committersepotvin <sepotvin@FreeBSD.org>2008-09-12 17:40:17 +0000
commit6d5e175ceb85f51379f0ff7477ade6dc25e7e954 (patch)
treefa6049849ab9735b9c75084f246857df36936a8f /sys/dev
parent6ded760f17499dfd4b22eddbcccb63712cb9265a (diff)
downloadFreeBSD-src-6d5e175ceb85f51379f0ff7477ade6dc25e7e954.zip
FreeBSD-src-6d5e175ceb85f51379f0ff7477ade6dc25e7e954.tar.gz
Make mlxcontrol work with more than one system drive:
- When searching for the next system drive, return the next one instead of always returning the first one. - Plug fd lead and make sure that the MLX_NEXT_CHILD ioctl is called on the controller fd, not the disk's one. While there, fix a cut-n-pase error in a warning. Reviewed by: jhb Approved by: kan (mentor) MFC after: 1 month
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/mlx/mlx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c
index 76205e1..c7c7be7f 100644
--- a/sys/dev/mlx/mlx.c
+++ b/sys/dev/mlx/mlx.c
@@ -760,7 +760,7 @@ mlx_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int32_t flag, struct threa
if (sc->mlx_sysdrive[i].ms_disk != 0) {
/* looking for the next one we come across? */
if (*arg == -1) {
- *arg = device_get_unit(sc->mlx_sysdrive[0].ms_disk);
+ *arg = device_get_unit(sc->mlx_sysdrive[i].ms_disk);
return(0);
}
/* we want the one after this one */
OpenPOWER on IntegriCloud