svn commit: r221984 - head/sys/geom/part
Andrey V. Elsukov
ae at FreeBSD.org
Mon May 16 12:00:32 UTC 2011
Author: ae
Date: Mon May 16 12:00:32 2011
New Revision: 221984
URL: http://svn.freebsd.org/changeset/base/221984
Log:
Add diagnostic messages for integrity checks.
Modified:
head/sys/geom/part/g_part.c
Modified: head/sys/geom/part/g_part.c
==============================================================================
--- head/sys/geom/part/g_part.c Mon May 16 07:03:06 2011 (r221983)
+++ head/sys/geom/part/g_part.c Mon May 16 12:00:32 2011 (r221984)
@@ -245,6 +245,7 @@ g_part_check_integrity(struct g_part_tab
struct g_part_entry *e1, *e2;
struct g_provider *pp;
+ e1 = e2 = NULL;
pp = cp->provider;
if (table->gpt_first > table->gpt_last ||
table->gpt_last > pp->mediasize / pp->sectorsize - 1)
@@ -277,6 +278,25 @@ g_part_check_integrity(struct g_part_tab
fail:
printf("GEOM_PART: integrity check failed (%s, %s)\n", pp->name,
table->gpt_scheme->name);
+ if (bootverbose) {
+ if (e1 == NULL)
+ printf("GEOM_PART: invalid geom configuration:\n");
+ else if (e2 == NULL)
+ printf("GEOM_PART: invalid partition entry:\n");
+ else
+ printf("GEOM_PART: overlapped partition entries:\n");
+ if (e1 != NULL)
+ printf("GEOM_PART: index: %d, start: %jd, end: %jd\n",
+ e1->gpe_index,
+ (intmax_t)e1->gpe_start, (intmax_t)e1->gpe_end);
+ if (e2 != NULL)
+ printf("GEOM_PART: index: %d, start: %jd, end: %jd\n",
+ e2->gpe_index,
+ (intmax_t)e2->gpe_start, (intmax_t)e2->gpe_end);
+ printf("GEOM_PART: first: %jd, last: %jd, sectors: %jd\n",
+ (intmax_t)table->gpt_first, (intmax_t)table->gpt_last,
+ (intmax_t)pp->mediasize / pp->sectorsize - 1);
+ }
if (check_integrity == 0) {
table->gpt_corrupt = 1;
return (0);
More information about the svn-src-all
mailing list