From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1DM3au-0006z3-Cl for mharc-grub-devel@gnu.org; Thu, 14 Apr 2005 08:37:16 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DM3ar-0006xD-5o for grub-devel@gnu.org; Thu, 14 Apr 2005 08:37:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DM3ap-0006wY-75 for grub-devel@gnu.org; Thu, 14 Apr 2005 08:37:11 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DM3V4-00053j-5f for grub-devel@gnu.org; Thu, 14 Apr 2005 08:31:14 -0400 Received: from [212.43.237.68] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DM3Gi-0005nT-DX for grub-devel@gnu.org; Thu, 14 Apr 2005 08:16:24 -0400 Received: from ASSP-nospam (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id 1CF18FF54DAB for ; Thu, 14 Apr 2005 14:15:47 +0200 (CEST) Received: from 127.0.0.1 ([127.0.0.1] helo=localhost) by ASSP-nospam ; 14 Apr 05 12:15:46 -0000 From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Thu, 14 Apr 2005 14:15:46 +0200 User-Agent: KMail/1.7.1 References: <78d5a6962754dbc4b0f64fb15ffd7b79@penguinppc.org> <87d5t5pyb1.fsf@student.han.nl> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200504141415.46601.okuji@enbug.org> Subject: Re: partition layouts - "root" 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: Thu, 14 Apr 2005 12:37:14 -0000 On Thursday 14 April 2005 05:46 am, Hollis Blanchard wrote: > I think I like this idea a lot. It would also be nice if the various > file-based commands (like cat and cmp) also looked at the current > working directory as well. > > lsdev (or lsdisk?) also makes a lot of sense to me. Ok. Then, let's go to this direction. I think this function would be required: - char *grub_file_get_absolute_path (const char *path) If PATH is empty, return current working directory. If PATH is a relative path, return a path based on current working directory. If PATH is an absolute path, return a patch based on current working device. If PATH contains a device name, return PATH. The return value should be allocated on the heap. This function also should resolve "." and "..". Once this is implemented, the rest is trivial. So, who wants to work on this? ;) Okuji