[prev in list] [next in list] [prev in thread] [next in thread] 

List:       grub-devel
Subject:    Re: grub-probe && statfs(2)
From:       "Yoshinori K. Okuji" <okuji () enbug ! org>
Date:       2007-12-30 12:38:46
Message-ID: 200712301338.46883.okuji () enbug ! org
[Download RAW message or body]

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



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic