diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-06-05 09:12:26 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-06-05 09:12:26 +0000 |
commit | e0357a7a1d2047a7829f4d3dd82115eae985f9be (patch) | |
tree | ee90d6249f2281004a27cd2667020cb4fd46b9ab /sys/arch | |
parent | 41699147f01cb9fca7df6f0fb8f940ae2629b2c8 (diff) |
use the right accounting for bound edges (i think)
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sgi/sgi/disksubr.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/sgi/sgi/disksubr.c b/sys/arch/sgi/sgi/disksubr.c index 4be24dee9c4..481fa2df5fc 100644 --- a/sys/arch/sgi/sgi/disksubr.c +++ b/sys/arch/sgi/sgi/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.14 2009/06/04 21:13:02 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.15 2009/06/05 09:12:25 deraadt Exp $ */ /* * Copyright (c) 1999 Michael Shalayeff @@ -117,7 +117,7 @@ readsgilabel(struct buf *bp, void (*strat)(struct buf *), char *msg = NULL; int i, *p, cs = 0; int fsoffs = 0; - u_int fslen; + u_int fsend; int offset; if (partoffp) @@ -143,7 +143,7 @@ readsgilabel(struct buf *bp, void (*strat)(struct buf *), goto done; } fsoffs = dlp->partitions[0].first * (dlp->dp.dp_secbytes / DEV_BSIZE); - fslen = dlp->partitions[0].blocks * (dlp->dp.dp_secbytes / DEV_BSIZE); + fsend = fsoffs + dlp->partitions[0].blocks * (dlp->dp.dp_secbytes / DEV_BSIZE); /* * If the disklabel is about to be written to disk, don't modify it! @@ -191,8 +191,8 @@ readsgilabel(struct buf *bp, void (*strat)(struct buf *), } } - DL_GETBSTART(lp, fsoffs); - DL_GETBSIZE(lp, fsoffs + fslen); + DL_SETBSTART(lp, fsoffs); + DL_SETBEND(lp, fsend); lp->d_version = 1; lp->d_flags = D_VENDOR; lp->d_checksum = 0; @@ -212,7 +212,7 @@ finished: goto done; } - return checkdisklabel(bp->b_data + offset, lp, fsoffs, fsoffs + fslen); + return checkdisklabel(bp->b_data + offset, lp, fsoffs, fsend); done: return (msg); |