[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: stat for FreeBSD
From: |
Andrey Shuvikov |
Subject: |
Re: stat for FreeBSD |
Date: |
Mon, 15 Dec 2008 09:24:41 -0800 (PST) |
I don't have much experience developing under FreeBSD but this call taken from
the fdisk source code seems to work (see attachment also):
error = ioctl(fd, DIOCGMEDIASIZE, &size);
Thanks,
Andrey
--- On Sat, 12/13/08, Robert Millan <address@hidden> wrote:
> From: Robert Millan <address@hidden>
> Subject: Re: stat for FreeBSD
> To: "The development of GRUB 2" <address@hidden>
> Date: Saturday, December 13, 2008, 8:12 PM
> On Tue, Dec 09, 2008 at 03:26:28PM -0800, Andrey Shuvikov
> wrote:
> > Hello,
> >
> > I tried to compile Grub2 under FreeBSD, it compiles
> but doesn't work (grub-setup). The problem seems to be
> in the stat() call, which is used to determine disk size.
> The call returns 0 for st_size, and grub-setup complains for
> "Read out of range". Is it a known issue? Is there
> a way to use Grub2 under FreeBSD?
>
> Do you know how to obtain the disk size on FreeBSD ?
>
> --
> Robert Millan
>
> The DRM opt-in fallacy: "Your data belongs to us. We
> will decide when (and
> how) you may access your data; but nobody's
> threatening your freedom: we
> still allow you to remove your data and not access it at
> all."
>
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/grub-devel
getsize.c
Description: Binary data