From owner-freebsd-questions Tue Jul 30 06:13:46 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id GAA14934 for questions-outgoing; Tue, 30 Jul 1996 06:13:46 -0700 (PDT) Received: from eduserv.its.unimelb.EDU.AU (s_koyin@eduserv.its.unimelb.EDU.AU [128.250.6.4]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id GAA14928 for ; Tue, 30 Jul 1996 06:13:43 -0700 (PDT) Received: (from s_koyin@localhost) by eduserv.its.unimelb.EDU.AU (8.7.4/8.7.3) id XAA24035; Tue, 30 Jul 1996 23:14:09 +1000 (EST) Date: Tue, 30 Jul 1996 23:14:08 +1000 (EST) From: HMG coA reductase To: questions@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk hi again, this code: #include 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