diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2015-09-11 11:04:41 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2015-09-11 11:04:41 +0000 |
commit | d2a6843eb4c2e4660fcb4707b3fb7828a2ee2f93 (patch) | |
tree | 48580535d726b94c8e8833daf36831b62dbd3014 /sys | |
parent | 4f3e5ee30cc34b23ad86a7a84ace153a52ccab24 (diff) |
readgptlabel() is called from readdoslabel() so there is no need
for readgptlable() to re-check that the label d_secpercyl and
d_secsize are not 0.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/subr_disk.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index abe209b3d0d..361f886c94f 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_disk.c,v 1.207 2015/09/11 09:44:28 krw Exp $ */ +/* $OpenBSD: subr_disk.c,v 1.208 2015/09/11 11:04:40 krw Exp $ */ /* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */ /* @@ -700,11 +700,6 @@ readgptlabel(struct buf *bp, void (*strat)(struct buf *), uuid_dec_be(gpt_uuid_openbsd, &uuid_openbsd); - if (lp->d_secpercyl == 0) - return (EINVAL); /* invalid label */ - if (lp->d_secsize == 0) - return (ENOSPC); /* disk too small */ - for (sector = GPTSECTOR; ; sector = DL_GETDSIZE(lp)-1, altheader = 1) { uint32_t ghsize; uint32_t ghpartsize; |