Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JTsVN-0001qF-1H for mharc-grub-devel@gnu.org; Tue, 26 Feb 2008 00:37:29 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JTsVK-0001pz-NA for grub-devel@gnu.org; Tue, 26 Feb 2008 00:37:26 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JTsVI-0001pn-3J for grub-devel@gnu.org; Tue, 26 Feb 2008 00:37:25 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JTsVH-0001pk-RK for grub-devel@gnu.org; Tue, 26 Feb 2008 00:37:23 -0500 Received: from ti-out-0910.google.com ([209.85.142.184]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JTsVH-000792-B9 for grub-devel@gnu.org; Tue, 26 Feb 2008 00:37:23 -0500 Received: by ti-out-0910.google.com with SMTP id a20so1369727tia.10 for ; Mon, 25 Feb 2008 21:37:20 -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:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=BjZCxNypjtJRz47TWrAUBzpZZeRfdrX8ZAYuwFC3kXg=; b=coexBg2fuZCk45jhREWWiaDIa5SgwzQx8eM7WwUUmvWYrjyqq4ol6ae5NNcKN24odMmdlS/8STBKFyc2DmZAzl+ZnJTdUUEO9iQJthDxLkyQpm24IpcId5LyMfURJutY917ZUmDOsT/lmXo7P1wDkkmXGAN0V0+zC2DPM9hrV58= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ZxL3NmCQztO0IHCvZzJmWYlbp8z93HiWx2ecteejRQgzfolQ9XZFCVQOOXB1SAUumF0Xw3cOqQ0wubpvxqapi1Jv3pYiUfwGl07a2LdIEr2DkYrbBmGQHcqKuCjwaKMIr/OZjb5BbCUbo3zN2WivUBzrQbClYQA+fX3X1NA35MM= Received: by 10.110.2.2 with SMTP id 2mr3301164tib.14.1204004239702; Mon, 25 Feb 2008 21:37:19 -0800 (PST) Received: by 10.110.20.10 with HTTP; Mon, 25 Feb 2008 21:37:19 -0800 (PST) Message-ID: Date: Tue, 26 Feb 2008 13:37:19 +0800 From: Bean To: "The development of GRUB 2" In-Reply-To: <55071222@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <55071222@web.de> X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Subject: Re: grub2: symlink on reiserfs: error: file not found 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: Tue, 26 Feb 2008 05:37:27 -0000 On Tue, Feb 26, 2008 at 3:09 AM, Christian Meyer wrote: > Bean schrieb am 25.02.2008 15:08:56: > > > > > On Mon, Feb 25, 2008 at 7:57 PM, Christian Meyer wrote: > > > > > > > The diskimage http://www.chbmeyer.de/1.reiserfs.gz has a size of 35 MB (compressed: 36kb). > > > > > The test file have problem, the link is pointed to /mnt/boot/test > > instead of /boot/test. > > Oh, I'm really sorry about it, too stupid. > Fixed it with http://www.chbmeyer.de/1.reiserfs.gz > > I used the symlink that caused the trouble: > cp -dp /media/hda3/vmlinuz /mnt/ > and exchanged the kernel by a textfile. Ok, i found the bug, symbol link name in reiserfs is not null-ended, so we need to add 0 at the end of string: diff --git a/fs/reiserfs.c b/fs/reiserfs.c index a4c60ca..60b6fe2 100644 --- a/fs/reiserfs.c +++ b/fs/reiserfs.c @@ -659,7 +659,7 @@ grub_reiserfs_read_symlink (grub_fshelp_node_t node) >> GRUB_DISK_SECTOR_BITS); offset = grub_le_to_cpu16 (found.header.item_location); - symlink_buffer = grub_malloc (len); + symlink_buffer = grub_malloc (len + 1); if (! symlink_buffer) goto fail; @@ -667,6 +667,7 @@ grub_reiserfs_read_symlink (grub_fshelp_node_t node) if (grub_errno) goto fail; + symlink_buffer[len] = 0; return symlink_buffer; fail: -- Bean