svn commit: r194782 - stable/7/tools/tools/nanobsd

Edwin Groothuis edwin at
Tue Jun 23 22:22:21 UTC 2009

Author: edwin
Date: Tue Jun 23 22:22:20 2009
New Revision: 194782

  Fix NanoBSD when the data partition size is defined as a negative
        It is possible to ask to create a 'data' partition,
        separate from the system or configuration partitions, and
        furthermore, by specifying a negative value for its size
        to request that it use all space unused by those partitions
        for its own size.
        Because the two lines of code that calculate how much space
        is available for this data partition are written in perl-like
        syntax, the awk code that does the processing performs the
        calculation incorrectly.
        [note - this was already fixed by r174936]
        Furthermore, a comparison later down fails to newfs the
        partition when the size is negative.
  PR:           misc/127759
  Submitted by: Cyrus Rahman <crahman at>

  stable/7/tools/tools/nanobsd/   (contents, props changed)

Modified: stable/7/tools/tools/nanobsd/
--- stable/7/tools/tools/nanobsd/	Tue Jun 23 22:19:27 2009	(r194781)
+++ stable/7/tools/tools/nanobsd/	Tue Jun 23 22:22:20 2009	(r194782)
@@ -474,7 +474,7 @@ create_i386_diskimage ( ) (
 	# XXX: fill from where ?
 	# Create Data slice, if any.
-	if [ $NANO_DATASIZE -gt 0 ] ; then
+	if [ $NANO_DATASIZE -ne 0 ] ; then
 		newfs ${NANO_NEWFS} /dev/${MD}s4
 		# XXX: fill from where ?

More information about the svn-src-stable-7 mailing list