Source-Changes-HG archive

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

[src/trunk]: src/sbin/newfs_lfs More corrections to newfs_lfs' handling of se...



details:   https://anonhg.NetBSD.org/src/rev/3b6b67b63f8f
branches:  trunk
changeset: 486316:3b6b67b63f8f
user:      perseant <perseant%NetBSD.org@localhost>
date:      Thu May 18 19:45:46 2000 +0000

description:
More corrections to newfs_lfs' handling of segment 0.

diffstat:

 sbin/newfs_lfs/lfs.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (35 lines):

diff -r b7cccfb1be39 -r 3b6b67b63f8f sbin/newfs_lfs/lfs.c
--- a/sbin/newfs_lfs/lfs.c      Thu May 18 17:55:17 2000 +0000
+++ b/sbin/newfs_lfs/lfs.c      Thu May 18 19:45:46 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs.c,v 1.10 2000/05/17 20:24:12 perseant Exp $        */
+/*     $NetBSD: lfs.c,v 1.11 2000/05/18 19:45:46 perseant Exp $        */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)lfs.c      8.5 (Berkeley) 5/24/95";
 #else
-__RCSID("$NetBSD: lfs.c,v 1.10 2000/05/17 20:24:12 perseant Exp $");
+__RCSID("$NetBSD: lfs.c,v 1.11 2000/05/18 19:45:46 perseant Exp $");
 #endif
 #endif /* not lint */
 
@@ -570,7 +570,7 @@
        off += dblksize(lfsp,dip,0);
 
        /* Write Superblock */
-       lfsp->lfs_offset = (off + lfsp->lfs_bsize) / lp->d_secsize;
+       lfsp->lfs_offset = off / lp->d_secsize;
        lfsp->lfs_cksum = lfs_sb_cksum(&(lfsp->lfs_dlfs));
        put(fd, (off_t)LFS_LABELPAD, &(lfsp->lfs_dlfs), sizeof(struct dlfs));
 
@@ -665,7 +665,6 @@
        free(dpagep);
 
        /* Now write the summary block for the next partial so it's invalid */
-       off += lfsp->lfs_bsize;
        sp->ss_sumsum =
            cksum(&sp->ss_datasum, LFS_SUMMARY_SIZE - sizeof(sp->ss_sumsum));
        put(fd, off, sp, LFS_SUMMARY_SIZE);



Home | Main Index | Thread Index | Old Index