Source-Changes-HG archive

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

[src/trunk]: src/sbin/newfs_udf When requesting to disable metadata partition...



details:   https://anonhg.NetBSD.org/src/rev/3870d19b1680
branches:  trunk
changeset: 761241:3870d19b1680
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Fri Jan 21 22:32:13 2011 +0000

description:
When requesting to disable metadata partitions, also disable low formatting.
When no meta and not low formatting we can lower the required UDF version.

diffstat:

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

diffs (28 lines):

diff -r 25252bfc3397 -r 3870d19b1680 sbin/newfs_udf/newfs_udf.c
--- a/sbin/newfs_udf/newfs_udf.c        Fri Jan 21 22:10:51 2011 +0000
+++ b/sbin/newfs_udf/newfs_udf.c        Fri Jan 21 22:32:13 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: newfs_udf.c,v 1.10 2011/01/21 22:10:51 reinoud Exp $ */
+/* $NetBSD: newfs_udf.c,v 1.11 2011/01/21 22:32:13 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -573,7 +573,7 @@
 
        /* enable/disable requests */
        if (req_disable & FORMAT_META) {
-               format_flags &= ~FORMAT_META;
+               format_flags &= ~(FORMAT_META | FORMAT_LOW);
                req_disable  &= ~FORMAT_META;
        }
        if (req_disable || req_enable) {
@@ -608,7 +608,8 @@
                context.min_udf = MAX(context.min_udf, 0x0260);
 
        /* adjust maximum version limits not to tease or break things */
-       if (!(format_flags & FORMAT_META) && (context.max_udf > 0x200))
+       if (!(format_flags & (FORMAT_META | FORMAT_LOW)) &&
+           (context.max_udf > 0x200))
                context.max_udf = 0x201;
 
        if ((format_flags & (FORMAT_VAT | FORMAT_SPARABLE)) == 0)



Home | Main Index | Thread Index | Old Index