__FUNCTION__ -> __func__
This commit is contained in:
parent
096f2d0ee4
commit
446e7b7d8c
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: disksubr.c,v 1.4 2007/02/22 05:31:53 thorpej Exp $ */
|
/* $NetBSD: disksubr.c,v 1.5 2007/06/29 16:41:31 tsutsui Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2004 The NetBSD Foundation, Inc.
|
* Copyright (c) 2004 The NetBSD Foundation, Inc.
|
||||||
@ -37,7 +37,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.4 2007/02/22 05:31:53 thorpej Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.5 2007/06/29 16:41:31 tsutsui Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
@ -71,7 +71,7 @@ readdisklabel(dev_t dev, void (*strategy)(struct buf *), struct disklabel *d,
|
|||||||
|
|
||||||
/* Read VTOC */
|
/* Read VTOC */
|
||||||
if (!pdinfo_sector(rwops, pdinfo) || !pdinfo_sanity(pdinfo)) {
|
if (!pdinfo_sector(rwops, pdinfo) || !pdinfo_sanity(pdinfo)) {
|
||||||
DPRINTF("%s: PDINFO not found.\n", __FUNCTION__);
|
DPRINTF("%s: PDINFO not found.\n", __func__);
|
||||||
} else if (vtoc_sector(rwops, vtoc, pdinfo->logical_sector) &&
|
} else if (vtoc_sector(rwops, vtoc, pdinfo->logical_sector) &&
|
||||||
vtoc_sanity(vtoc)) {
|
vtoc_sanity(vtoc)) {
|
||||||
vtoc_available = true;
|
vtoc_available = true;
|
||||||
@ -82,11 +82,10 @@ readdisklabel(dev_t dev, void (*strategy)(struct buf *), struct disklabel *d,
|
|||||||
disklabel_available = true;
|
disklabel_available = true;
|
||||||
memcpy(d, buf, sizeof(struct disklabel));
|
memcpy(d, buf, sizeof(struct disklabel));
|
||||||
} else {
|
} else {
|
||||||
DPRINTF("%s: no BSD disklabel.\n", __FUNCTION__);
|
DPRINTF("%s: no BSD disklabel.\n", __func__);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
DPRINTF("%s: PDINFO found, but VTOC not found.\n",
|
DPRINTF("%s: PDINFO found, but VTOC not found.\n", __func__);
|
||||||
__FUNCTION__);
|
|
||||||
}
|
}
|
||||||
sector_fini(rwops);
|
sector_fini(rwops);
|
||||||
|
|
||||||
@ -94,10 +93,10 @@ readdisklabel(dev_t dev, void (*strategy)(struct buf *), struct disklabel *d,
|
|||||||
if (!disklabel_available) {
|
if (!disklabel_available) {
|
||||||
if (vtoc_available) {
|
if (vtoc_available) {
|
||||||
DPRINTF("%s: creating disklabel from VTOC.\n",
|
DPRINTF("%s: creating disklabel from VTOC.\n",
|
||||||
__FUNCTION__);
|
__func__);
|
||||||
} else {
|
} else {
|
||||||
DPRINTF("%s: no VTOC. creating default disklabel.\n",
|
DPRINTF("%s: no VTOC. creating default disklabel.\n",
|
||||||
__FUNCTION__);
|
__func__);
|
||||||
vtoc_set_default(ux, d);
|
vtoc_set_default(ux, d);
|
||||||
}
|
}
|
||||||
disklabel_set_default(d);
|
disklabel_set_default(d);
|
||||||
@ -135,8 +134,7 @@ writedisklabel(dev_t dev, void (*strategy)(struct buf *), struct disklabel *d,
|
|||||||
|
|
||||||
/* 1. Update VTOC */
|
/* 1. Update VTOC */
|
||||||
disklabel_to_vtoc(ux, d);
|
disklabel_to_vtoc(ux, d);
|
||||||
DPRINTF("%s: logical_sector=%d\n", __FUNCTION__,
|
DPRINTF("%s: logical_sector=%d\n", __func__, ux->pdinfo.logical_sector);
|
||||||
ux->pdinfo.logical_sector);
|
|
||||||
|
|
||||||
if ((rwops = sector_init(dev, strategy)) == 0)
|
if ((rwops = sector_init(dev, strategy)) == 0)
|
||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
@ -152,7 +150,7 @@ writedisklabel(dev_t dev, void (*strategy)(struct buf *), struct disklabel *d,
|
|||||||
memset(buf, 0, sizeof buf);
|
memset(buf, 0, sizeof buf);
|
||||||
memcpy(buf, d, sizeof *d);
|
memcpy(buf, d, sizeof *d);
|
||||||
if (!sector_write(rwops, buf, LABELSECTOR)) {
|
if (!sector_write(rwops, buf, LABELSECTOR)) {
|
||||||
DPRINTF("%s: failed to write disklabel.\n", __FUNCTION__);
|
DPRINTF("%s: failed to write disklabel.\n", __func__);
|
||||||
err = EIO;
|
err = EIO;
|
||||||
}
|
}
|
||||||
sector_fini(rwops);
|
sector_fini(rwops);
|
||||||
|
Loading…
Reference in New Issue
Block a user