diff options
| author | thorpej <thorpej@NetBSD.org> | 2006-03-28 17:32:20 +0000 |
|---|---|---|
| committer | thorpej <thorpej@NetBSD.org> | 2006-03-28 17:32:20 +0000 |
| commit | d717ea85c2362092cc30ae655b160d0c9cf47294 (patch) | |
| tree | 0168c30b5a98f3f9869ee49c5a6cc6cf0cd0e120 /sys/dev/raidframe | |
| parent | da6fcd553b825e80ad19c0bacde0ca2b574a2e64 (diff) | |
Use device_is_a() and device_unit().
Diffstat (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_netbsdkintf.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c index 37e3afb9b94..b61959ff4fd 100644 --- a/sys/dev/raidframe/rf_netbsdkintf.c +++ b/sys/dev/raidframe/rf_netbsdkintf.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.205 2006/03/25 13:15:41 rtr Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.206 2006/03/28 17:32:20 thorpej Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -146,7 +146,7 @@ ***********************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.205 2006/03/25 13:15:41 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.206 2006/03/28 17:32:20 thorpej Exp $"); #include <sys/param.h> #include <sys/errno.h> @@ -2605,21 +2605,22 @@ rf_find_raid_components() continue; /* we don't care about floppies... */ - if (!strcmp(dv->dv_cfdata->cf_name,"fd")) { + if (device_is_a(dv, "fd")) { continue; } /* we don't care about CD's... */ - if (!strcmp(dv->dv_cfdata->cf_name,"cd")) { + if (device_is_a(dv, "cd")) { continue; } /* hdfd is the Atari/Hades floppy driver */ - if (!strcmp(dv->dv_cfdata->cf_name,"hdfd")) { + if (device_is_a(dv, "hdfd")) { continue; } + /* fdisa is the Atari/Milan floppy driver */ - if (!strcmp(dv->dv_cfdata->cf_name,"fdisa")) { + if (device_is_a(dv, "fdisa")) { continue; } @@ -2628,7 +2629,7 @@ rf_find_raid_components() /* get a vnode for the raw partition of this disk */ - dev = MAKEDISKDEV(bmajor, dv->dv_unit, RAW_PART); + dev = MAKEDISKDEV(bmajor, device_unit(dv), RAW_PART); if (bdevvp(dev, &vp)) panic("RAID can't alloc vnode"); @@ -2667,7 +2668,7 @@ rf_find_raid_components() if (label.d_partitions[i].p_fstype != FS_RAID) continue; - dev = MAKEDISKDEV(bmajor, dv->dv_unit, i); + dev = MAKEDISKDEV(bmajor, device_unit(dv), i); if (bdevvp(dev, &vp)) panic("RAID can't alloc vnode"); |
