From mboxrd@z Thu Jan 1 00:00:00 1970 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> MIME-Version: 1.0 Date: Fri, 13 Aug 2010 12:16:14 -0600 From: EBo In-Reply-To: <7f852ecf5053f87338ba74df57418ed1@9netics.com> References: <7f852ecf5053f87338ba74df57418ed1@9netics.com> Message-ID: <318fad97103ed9d95a035f88462dd105@swcp.com> User-Agent: RoundCube Webmail/0.3.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: [9fans] =?utf-8?q?read=282=29_problem_on_p9p=3F?= Topicbox-Message-UUID: 484793da-ead6-11e9-9d60-3106f5b1d025 > i'm wondering if it has to do with writing/reading the same file (dtf) > without readjusting the offset (i.e. does pread behave differently)? > > also about this: > > test(!strcmp(tst_str,buf)==ret,4, "check value\n"); > > do you mean to say > > test(strncmp(tst_str,buf,ret) != 0, 4, "check value\n"); Turned out to be a read hearing. The real problem is that I corrupted the file name and the size got set to 4. Now I have two more test case to add ;-) Both pread and seek/read combo's work as expected Sorry for the bother. EBo --