From owner-freebsd-current@FreeBSD.ORG Fri May 2 11:04:02 2008 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AC1E106566B for ; Fri, 2 May 2008 11:04:02 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id AFA0E8FC1E for ; Fri, 2 May 2008 11:04:01 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.2/8.14.1) with ESMTP id m42B3xdc029717 for ; Fri, 2 May 2008 15:03:59 +0400 (MSD) (envelope-from marck@rinet.ru) Date: Fri, 2 May 2008 15:03:59 +0400 (MSD) From: Dmitry Morozovsky To: current@FreeBSD.org Message-ID: <20080502150037.N40022@woozle.rinet.ru> X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (woozle.rinet.ru [0.0.0.0]); Fri, 02 May 2008 15:04:00 +0400 (MSD) Cc: Subject: tunefs: allowing underscores in file system label 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: Fri, 02 May 2008 11:04:02 -0000 Dear colleagues, any objection to the following simple patch? It would help using glabel be a bit more consistent, as many msdosfs labels contain underscores. Index: tunefs.c =================================================================== RCS file: /home/ncvs/src/sbin/tunefs/tunefs.c,v retrieving revision 1.42 diff -u -r1.42 tunefs.c --- tunefs.c 9 Apr 2004 19:58:40 -0000 1.42 +++ tunefs.c 2 May 2008 11:00:24 -0000 @@ -139,8 +139,9 @@ found_arg = 1; name = "volume label"; Lvalue = optarg; - i = -1; - while (isalnum(Lvalue[++i])); + i = 0; + while (isalnum(Lvalue[i]) || Lvalue[i] == '_') + i++; if (Lvalue[i] != '\0') { errx(10, "bad %s. Valid characters are alphanumerics.", Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------