Use VFS_PROTOS() for lfs.
Rename conflicting struct lfs field "lfs_start" to "lfs_s0addr". No functional change.
This commit is contained in:
parent
c4fd6408ee
commit
c063d4ccd5
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: lfs.c,v 1.44 2015/03/29 19:35:58 chopps Exp $ */
|
||||
/* $NetBSD: lfs.c,v 1.45 2015/05/31 15:44:30 hannken Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
|
@ -528,7 +528,7 @@ lfs_init(int devfd, daddr_t sblkno, daddr_t idaddr, int dummy_read, int debug)
|
|||
if (fs->lfs_version < 2) {
|
||||
fs->lfs_sumsize = LFS_V1_SUMMARY_SIZE;
|
||||
fs->lfs_ibsize = fs->lfs_bsize;
|
||||
fs->lfs_start = fs->lfs_sboffs[0];
|
||||
fs->lfs_s0addr = fs->lfs_sboffs[0];
|
||||
fs->lfs_tstamp = fs->lfs_otstamp;
|
||||
fs->lfs_fsbtodb = 0;
|
||||
}
|
||||
|
@ -586,7 +586,7 @@ try_verify(struct lfs *osb, struct uvnode *devvp, ulfs_daddr_t goal, int debug)
|
|||
* Don't mistakenly read a superblock, if there is one here.
|
||||
*/
|
||||
if (lfs_sntod(osb, lfs_dtosn(osb, daddr)) == daddr) {
|
||||
if (daddr == osb->lfs_start)
|
||||
if (daddr == osb->lfs_s0addr)
|
||||
daddr += lfs_btofsb(osb, LFS_LABELPAD);
|
||||
for (i = 0; i < LFS_MAXNUMSB; i++) {
|
||||
if (osb->lfs_sboffs[i] < daddr)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pass5.c,v 1.28 2013/06/18 18:18:58 christos Exp $ */
|
||||
/* $NetBSD: pass5.c,v 1.29 2015/05/31 15:44:30 hannken Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000, 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -120,9 +120,9 @@ pass5(void)
|
|||
if (su->su_flags & SEGUSE_SUPERBLOCK)
|
||||
avail -= lfs_btofsb(fs, LFS_SBPAD);
|
||||
if (i == 0 && fs->lfs_version > 1 &&
|
||||
fs->lfs_start < lfs_btofsb(fs, LFS_LABELPAD))
|
||||
fs->lfs_s0addr < lfs_btofsb(fs, LFS_LABELPAD))
|
||||
avail -= lfs_btofsb(fs, LFS_LABELPAD) -
|
||||
fs->lfs_start;
|
||||
fs->lfs_s0addr;
|
||||
}
|
||||
if (diddirty)
|
||||
VOP_BWRITE(bp);
|
||||
|
@ -169,7 +169,7 @@ pass5(void)
|
|||
|
||||
labelskew = 0;
|
||||
if (fs->lfs_version > 1 &&
|
||||
fs->lfs_start < lfs_btofsb(fs, LFS_LABELPAD))
|
||||
fs->lfs_s0addr < lfs_btofsb(fs, LFS_LABELPAD))
|
||||
labelskew = lfs_btofsb(fs, LFS_LABELPAD);
|
||||
if (fs->lfs_bfree > fs->lfs_dsize - bb - labelskew ||
|
||||
fs->lfs_bfree < fs->lfs_dsize - ubb - labelskew) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pass6.c,v 1.33 2015/03/29 19:35:58 chopps Exp $ */
|
||||
/* $NetBSD: pass6.c,v 1.34 2015/05/31 15:44:30 hannken Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -596,7 +596,7 @@ pass6(void)
|
|||
|
||||
/* Could be a superblock */
|
||||
if (lfs_sntod(fs, lfs_dtosn(fs, daddr)) == daddr) {
|
||||
if (daddr == fs->lfs_start) {
|
||||
if (daddr == fs->lfs_s0addr) {
|
||||
++hassuper;
|
||||
daddr += lfs_btofsb(fs, LFS_LABELPAD);
|
||||
}
|
||||
|
@ -825,7 +825,7 @@ pass6(void)
|
|||
|
||||
/* Could be a superblock */
|
||||
if (lfs_sntod(fs, lfs_dtosn(fs, daddr)) == daddr) {
|
||||
if (daddr == fs->lfs_start)
|
||||
if (daddr == fs->lfs_s0addr)
|
||||
daddr += lfs_btofsb(fs, LFS_LABELPAD);
|
||||
for (i = 0; i < LFS_MAXNUMSB; i++) {
|
||||
if (daddr == fs->lfs_sboffs[i]) {
|
||||
|
@ -863,7 +863,7 @@ pass6(void)
|
|||
|
||||
/* Final address could also be a superblock */
|
||||
if (lfs_sntod(fs, lfs_dtosn(fs, lastgood)) == lastgood) {
|
||||
if (lastgood == fs->lfs_start)
|
||||
if (lastgood == fs->lfs_s0addr)
|
||||
lastgood += lfs_btofsb(fs, LFS_LABELPAD);
|
||||
for (i = 0; i < LFS_MAXNUMSB; i++) {
|
||||
if (lastgood == fs->lfs_sboffs[i])
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: segwrite.c,v 1.28 2015/03/29 19:35:58 chopps Exp $ */
|
||||
/* $NetBSD: segwrite.c,v 1.29 2015/05/31 15:44:30 hannken Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
|
@ -634,9 +634,9 @@ lfs_initseg(struct lfs * fs)
|
|||
brelse(bp, 0);
|
||||
/* Segment zero could also contain the labelpad */
|
||||
if (fs->lfs_version > 1 && sp->seg_number == 0 &&
|
||||
fs->lfs_start < lfs_btofsb(fs, LFS_LABELPAD)) {
|
||||
fs->lfs_offset += lfs_btofsb(fs, LFS_LABELPAD) - fs->lfs_start;
|
||||
sp->seg_bytes_left -= LFS_LABELPAD - lfs_fsbtob(fs, fs->lfs_start);
|
||||
fs->lfs_s0addr < lfs_btofsb(fs, LFS_LABELPAD)) {
|
||||
fs->lfs_offset += lfs_btofsb(fs, LFS_LABELPAD) - fs->lfs_s0addr;
|
||||
sp->seg_bytes_left -= LFS_LABELPAD - lfs_fsbtob(fs, fs->lfs_s0addr);
|
||||
}
|
||||
} else {
|
||||
sp->seg_number = lfs_dtosn(fs, fs->lfs_curseg);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: setup.c,v 1.45 2015/03/29 19:35:58 chopps Exp $ */
|
||||
/* $NetBSD: setup.c,v 1.46 2015/05/31 15:44:30 hannken Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -240,7 +240,7 @@ setup(const char *dev)
|
|||
(unsigned long)idaddr);
|
||||
tdaddr = lfs_sntod(fs, lfs_dtosn(fs, idaddr));
|
||||
if (lfs_sntod(fs, lfs_dtosn(fs, tdaddr)) == tdaddr) {
|
||||
if (tdaddr == fs->lfs_start)
|
||||
if (tdaddr == fs->lfs_s0addr)
|
||||
tdaddr += lfs_btofsb(fs, LFS_LABELPAD);
|
||||
for (i = 0; i < LFS_MAXNUMSB; i++) {
|
||||
if (fs->lfs_sboffs[i] == tdaddr)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: make_lfs.c,v 1.30 2015/03/29 19:35:58 chopps Exp $ */
|
||||
/* $NetBSD: make_lfs.c,v 1.31 2015/05/31 15:44:31 hannken Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -62,7 +62,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)lfs.c 8.5 (Berkeley) 5/24/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: make_lfs.c,v 1.30 2015/03/29 19:35:58 chopps Exp $");
|
||||
__RCSID("$NetBSD: make_lfs.c,v 1.31 2015/05/31 15:44:31 hannken Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -573,15 +573,15 @@ make_lfs(int devfd, uint secsize, struct dkwedge_info *dkw, int minfree,
|
|||
}
|
||||
fs->lfs_sboffs[0] = label_fsb;
|
||||
if (version == 1)
|
||||
fs->lfs_start = fs->lfs_sboffs[0];
|
||||
fs->lfs_s0addr = fs->lfs_sboffs[0];
|
||||
else
|
||||
fs->lfs_start = LFS_DBTOFSB(fs, start);
|
||||
fs->lfs_s0addr = LFS_DBTOFSB(fs, start);
|
||||
fs->lfs_dsize -= sb_fsb;
|
||||
for (i = 1; i < LFS_MAXNUMSB; i++) {
|
||||
sb_addr = ((i * sb_interval) * lfs_segtod(fs, 1))
|
||||
+ fs->lfs_sboffs[0];
|
||||
/* Segment 0 eats the label, except for version 1 */
|
||||
if (fs->lfs_version > 1 && fs->lfs_start < label_fsb)
|
||||
if (fs->lfs_version > 1 && fs->lfs_s0addr < label_fsb)
|
||||
sb_addr -= label_fsb - start;
|
||||
if (sb_addr + sizeof(struct dlfs)
|
||||
>= LFS_DBTOFSB(fs, dkw->dkw_size))
|
||||
|
@ -650,7 +650,7 @@ make_lfs(int devfd, uint secsize, struct dkwedge_info *dkw, int minfree,
|
|||
LFS_SEGENTRY(segp, fs, i, bp);
|
||||
|
||||
if (i == 0 &&
|
||||
fs->lfs_start < lfs_btofsb(fs, LFS_LABELPAD + LFS_SBPAD)) {
|
||||
fs->lfs_s0addr < lfs_btofsb(fs, LFS_LABELPAD + LFS_SBPAD)) {
|
||||
segp->su_flags = SEGUSE_SUPERBLOCK;
|
||||
fs->lfs_bfree -= sb_fsb;
|
||||
++j;
|
||||
|
@ -782,9 +782,9 @@ make_lfs(int devfd, uint secsize, struct dkwedge_info *dkw, int minfree,
|
|||
if (segp->su_flags & SEGUSE_SUPERBLOCK)
|
||||
fs->lfs_avail -= lfs_btofsb(fs, LFS_SBPAD);
|
||||
if (i == 0 && fs->lfs_version > 1 &&
|
||||
fs->lfs_start < lfs_btofsb(fs, LFS_LABELPAD))
|
||||
fs->lfs_s0addr < lfs_btofsb(fs, LFS_LABELPAD))
|
||||
fs->lfs_avail -= lfs_btofsb(fs, LFS_LABELPAD) -
|
||||
fs->lfs_start;
|
||||
fs->lfs_s0addr;
|
||||
}
|
||||
brelse(bp, 0);
|
||||
}
|
||||
|
@ -795,7 +795,7 @@ make_lfs(int devfd, uint secsize, struct dkwedge_info *dkw, int minfree,
|
|||
fs->lfs_avail -= lfs_segtod(fs, (fs->lfs_minfreeseg - (fs->lfs_minfreeseg / 2)));
|
||||
|
||||
labelskew = 0;
|
||||
if (fs->lfs_version > 1 && fs->lfs_start < lfs_btofsb(fs, LFS_LABELPAD))
|
||||
if (fs->lfs_version > 1 && fs->lfs_s0addr < lfs_btofsb(fs, LFS_LABELPAD))
|
||||
labelskew = lfs_btofsb(fs, LFS_LABELPAD);
|
||||
fs->lfs_bfree = fs->lfs_dsize - labelskew - (ubb + bb) / 2;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: lfs.h,v 1.161 2015/03/28 19:24:05 maxv Exp $ */
|
||||
/* $NetBSD: lfs.h,v 1.162 2015/05/31 15:44:31 hannken Exp $ */
|
||||
|
||||
/* from NetBSD: dinode.h,v 1.22 2013/01/22 09:39:18 dholland Exp */
|
||||
/* from NetBSD: dir.h,v 1.21 2009/07/22 04:49:19 dholland Exp */
|
||||
|
@ -929,7 +929,7 @@ struct lfs {
|
|||
#define lfs_sumsize lfs_dlfs.dlfs_sumsize
|
||||
#define lfs_serial lfs_dlfs.dlfs_serial
|
||||
#define lfs_ibsize lfs_dlfs.dlfs_ibsize
|
||||
#define lfs_start lfs_dlfs.dlfs_start
|
||||
#define lfs_s0addr lfs_dlfs.dlfs_start
|
||||
#define lfs_tstamp lfs_dlfs.dlfs_tstamp
|
||||
#define lfs_inodefmt lfs_dlfs.dlfs_inodefmt
|
||||
#define lfs_interleave lfs_dlfs.dlfs_interleave
|
||||
|
@ -1071,9 +1071,9 @@ struct lfs {
|
|||
(fs)->lfs_ssize << (fs)->lfs_blktodb : \
|
||||
lfs_btofsb((fs), (fs)->lfs_ssize)) * (seg))
|
||||
#define lfs_dtosn(fs, daddr) /* block address to segment number */ \
|
||||
((uint32_t)(((daddr) - (fs)->lfs_start) / lfs_segtod((fs), 1)))
|
||||
((uint32_t)(((daddr) - (fs)->lfs_s0addr) / lfs_segtod((fs), 1)))
|
||||
#define lfs_sntod(fs, sn) /* segment number to disk address */ \
|
||||
((daddr_t)(lfs_segtod((fs), (sn)) + (fs)->lfs_start))
|
||||
((daddr_t)(lfs_segtod((fs), (sn)) + (fs)->lfs_s0addr))
|
||||
|
||||
/*
|
||||
* Structures used by lfs_bmapv and lfs_markv to communicate information
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: lfs_extern.h,v 1.102 2015/03/27 17:27:56 riastradh Exp $ */
|
||||
/* $NetBSD: lfs_extern.h,v 1.103 2015/05/31 15:44:31 hannken Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -223,17 +223,7 @@ int lfs_bmapv(struct proc *, fsid_t *, struct block_info *, int);
|
|||
int lfs_markv(struct proc *, fsid_t *, struct block_info *, int);
|
||||
|
||||
/* lfs_vfsops.c */
|
||||
void lfs_init(void);
|
||||
void lfs_reinit(void);
|
||||
void lfs_done(void);
|
||||
int lfs_mountroot(void);
|
||||
int lfs_mount(struct mount *, const char *, void *, size_t *);
|
||||
int lfs_unmount(struct mount *, int);
|
||||
int lfs_statvfs(struct mount *, struct statvfs *);
|
||||
int lfs_sync(struct mount *, int, kauth_cred_t);
|
||||
int lfs_vget(struct mount *, ino_t, struct vnode **);
|
||||
int lfs_fhtovp(struct mount *, struct fid *, struct vnode **);
|
||||
int lfs_vptofh(struct vnode *, struct fid *, size_t *);
|
||||
VFS_PROTOS(lfs);
|
||||
void lfs_vinit(struct mount *, struct vnode **);
|
||||
int lfs_resize_fs(struct lfs *, int);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: lfs_segment.c,v 1.238 2015/04/20 13:44:16 riastradh Exp $ */
|
||||
/* $NetBSD: lfs_segment.c,v 1.239 2015/05/31 15:44:31 hannken Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -60,7 +60,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.238 2015/04/20 13:44:16 riastradh Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.239 2015/05/31 15:44:31 hannken Exp $");
|
||||
|
||||
#define _VFS_VNODE_PRIVATE /* XXX: check for VI_MARKER, this has to go */
|
||||
|
||||
|
@ -1784,11 +1784,11 @@ lfs_initseg(struct lfs *fs)
|
|||
brelse(bp, 0);
|
||||
/* Segment zero could also contain the labelpad */
|
||||
if (fs->lfs_version > 1 && sp->seg_number == 0 &&
|
||||
fs->lfs_start < lfs_btofsb(fs, LFS_LABELPAD)) {
|
||||
fs->lfs_s0addr < lfs_btofsb(fs, LFS_LABELPAD)) {
|
||||
fs->lfs_offset +=
|
||||
lfs_btofsb(fs, LFS_LABELPAD) - fs->lfs_start;
|
||||
lfs_btofsb(fs, LFS_LABELPAD) - fs->lfs_s0addr;
|
||||
sp->seg_bytes_left -=
|
||||
LFS_LABELPAD - lfs_fsbtob(fs, fs->lfs_start);
|
||||
LFS_LABELPAD - lfs_fsbtob(fs, fs->lfs_s0addr);
|
||||
}
|
||||
} else {
|
||||
sp->seg_number = lfs_dtosn(fs, fs->lfs_curseg);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: lfs_syscalls.c,v 1.157 2015/04/20 13:44:16 riastradh Exp $ */
|
||||
/* $NetBSD: lfs_syscalls.c,v 1.158 2015/05/31 15:44:31 hannken Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000, 2001, 2002, 2003, 2007, 2007, 2008
|
||||
|
@ -61,7 +61,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: lfs_syscalls.c,v 1.157 2015/04/20 13:44:16 riastradh Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: lfs_syscalls.c,v 1.158 2015/05/31 15:44:31 hannken Exp $");
|
||||
|
||||
#ifndef LFS
|
||||
# define LFS /* for prototypes in syscallargs.h */
|
||||
|
@ -937,8 +937,8 @@ lfs_do_segclean(struct lfs *fs, unsigned long segnum)
|
|||
if (sup->su_flags & SEGUSE_SUPERBLOCK)
|
||||
fs->lfs_avail -= lfs_btofsb(fs, LFS_SBPAD);
|
||||
if (fs->lfs_version > 1 && segnum == 0 &&
|
||||
fs->lfs_start < lfs_btofsb(fs, LFS_LABELPAD))
|
||||
fs->lfs_avail -= lfs_btofsb(fs, LFS_LABELPAD) - fs->lfs_start;
|
||||
fs->lfs_s0addr < lfs_btofsb(fs, LFS_LABELPAD))
|
||||
fs->lfs_avail -= lfs_btofsb(fs, LFS_LABELPAD) - fs->lfs_s0addr;
|
||||
mutex_enter(&lfs_lock);
|
||||
fs->lfs_bfree += sup->su_nsums * lfs_btofsb(fs, fs->lfs_sumsize) +
|
||||
lfs_btofsb(fs, sup->su_ninos * fs->lfs_ibsize);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: lfs_vfsops.c,v 1.322 2015/03/28 19:24:05 maxv Exp $ */
|
||||
/* $NetBSD: lfs_vfsops.c,v 1.323 2015/05/31 15:44:31 hannken Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000, 2001, 2002, 2003, 2007, 2007
|
||||
|
@ -61,7 +61,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.322 2015/03/28 19:24:05 maxv Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.323 2015/05/31 15:44:31 hannken Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_lfs.h"
|
||||
|
@ -119,8 +119,6 @@ MODULE(MODULE_CLASS_VFS, lfs, NULL);
|
|||
|
||||
static int lfs_gop_write(struct vnode *, struct vm_page **, int, int);
|
||||
static int lfs_mountfs(struct vnode *, struct mount *, struct lwp *);
|
||||
static int lfs_extattrctl(struct mount *, int, struct vnode *, int,
|
||||
const char *);
|
||||
|
||||
static struct sysctllog *lfs_sysctl_log;
|
||||
|
||||
|
@ -953,7 +951,7 @@ lfs_mountfs(struct vnode *devvp, struct mount *mp, struct lwp *l)
|
|||
if (fs->lfs_version < 2) {
|
||||
fs->lfs_sumsize = LFS_V1_SUMMARY_SIZE;
|
||||
fs->lfs_ibsize = fs->lfs_bsize;
|
||||
fs->lfs_start = fs->lfs_sboffs[0];
|
||||
fs->lfs_s0addr = fs->lfs_sboffs[0];
|
||||
fs->lfs_tstamp = fs->lfs_otstamp;
|
||||
fs->lfs_fsbtodb = 0;
|
||||
}
|
||||
|
@ -2321,7 +2319,7 @@ lfs_resize_fs(struct lfs *fs, int newnsegs)
|
|||
/*
|
||||
* Extended attribute dispatch
|
||||
*/
|
||||
static int
|
||||
int
|
||||
lfs_extattrctl(struct mount *mp, int cmd, struct vnode *vp,
|
||||
int attrnamespace, const char *attrname)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dumplfs.c,v 1.41 2013/06/18 18:18:58 christos Exp $ */
|
||||
/* $NetBSD: dumplfs.c,v 1.42 2015/05/31 15:44:31 hannken Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
|
@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 1993\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)dumplfs.c 8.5 (Berkeley) 5/24/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: dumplfs.c,v 1.41 2013/06/18 18:18:58 christos Exp $");
|
||||
__RCSID("$NetBSD: dumplfs.c,v 1.42 2015/05/31 15:44:31 hannken Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -229,7 +229,7 @@ main(int argc, char **argv)
|
|||
if (lfs_master->lfs_version == 1) {
|
||||
lfs_master->lfs_sumsize = LFS_V1_SUMMARY_SIZE;
|
||||
lfs_master->lfs_ibsize = lfs_master->lfs_bsize;
|
||||
lfs_master->lfs_start = lfs_master->lfs_sboffs[0];
|
||||
lfs_master->lfs_s0addr = lfs_master->lfs_sboffs[0];
|
||||
lfs_master->lfs_tstamp = lfs_master->lfs_otstamp;
|
||||
lfs_master->lfs_fsbtodb = 0;
|
||||
}
|
||||
|
@ -661,12 +661,12 @@ dump_segment(int fd, int segnum, daddr_t addr, struct lfs *lfsp, int dump_sb)
|
|||
sumblock = malloc(lfsp->lfs_sumsize);
|
||||
|
||||
if (lfsp->lfs_version > 1 && segnum == 0) {
|
||||
if (lfs_fsbtob(lfsp, lfsp->lfs_start) < LFS_LABELPAD) {
|
||||
if (lfs_fsbtob(lfsp, lfsp->lfs_s0addr) < LFS_LABELPAD) {
|
||||
/* First segment eats the disklabel */
|
||||
sum_offset += lfs_fragroundup(lfsp, LFS_LABELPAD) -
|
||||
lfs_fsbtob(lfsp, lfsp->lfs_start);
|
||||
lfs_fsbtob(lfsp, lfsp->lfs_s0addr);
|
||||
addr += lfs_btofsb(lfsp, lfs_fragroundup(lfsp, LFS_LABELPAD)) -
|
||||
lfsp->lfs_start;
|
||||
lfsp->lfs_s0addr;
|
||||
printf("Disklabel at 0x0\n");
|
||||
}
|
||||
}
|
||||
|
@ -770,7 +770,7 @@ dump_super(struct lfs *lfsp)
|
|||
"interleave ", lfsp->lfs_interleave,
|
||||
"sumsize ", lfsp->lfs_sumsize);
|
||||
(void)printf(" %s%-10d %s0x%-8qx\n",
|
||||
"seg0addr ", lfsp->lfs_start,
|
||||
"seg0addr ", lfsp->lfs_s0addr,
|
||||
"maxfilesize ", (long long)lfsp->lfs_maxfilesize);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue