From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LUgS9-0000mk-Mx for mharc-grub-devel@gnu.org; Wed, 04 Feb 2009 07:02:01 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LUgS8-0000kH-7n for grub-devel@gnu.org; Wed, 04 Feb 2009 07:02:00 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LUgS7-0000j3-Ol for grub-devel@gnu.org; Wed, 04 Feb 2009 07:01:59 -0500 Received: from [199.232.76.173] (port=33667 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LUgS7-0000ij-9t for grub-devel@gnu.org; Wed, 04 Feb 2009 07:01:59 -0500 Received: from fg-out-1718.google.com ([72.14.220.159]:23804) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LUgS6-0005dz-Il for grub-devel@gnu.org; Wed, 04 Feb 2009 07:01:58 -0500 Received: by fg-out-1718.google.com with SMTP id l27so1344487fgb.30 for ; Wed, 04 Feb 2009 04:01:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type; bh=8c5gQk6g7ChNaB8xjgxI/XCZuwH4lG/MqirYwMUYeRc=; b=tVOxJe8AUb3mq13pv/6Ryf+zM1h+agyYlpJQjVe+7dtjTJuEgQ9edckXVPa80m1VxK ZsL7NpBwo3sXGeqwCDmVegARn9O1cjhU5Myk+nxPfU9O7eXvZ1HbqBHnnuz3HI+0d+nS rgG+IcVNwl93Hs0rsU7bX5p89nYZhLO8seAt4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type; b=l0ww6SFon6cVLOWWgH4SfzDk+U/CWnMD2/JlMSC58cf0nnE6PX9AcSBbSIILZck8Ac pMoq0DrXzOKFRhe1LRfm8TpKj/gF+ufJh1LBOl3D9RbtdqoDDsQJw14M5Dt6XYmzW11J TpNTxPo57GEzQaj1VRVJiD0ar6K+wBNfPkuOY= Received: by 10.86.97.7 with SMTP id u7mr1365045fgb.8.1233748917754; Wed, 04 Feb 2009 04:01:57 -0800 (PST) Received: from ?192.168.1.25? (119-114.62-81.cust.bluewin.ch [81.62.114.119]) by mx.google.com with ESMTPS id l19sm1933941fgb.37.2009.02.04.04.01.56 (version=SSLv3 cipher=RC4-MD5); Wed, 04 Feb 2009 04:01:57 -0800 (PST) Message-ID: <498983B3.8090904@gmail.com> Date: Wed, 04 Feb 2009 13:01:55 +0100 From: phcoder User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: The development of GRUB 2 Content-Type: multipart/mixed; boundary="------------000801040108060809020201" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Remove trailing space from FAT label X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2009 12:02:00 -0000 This is a multi-part message in MIME format. --------------000801040108060809020201 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hello. Here is the patch to remove trailing spaces from FAT label. These spaces generally aren't considiered to be part of label Thanks Vladimir 'phcoder' Serbinenko --------------000801040108060809020201 Content-Type: text/x-diff; name="fatlabel.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fatlabel.diff" Index: fs/fat.c =================================================================== --- fs/fat.c (revision 1973) +++ fs/fat.c (working copy) @@ -809,7 +809,13 @@ if (dir.attr == GRUB_FAT_ATTR_VOLUME_ID) { - *label = grub_strndup ((char *) dir.name, 11); + int labellen = 0, i; + for (i = 0; i < 11; i++) + if (dir.name[i] != ' ') + labellen = i + 1; + + *label = grub_strndup ((char *) dir.name, labellen); + return GRUB_ERR_NONE; } } Index: ChangeLog =================================================================== --- ChangeLog (revision 1973) +++ ChangeLog (working copy) @@ -1,3 +1,9 @@ +2009-02-04 Vladimir Serbinenko + + Remove trailing spaces from FAT label + + * fs/fat.c (grub_fat_label): Remove trailing spaces + 2009-02-04 Felix Zielcke util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and --------------000801040108060809020201--