From owner-freebsd-current@FreeBSD.ORG Sat May 12 07:29:52 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EB49716A405 for ; Sat, 12 May 2007 07:29:52 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from viefep18-int.chello.at (viefep13-int.chello.at [213.46.255.15]) by mx1.freebsd.org (Postfix) with ESMTP id 2534913C447 for ; Sat, 12 May 2007 07:29:50 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from lizard.fafoe.narf.at ([213.47.85.26]) by viefep34-int.chello.at (InterMail vM.7.08.02.00 201-2186-121-20061213) with ESMTP id <20070512071239.ZSIS16772.viefep34-int.chello.at@lizard.fafoe.narf.at>; Sat, 12 May 2007 09:12:39 +0200 Received: by lizard.fafoe.narf.at (Postfix, from userid 1001) id 95C57B94A; Sat, 12 May 2007 09:12:39 +0200 (CEST) Date: Sat, 12 May 2007 09:12:39 +0200 From: Stefan Farfeleder To: Yuriy Tsibizov Message-ID: <20070512071231.GB944@lizard.fafoe.narf.at> Mail-Followup-To: Yuriy Tsibizov , freebsd-current@freebsd.org References: <20070509125720.U911@free.home.local> <20070512104053.J943@free.home.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070512104053.J943@free.home.local> User-Agent: Mutt/1.5.15 (2007-04-06) Cc: freebsd-current@freebsd.org Subject: Re: geom_label problems when MS-DOS FS label is blank (all spaces) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2007 07:29:53 -0000 On Sat, May 12, 2007 at 10:51:25AM +0400, Yuriy Tsibizov wrote: > > In this situation libdisk can't parse kern.geom.conftxt and sysinstall > > exits with BARF 171 message. > > It can be fixed with following patch. "all spaces" volume will be treated > like a volume without label. > > Index: g_label_msdosfs.c > =================================================================== > RCS file: /home/ncvs/src/sys/geom/label/g_label_msdosfs.c,v > retrieving revision 1.6 > diff -u -r1.6 g_label_msdosfs.c > --- g_label_msdosfs.c 30 Sep 2006 08:16:49 -0000 1.6 > +++ g_label_msdosfs.c 12 May 2007 06:39:23 -0000 > @@ -200,7 +200,7 @@ > } > > endofchecks: > - for (i = size - 1; i > 0; i--) { > + for (i = size - 1; i >= 0; i--) { > if (label[i] == '\0') > continue; > else if (label[i] == ' ') This won't work because i is unsigned.