Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jun 2009 12:33:39 +0000 (UTC)
From:      Edwin Groothuis <edwin@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r194288 - head/tools/tools/nanobsd
Message-ID:  <200906161233.n5GCXdLK027457@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: edwin
Date: Tue Jun 16 12:33:38 2009
New Revision: 194288
URL: http://svn.freebsd.org/changeset/base/194288

Log:
  Fix NanoBSD when the data partition size is defined as a negative
  number.
  
  	It is possible to ask nanobsd.sh 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@gmail.com>
  MFC after:	1 week

Modified:
  head/tools/tools/nanobsd/nanobsd.sh

Modified: head/tools/tools/nanobsd/nanobsd.sh
==============================================================================
--- head/tools/tools/nanobsd/nanobsd.sh	Tue Jun 16 12:14:57 2009	(r194287)
+++ head/tools/tools/nanobsd/nanobsd.sh	Tue Jun 16 12:33:38 2009	(r194288)
@@ -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 ?
 	fi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906161233.n5GCXdLK027457>