Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/gpt In a NetBSD disklabel, p_offset is from the beginni...



details:   https://anonhg.NetBSD.org/src/rev/64f78810b0c3
branches:  trunk
changeset: 790810:64f78810b0c3
user:      jnemeth <jnemeth%NetBSD.org@localhost>
date:      Tue Oct 22 07:30:20 2013 +0000

description:
In a NetBSD disklabel, p_offset is from the beginning of the disk,
not the beginning of the NetBSD partition.

diffstat:

 sbin/gpt/migrate.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (23 lines):

diff -r 76f61468e115 -r 64f78810b0c3 sbin/gpt/migrate.c
--- a/sbin/gpt/migrate.c        Tue Oct 22 01:01:27 2013 +0000
+++ b/sbin/gpt/migrate.c        Tue Oct 22 07:30:20 2013 +0000
@@ -29,7 +29,7 @@
 __FBSDID("$FreeBSD: src/sbin/gpt/migrate.c,v 1.16 2005/09/01 02:42:52 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: migrate.c,v 1.10 2013/10/19 09:31:24 jnemeth Exp $");
+__RCSID("$NetBSD: migrate.c,v 1.11 2013/10/22 07:30:20 jnemeth Exp $");
 #endif
 
 #include <sys/types.h>
@@ -241,8 +241,8 @@
                ofs = (le32toh(dl->d_partitions[i].p_offset) *
                    le32toh(dl->d_secsize)) / secsz;
                ofs = (ofs > 0) ? ofs - rawofs : 0;
-               ent->ent_lba_start = htole64(start + ofs);
-               ent->ent_lba_end = htole64(start + ofs +
+               ent->ent_lba_start = htole64(ofs);
+               ent->ent_lba_end = htole64(ofs +
                    le32toh(dl->d_partitions[i].p_size) - 1LL);
                ent++;
        }



Home | Main Index | Thread Index | Old Index