Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jul 1996 17:17:38 +0200 (MET DST)
From:      "Christoph P. Kukulies" <kuku@gilberto.physik.rwth-aachen.de>
To:        s_koyin@eduserv.its.unimelb.EDU.AU (HMG coA reductase)
Cc:        questions@freebsd.org
Subject:   Re: your mail
Message-ID:  <199607301517.RAA00612@gilberto.physik.rwth-aachen.de>
In-Reply-To: <Pine.OSF.3.91.960730230342.14931A-100000@eduserv.its.unimelb.EDU.AU> from HMG coA reductase at "Jul 30, 96 11:14:08 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> hi again,
> 
> this code:
> 
> #include <ufs/ffs/fs.h>
> 
>    char  fs[8196];  
                 ^
Just guessing: You are trying to read a non-multiple of 512 :-)

>    open ("/dev/rwd0s2e", O_RDONLY, 0);
>    lseek (f, SBOFF, SEEK_SET);
>    read (f, fs, sizeof(fs));
> 
> read gives an error "Invalid argument" which man read(2) says is due to a 
> negative file descriptor. i know f is not negative.
> 
> but this code works fine:
> 
>    char  fs[SBSIZE];
>    open ("/dev/rwd0s2e", O_RDONLY, 0);
>    lseek (f, SBOFF, SEEK_SET);
>    read (f, fs, sizeof(fs));
> 
> any ideas?
> 
> thanks.
> ivan
> 

--Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607301517.RAA00612>