help-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stat for block device files


From: Christoph Plattner
Subject: Re: stat for block device files
Date: Sun, 01 Oct 2000 11:13:42 +0200

Hi !

If stat does not work, a blockread of 512bytes should work. On Linux,
for example, the EOF condition works correct. `read()' returns `0' then.

With friendly regards

        Christoph Plattner


OKUJI Yoshinori wrote:
> 
>   Does stat return a correct size even for a block device file
> (i.e. a file "settrans"ed with storeio) on GNU/Hurd? I'm not sure,
> since I have no GNU/Hurd machine at hand for now. If yes, I think the
> grub shell can get correct geometries even on Hurd, with code like
> this:
> 
> stat("/dev/hd0", &st);
> total_sectors = st.st_size >> 9;
> 
> Okuji
> 
> _______________________________________________
> Bug-grub mailing list
> Bug-grub@gnu.org
> http://mail.gnu.org/mailman/listinfo/bug-grub

-- 
-------------------------------------------------------------------------
private:        christoph.plattner@dot.at
company:        christoph.plattner@alcatel.at



reply via email to

[Prev in Thread] Current Thread [Next in Thread]