All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yoshinori K. Okuji" <okuji@enbug.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: grub-probe && statfs(2)
Date: Sun, 30 Dec 2007 13:38:46 +0100	[thread overview]
Message-ID: <200712301338.46883.okuji@enbug.org> (raw)
In-Reply-To: <1198931806.11143.65.camel@latsun.main.fg>

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



  reply	other threads:[~2007-12-30 12:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-29 12:36 grub-probe && statfs(2) Francis Gendreau
2007-12-30 12:38 ` Yoshinori K. Okuji [this message]
2008-01-01 10:12   ` Francis Gendreau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200712301338.46883.okuji@enbug.org \
    --to=okuji@enbug.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.