use aprint_*_dev and device_xname

This commit is contained in:
cegger 2008-04-05 18:54:10 +00:00
parent 4c5fa20d1f
commit 92e3ef7aaa

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_netbsdkintf.c,v 1.244 2008/03/21 21:54:59 ad Exp $ */
/* $NetBSD: rf_netbsdkintf.c,v 1.245 2008/04/05 18:54:10 cegger Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
* All rights reserved.
@ -146,7 +146,7 @@
***********************************************************/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.244 2008/03/21 21:54:59 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.245 2008/04/05 18:54:10 cegger Exp $");
#include <sys/param.h>
#include <sys/errno.h>
@ -521,8 +521,8 @@ rf_buildroothack(RF_ConfigSet_t *config_sets)
for (col = 0; col < raidPtrs[raidID]->numCol; col++) {
devname = raidPtrs[raidID]->Disks[col].devname;
devname += sizeof("/dev/") - 1;
if (strncmp(devname, booted_device->dv_xname,
strlen(booted_device->dv_xname)) != 0)
if (strncmp(devname, device_xname(booted_device),
strlen(device_xname(booted_device))) != 0)
continue;
#ifdef DEBUG
printf("raid%d includes boot device %s\n",
@ -2888,7 +2888,7 @@ rf_find_raid_components()
}
/* need to find the device_name_to_block_device_major stuff */
bmajor = devsw_name2blk(dv->dv_xname, NULL, 0);
bmajor = devsw_name2blk(device_xname(dv), NULL, 0);
/* get a vnode for the raw partition of this disk */
@ -2914,7 +2914,7 @@ rf_find_raid_components()
NOCRED);
if (error) {
printf("RAIDframe: can't get wedge info for "
"dev %s (%d)\n", dv->dv_xname, error);
"dev %s (%d)\n", device_xname(dv), error);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
VOP_CLOSE(vp, FREAD | FWRITE, NOCRED);
vput(vp);
@ -2929,7 +2929,7 @@ rf_find_raid_components()
}
ac_list = rf_get_component(ac_list, dev, vp,
dv->dv_xname, dkw.dkw_size);
device_xname(dv), dkw.dkw_size);
continue;
}
@ -2942,7 +2942,7 @@ rf_find_raid_components()
*/
if (error != ENOTTY)
printf("RAIDframe: can't get label for dev "
"%s (%d)\n", dv->dv_xname, error);
"%s (%d)\n", device_xname(dv), error);
}
/* don't need this any more. We'll allocate it again
@ -2972,7 +2972,7 @@ rf_find_raid_components()
continue;
}
snprintf(cname, sizeof(cname), "%s%c",
dv->dv_xname, 'a' + i);
device_xname(dv), 'a' + i);
ac_list = rf_get_component(ac_list, dev, vp, cname,
label.d_partitions[i].p_size);
}