[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grub-probe && statfs(2)
From: |
Yoshinori K. Okuji |
Subject: |
Re: grub-probe && statfs(2) |
Date: |
Sun, 30 Dec 2007 13:38:46 +0100 |
User-agent: |
KMail/1.9.4 |
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