Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jul 1996 23:14:08 +1000 (EST)
From:      HMG coA reductase <s_koyin@eduserv.its.unimelb.EDU.AU>
To:        questions@freebsd.org
Message-ID:  <Pine.OSF.3.91.960730230342.14931A-100000@eduserv.its.unimelb.EDU.AU>

next in thread | raw e-mail | index | archive | help
hi again,

this code:

#include <ufs/ffs/fs.h>

   char  fs[8196];  
   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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.3.91.960730230342.14931A-100000>