Source-Changes-HG archive

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

[src/trunk]: src/sbin/newfs_v7fs Fixed the problem that partition size over 8...



details:   https://anonhg.NetBSD.org/src/rev/235a1684d63b
branches:  trunk
changeset: 767549:235a1684d63b
user:      uch <uch%NetBSD.org@localhost>
date:      Fri Jul 22 09:15:10 2011 +0000

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

diffstat:

 sbin/newfs_v7fs/main.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r 866d1fb956ba -r 235a1684d63b sbin/newfs_v7fs/main.c
--- a/sbin/newfs_v7fs/main.c    Fri Jul 22 08:38:43 2011 +0000
+++ b/sbin/newfs_v7fs/main.c    Fri Jul 22 09:15:10 2011 +0000
@@ -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);
 



Home | Main Index | Thread Index | Old Index