CVS commit: src/sbin/newfs_v7fs

2022-02-27 Thread Zafer Aydogan
Module Name:src
Committed By:   zafer
Date:   Sun Feb 27 21:05:11 UTC 2022

Modified Files:
src/sbin/newfs_v7fs: main.c

Log Message:
fix typo


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sbin/newfs_v7fs/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/newfs_v7fs/main.c
diff -u src/sbin/newfs_v7fs/main.c:1.10 src/sbin/newfs_v7fs/main.c:1.11
--- src/sbin/newfs_v7fs/main.c:1.10	Wed Aug 10 11:31:49 2011
+++ src/sbin/newfs_v7fs/main.c	Sun Feb 27 21:05:11 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.10 2011/08/10 11:31:49 uch Exp $	*/
+/*	$NetBSD: main.c,v 1.11 2022/02/27 21:05:11 zafer Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: main.c,v 1.10 2011/08/10 11:31:49 uch Exp $");
+__RCSID("$NetBSD: main.c,v 1.11 2022/02/27 21:05:11 zafer Exp $");
 #endif /* not lint */
 
 #include 
@@ -207,7 +207,7 @@ make_filesystem(struct v7fs_self *fs, v7
 	int error = 0;
 	int32_t i, j;
 
-	/* Setup ilist. (ilist must be zero filled. becuase of they are free) */
+	/* Setup ilist. (ilist must be zero filled. because of they are free) */
 	VPRINTF(4, "Zero clear ilist.\n");
 	progress(&(struct progress_arg){ .label = "zero ilist", .tick =
 	ilist_size / PROGRESS_BAR_GRANULE });



CVS commit: src/sbin/newfs_v7fs

2022-02-27 Thread Zafer Aydogan
Module Name:src
Committed By:   zafer
Date:   Sun Feb 27 21:05:11 UTC 2022

Modified Files:
src/sbin/newfs_v7fs: main.c

Log Message:
fix typo


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sbin/newfs_v7fs/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/newfs_v7fs

2017-01-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan 10 20:53:09 UTC 2017

Modified Files:
src/sbin/newfs_v7fs: newfs_v7fs.c

Log Message:
need 


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sbin/newfs_v7fs/newfs_v7fs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/newfs_v7fs

2017-01-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan 10 20:53:09 UTC 2017

Modified Files:
src/sbin/newfs_v7fs: newfs_v7fs.c

Log Message:
need 


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sbin/newfs_v7fs/newfs_v7fs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/newfs_v7fs/newfs_v7fs.c
diff -u src/sbin/newfs_v7fs/newfs_v7fs.c:1.4 src/sbin/newfs_v7fs/newfs_v7fs.c:1.5
--- src/sbin/newfs_v7fs/newfs_v7fs.c:1.4	Tue Jun 16 19:18:55 2015
+++ src/sbin/newfs_v7fs/newfs_v7fs.c	Tue Jan 10 15:53:09 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: newfs_v7fs.c,v 1.4 2015/06/16 23:18:55 christos Exp $ */
+/*	$NetBSD: newfs_v7fs.c,v 1.5 2017/01/10 20:53:09 christos Exp $ */
 
 /*-
  * Copyright (c) 2004, 2011 The NetBSD Foundation, Inc.
@@ -31,19 +31,21 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: newfs_v7fs.c,v 1.4 2015/06/16 23:18:55 christos Exp $");
+__RCSID("$NetBSD: newfs_v7fs.c,v 1.5 2017/01/10 20:53:09 christos Exp $");
 #endif /* not lint */
 
 #include 
 #include 
+#include 
+#include 
+#include 
+
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
-#include 
 
 #include 
 #include "v7fs_impl.h"



CVS commit: src/sbin/newfs_v7fs

2016-09-11 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Mon Sep 12 05:16:04 UTC 2016

Modified Files:
src/sbin/newfs_v7fs: newfs_v7fs.8

Log Message:
Document newfs_v7fs appeared in NetBSD 6.0.
Add AUTHORS secton.
Bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sbin/newfs_v7fs/newfs_v7fs.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/newfs_v7fs

2016-09-11 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Mon Sep 12 05:16:04 UTC 2016

Modified Files:
src/sbin/newfs_v7fs: newfs_v7fs.8

Log Message:
Document newfs_v7fs appeared in NetBSD 6.0.
Add AUTHORS secton.
Bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sbin/newfs_v7fs/newfs_v7fs.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/newfs_v7fs/newfs_v7fs.8
diff -u src/sbin/newfs_v7fs/newfs_v7fs.8:1.3 src/sbin/newfs_v7fs/newfs_v7fs.8:1.4
--- src/sbin/newfs_v7fs/newfs_v7fs.8:1.3	Wed Aug 10 11:31:49 2011
+++ src/sbin/newfs_v7fs/newfs_v7fs.8	Mon Sep 12 05:16:04 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: newfs_v7fs.8,v 1.3 2011/08/10 11:31:49 uch Exp $
+.\"	$NetBSD: newfs_v7fs.8,v 1.4 2016/09/12 05:16:04 sevan Exp $
 .\"
 .\" Copyright (c) 2011 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -56,7 +56,7 @@
 .\"
 .\" @(#)newlfs.8	8.1 (Berkeley) 6/19/93
 .\"
-.Dd April 29, 2011
+.Dd September 12, 2016
 .Dt NEWFS_V7FS 8
 .Os
 .Sh NAME
@@ -128,3 +128,12 @@ Fill file with zeroes instead of creatin
 .\" .Xr fs 5 ,
 .Xr disklabel 8 ,
 .Xr diskpart 8
+.Sh HISTORY
+A
+.Nm
+utility appeared in
+.Nx 6.0 .
+.Sh AUTHORS
+.Nm
+was written by
+.An UCHIYAMA Yasushi Aq Mt u...@netbsd.org .



CVS commit: src/sbin/newfs_v7fs

2012-09-05 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Sep  5 23:01:42 UTC 2012

Modified Files:
src/sbin/newfs_v7fs: Makefile

Log Message:
Remove -g from CPPFLAGS.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sbin/newfs_v7fs/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/newfs_v7fs/Makefile
diff -u src/sbin/newfs_v7fs/Makefile:1.3 src/sbin/newfs_v7fs/Makefile:1.4
--- src/sbin/newfs_v7fs/Makefile:1.3	Fri Aug 10 12:20:11 2012
+++ src/sbin/newfs_v7fs/Makefile	Wed Sep  5 23:01:42 2012
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2012/08/10 12:20:11 joerg Exp $
+# $NetBSD: Makefile,v 1.4 2012/09/05 23:01:42 riz Exp $
 
 .include bsd.own.mk
 
@@ -13,7 +13,7 @@ FSCK=	${NETBSDSRCDIR}/sbin/fsck
 
 DPADD+= ${LIBUTIL}
 LDADD+= -lutil
-CPPFLAGS+=-DV7FS_EI -I${V7FS} -I${FSCK} -g
+CPPFLAGS+=-DV7FS_EI -I${V7FS} -I${FSCK}
 .PATH: ${V7FS} ${FSCK}
 
 COPTS.newfs_v7fs.c+=	-Wno-pointer-sign



CVS commit: src/sbin/newfs_v7fs

2012-09-05 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Sep  5 23:01:42 UTC 2012

Modified Files:
src/sbin/newfs_v7fs: Makefile

Log Message:
Remove -g from CPPFLAGS.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sbin/newfs_v7fs/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/newfs_v7fs

2011-08-10 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Aug 10 12:13:20 UTC 2011

Modified Files:
src/sbin/newfs_v7fs: newfs_v7fs.c

Log Message:
Sync usage with man page.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sbin/newfs_v7fs/newfs_v7fs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/newfs_v7fs

2011-08-09 Thread UCHIYAMA Yasushi
Module Name:src
Committed By:   uch
Date:   Tue Aug  9 09:12:07 UTC 2011

Modified Files:
src/sbin/newfs_v7fs: main.c

Log Message:
Check whether superblock is writable sector.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sbin/newfs_v7fs/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/newfs_v7fs/main.c
diff -u src/sbin/newfs_v7fs/main.c:1.7 src/sbin/newfs_v7fs/main.c:1.8
--- src/sbin/newfs_v7fs/main.c:1.7	Fri Jul 22 09:15:10 2011
+++ src/sbin/newfs_v7fs/main.c	Tue Aug  9 09:12:07 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.7 2011/07/22 09:15:10 uch Exp $	*/
+/*	$NetBSD: main.c,v 1.8 2011/08/09 09:12:07 uch Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: main.c,v 1.7 2011/07/22 09:15:10 uch Exp $);
+__RCSID($NetBSD: main.c,v 1.8 2011/08/09 09:12:07 uch Exp $);
 #endif /* not lint */
 
 #include sys/param.h
@@ -72,6 +72,26 @@
 }
 
 static int
+partition_check(struct v7fs_self *fs)
+{
+	struct v7fs_superblock *sb = fs-superblock;
+	int error;
+
+	if ((error = v7fs_superblock_load(fs))) {
+		warnx(Can't read superblock sector.);
+	}
+	sb-modified = 1;
+	if ((error = v7fs_superblock_writeback(fs))) {
+		if (errno == EROFS) {
+			warnx(Overwriting disk label? );
+		}
+		warnx(Can't write superblock sector.);
+	}
+
+	return error;
+}
+
+static int
 make_root(struct v7fs_self *fs)
 {
 	struct v7fs_inode inode;
@@ -126,7 +146,7 @@
 	v7fs_inode_writeback(fs, inode);
 	if ((error = v7fs_superblock_writeback(fs))) {
 		errno = error;
-		warn(Can't write superblock.);
+		warnx(Can't write superblock.);
 	}
 
 	return error;
@@ -272,6 +292,10 @@
 	fs-endian = mount-endian;
 	v7fs_endian_init(fs);
 
+	if ((error = partition_check(fs))) {
+		return error;
+	}
+
 	/* Construct filesystem. */
 	if ((error = make_filesystem(fs, volume_size, ilist_size))) {
 		return error;



CVS commit: src/sbin/newfs_v7fs

2011-08-09 Thread UCHIYAMA Yasushi
Module Name:src
Committed By:   uch
Date:   Tue Aug  9 11:18:29 UTC 2011

Modified Files:
src/sbin/newfs_v7fs: main.c

Log Message:
Fix warning message.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sbin/newfs_v7fs/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/newfs_v7fs/main.c
diff -u src/sbin/newfs_v7fs/main.c:1.8 src/sbin/newfs_v7fs/main.c:1.9
--- src/sbin/newfs_v7fs/main.c:1.8	Tue Aug  9 09:12:07 2011
+++ src/sbin/newfs_v7fs/main.c	Tue Aug  9 11:18:28 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.8 2011/08/09 09:12:07 uch Exp $	*/
+/*	$NetBSD: main.c,v 1.9 2011/08/09 11:18:28 uch Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: main.c,v 1.8 2011/08/09 09:12:07 uch Exp $);
+__RCSID($NetBSD: main.c,v 1.9 2011/08/09 11:18:28 uch Exp $);
 #endif /* not lint */
 
 #include sys/param.h
@@ -78,7 +78,10 @@
 	int error;
 
 	if ((error = v7fs_superblock_load(fs))) {
-		warnx(Can't read superblock sector.);
+		if (error != EINVAL) {
+			/* Invalid superblock information is OK. */
+			warnx(Can't read superblock sector.);
+		}
 	}
 	sb-modified = 1;
 	if ((error = v7fs_superblock_writeback(fs))) {



CVS commit: src/sbin/newfs_v7fs

2011-08-09 Thread UCHIYAMA Yasushi
Module Name:src
Committed By:   uch
Date:   Tue Aug  9 09:12:07 UTC 2011

Modified Files:
src/sbin/newfs_v7fs: main.c

Log Message:
Check whether superblock is writable sector.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sbin/newfs_v7fs/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/newfs_v7fs

2011-08-09 Thread UCHIYAMA Yasushi
Module Name:src
Committed By:   uch
Date:   Tue Aug  9 11:18:29 UTC 2011

Modified Files:
src/sbin/newfs_v7fs: main.c

Log Message:
Fix warning message.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sbin/newfs_v7fs/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/newfs_v7fs

2011-07-22 Thread UCHIYAMA Yasushi
Module Name:src
Committed By:   uch
Date:   Fri Jul 22 09:15:10 UTC 2011

Modified Files:
src/sbin/newfs_v7fs: main.c

Log Message:
Fixed the problem that partition size over 8GiB(v7fs filesystem limit) failed 
newfs.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sbin/newfs_v7fs/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/newfs_v7fs/main.c
diff -u src/sbin/newfs_v7fs/main.c:1.6 src/sbin/newfs_v7fs/main.c:1.7
--- src/sbin/newfs_v7fs/main.c:1.6	Tue Jul 19 19:57:54 2011
+++ src/sbin/newfs_v7fs/main.c	Fri Jul 22 09:15:10 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.6 2011/07/19 19:57:54 tron Exp $	*/
+/*	$NetBSD: main.c,v 1.7 2011/07/22 09:15:10 uch Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: main.c,v 1.6 2011/07/19 19:57:54 tron Exp $);
+__RCSID($NetBSD: main.c,v 1.7 2011/07/22 09:15:10 uch Exp $);
 #endif /* not lint */
 
 #include sys/param.h
@@ -252,8 +252,11 @@
 	v7fs_daddr_t volume_size = mount-sectors;
 
 	/* Check and determine ilistblock, datablock size. */
-	if (volume_size  V7FS_DADDR_MAX + 1)
-		return ENOSPC;
+	if (volume_size  V7FS_DADDR_MAX + 1) {
+		warnx(volume size %d over v7fs limit %d. truncated.,
+		volume_size, V7FS_DADDR_MAX + 1);
+		volume_size = V7FS_DADDR_MAX + 1;
+	}
 
 	ilist_size = determine_ilist_size(volume_size, maxfile);
 



Re: CVS commit: src/sbin/newfs_v7fs

2011-07-19 Thread Matthias Scheler
On Tue, Jul 19, 2011 at 08:20:52AM +0900, tsugutomo.en...@jp.sony.com wrote:
  Log Message:
  Don't use roundup2(9) (which should have been howmany(9) anyway) to
  fix builds on platforms other than NetBSD.
 
 Since usr.sbin/makefs/cd9660.[ch] already uses howmany(), we can use it
 here too, can't we?

Indeed, we can and we should.

Thanks a lot

-- 
Matthias Scheler  http://zhadum.org.uk/


CVS commit: src/sbin/newfs_v7fs

2011-07-19 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Tue Jul 19 19:57:54 UTC 2011

Modified Files:
src/sbin/newfs_v7fs: main.c

Log Message:
Use howmany() macro as it is used in a lot fo places in this tool anyway
as suggested by Tsugutomo Enami.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sbin/newfs_v7fs/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/newfs_v7fs/main.c
diff -u src/sbin/newfs_v7fs/main.c:1.5 src/sbin/newfs_v7fs/main.c:1.6
--- src/sbin/newfs_v7fs/main.c:1.5	Tue Jul 19 18:29:41 2011
+++ src/sbin/newfs_v7fs/main.c	Tue Jul 19 19:57:54 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.5 2011/07/19 18:29:41 joerg Exp $	*/
+/*	$NetBSD: main.c,v 1.6 2011/07/19 19:57:54 tron Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: main.c,v 1.5 2011/07/19 18:29:41 joerg Exp $);
+__RCSID($NetBSD: main.c,v 1.6 2011/07/19 19:57:54 tron Exp $);
 #endif /* not lint */
 
 #include sys/param.h
@@ -62,8 +62,7 @@
 	v7fs_daddr_t ilist_size;
 
 	if (files)
-		ilist_size =  (files + V7FS_INODE_PER_BLOCK - 1) /
-		V7FS_INODE_PER_BLOCK;
+		ilist_size =  howmany(files, V7FS_INODE_PER_BLOCK);
 	else
 		ilist_size = volume_size / 25; /* 4% */
 	if (ilist_size  (v7fs_daddr_t)V7FS_ILISTBLK_MAX)



CVS commit: src/sbin/newfs_v7fs

2011-07-19 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Tue Jul 19 19:57:54 UTC 2011

Modified Files:
src/sbin/newfs_v7fs: main.c

Log Message:
Use howmany() macro as it is used in a lot fo places in this tool anyway
as suggested by Tsugutomo Enami.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sbin/newfs_v7fs/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sbin/newfs_v7fs

2011-07-18 Thread tsugutomo . enami
Matthias Scheler t...@netbsd.org writes:

 Log Message:
 Don't use roundup2(9) (which should have been howmany(9) anyway) to
 fix builds on platforms other than NetBSD.

Since usr.sbin/makefs/cd9660.[ch] already uses howmany(), we can use it
here too, can't we?

enami.


CVS commit: src/sbin/newfs_v7fs

2011-07-10 Thread UCHIYAMA Yasushi
Module Name:src
Committed By:   uch
Date:   Sun Jul 10 12:14:01 UTC 2011

Modified Files:
src/sbin/newfs_v7fs: main.c

Log Message:
fix freeblock count bug.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sbin/newfs_v7fs/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/newfs_v7fs/main.c
diff -u src/sbin/newfs_v7fs/main.c:1.1 src/sbin/newfs_v7fs/main.c:1.2
--- src/sbin/newfs_v7fs/main.c:1.1	Mon Jun 27 11:52:58 2011
+++ src/sbin/newfs_v7fs/main.c	Sun Jul 10 12:14:01 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.1 2011/06/27 11:52:58 uch Exp $	*/
+/*	$NetBSD: main.c,v 1.2 2011/07/10 12:14:01 uch Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: main.c,v 1.1 2011/06/27 11:52:58 uch Exp $);
+__RCSID($NetBSD: main.c,v 1.2 2011/07/10 12:14:01 uch Exp $);
 #endif /* not lint */
 
 #include sys/param.h
@@ -146,11 +146,11 @@
 		{
 			VPRINTF(\nlast freeblock #%d\n,
 			(*val32)(fb-freeblock[i + 1]));
-			fb-nfreeblock = (*val16)(k);
 
 			memmove(fb-freeblock + 1, fb-freeblock + i + 1, k *
 			sizeof(v7fs_daddr_t));
 			fb-freeblock[0] = 0; /* Terminate link; */
+			fb-nfreeblock = (*val16)(k + 1);
 			VPRINTF(last freeblock contains #%d\n,
 			(*val16)(fb-nfreeblock));
 			fs-io.write(fs-io.cookie, buf, listblk);
@@ -211,7 +211,8 @@
 	for (i = V7FS_MAX_FREEBLOCK - 1, j = sb-datablock_start_sector; i = 0;
 	i--, j++)
 		sb-freeblock[i] = j;
-	sb-total_freeblock = volume_size - sb-datablock_start_sector - 1;
+
+	sb-total_freeblock = volume_size - sb-datablock_start_sector;
 
 	/* Write superblock. */
 	sb-modified = 1;



CVS commit: src/sbin/newfs_v7fs

2011-07-10 Thread UCHIYAMA Yasushi
Module Name:src
Committed By:   uch
Date:   Sun Jul 10 12:14:01 UTC 2011

Modified Files:
src/sbin/newfs_v7fs: main.c

Log Message:
fix freeblock count bug.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sbin/newfs_v7fs/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.