Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Revert previous until I look at some issues regardi...
details: https://anonhg.NetBSD.org/src/rev/c1f40ef5a07e
branches: trunk
changeset: 546913:c1f40ef5a07e
user: fvdl <fvdl%NetBSD.org@localhost>
date: Thu May 08 20:36:12 2003 +0000
description:
Revert previous until I look at some issues regarding default labels.
diffstat:
sys/arch/amd64/amd64/disksubr.c | 10 +++++-----
sys/arch/i386/i386/disksubr.c | 12 ++++++------
2 files changed, 11 insertions(+), 11 deletions(-)
diffs (91 lines):
diff -r 22cdb4a54119 -r c1f40ef5a07e sys/arch/amd64/amd64/disksubr.c
--- a/sys/arch/amd64/amd64/disksubr.c Thu May 08 20:33:44 2003 +0000
+++ b/sys/arch/amd64/amd64/disksubr.c Thu May 08 20:36:12 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.3 2003/05/07 23:32:40 fvdl Exp $ */
+/* $NetBSD: disksubr.c,v 1.4 2003/05/08 20:36:49 fvdl Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -141,7 +141,7 @@
struct buf *bp;
struct disklabel *dlp;
char *msg = NULL;
- int dospartoff, cyl, i, *ip, found = 0;
+ int dospartoff, cyl, i, *ip;
/* minimal requirements for archtypal disk label */
if (lp->d_secsize == 0)
@@ -262,19 +262,19 @@
dlp <= (struct disklabel *)(bp->b_data + lp->d_secsize - sizeof(*dlp));
dlp = (struct disklabel *)((char *)dlp + sizeof(long))) {
if (dlp->d_magic != DISKMAGIC || dlp->d_magic2 != DISKMAGIC) {
- continue;
+ if (msg == NULL)
+ msg = "no disk label";
} else if (dlp->d_npartitions > MAXPARTITIONS ||
dkcksum(dlp) != 0)
msg = "disk label corrupted";
else {
*lp = *dlp;
msg = NULL;
- found = 1;
break;
}
}
- if (msg != NULL || found == 0)
+ if (msg)
goto done;
/* obtain bad sector table if requested and present */
diff -r 22cdb4a54119 -r c1f40ef5a07e sys/arch/i386/i386/disksubr.c
--- a/sys/arch/i386/i386/disksubr.c Thu May 08 20:33:44 2003 +0000
+++ b/sys/arch/i386/i386/disksubr.c Thu May 08 20:36:12 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.52 2003/05/07 23:32:54 fvdl Exp $ */
+/* $NetBSD: disksubr.c,v 1.53 2003/05/08 20:36:12 fvdl Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.52 2003/05/07 23:32:54 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.53 2003/05/08 20:36:12 fvdl Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -141,7 +141,7 @@
struct buf *bp;
struct disklabel *dlp;
char *msg = NULL;
- int dospartoff, cyl, i, *ip, found = 0;
+ int dospartoff, cyl, i, *ip;
/* minimal requirements for archtypal disk label */
if (lp->d_secsize == 0)
@@ -265,19 +265,19 @@
dlp <= (struct disklabel *)(bp->b_data + lp->d_secsize - sizeof(*dlp));
dlp = (struct disklabel *)((char *)dlp + sizeof(long))) {
if (dlp->d_magic != DISKMAGIC || dlp->d_magic2 != DISKMAGIC) {
- continue;
+ if (msg == NULL)
+ msg = "no disk label";
} else if (dlp->d_npartitions > MAXPARTITIONS ||
dkcksum(dlp) != 0)
msg = "disk label corrupted";
else {
*lp = *dlp;
msg = NULL;
- found = 1;
break;
}
}
- if (msg != NULL || found == 0)
+ if (msg)
goto done;
/* obtain bad sector table if requested and present */
Home |
Main Index |
Thread Index |
Old Index