From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1J8xRR-0007l9-5f for mharc-grub-devel@gnu.org; Sun, 30 Dec 2007 07:38:57 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J8xRN-0007kB-Vj for grub-devel@gnu.org; Sun, 30 Dec 2007 07:38:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J8xRM-0007jx-01 for grub-devel@gnu.org; Sun, 30 Dec 2007 07:38:53 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J8xRL-0007ju-Rt for grub-devel@gnu.org; Sun, 30 Dec 2007 07:38:51 -0500 Received: from ns39764.ovh.net ([91.121.25.85] helo=nexedi.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J8xRL-000415-LO for grub-devel@gnu.org; Sun, 30 Dec 2007 07:38:51 -0500 Received: from [10.8.0.46] (unknown [10.8.0.46]) by nexedi.com (Postfix) with ESMTP id E4C363EB23 for ; Sun, 30 Dec 2007 13:43:16 +0100 (CET) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Sun, 30 Dec 2007 13:38:46 +0100 User-Agent: KMail/1.9.4 References: <1198931806.11143.65.camel@latsun.main.fg> In-Reply-To: <1198931806.11143.65.camel@latsun.main.fg> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200712301338.46883.okuji@enbug.org> X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: Re: grub-probe && statfs(2) 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: Sun, 30 Dec 2007 12:38:54 -0000 Hello, On Saturday 29 December 2007 13:36, Francis Gendreau wrote: > My recommendation would be relatively simple. grub_guess_root_device() > could simply call statfs() and extract the device name from struct > statfs f_mntfromname, maybe as simply as the following, but I may lack > of knowledge about some technologies on which this might not work (like > RAID ...). Unfortunately, statfs in Linux does not return a filename. From statfs(2): The Linux statfs was inspired by the 4.4BSD one (but they do not use the same structure). In fact, struct statfs does not contain f_mntfromname or anything equivallent on Linux. So I think it would be necessary to use statfs, only on *BSD (or if struct statfs contains f_mntfromname). Thanks, Okuji