[haiku-development] Re: reading/writing negative positions

  • From: Ingo Weinhold <bonefish@xxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 30 Jul 2007 15:19:47 +0200 (MEST)

On Mon, 30 Jul 2007, Jérôme Duval wrote:

2007/7/30, Ingo Weinhold <bonefish@xxxxxxxxxxxxxxx>:
Wouldn't it be better to validate the position inside fd.c instead of passing 
them to the lower layers?

Definitely. Feel free to do that or create a trac ticket, please.

Does it imply to check relative and absolute positions ?

In all cases but seeking you have only absolute positions. And those should be checked for negative values as Marcus proposed.

BTW it should also fail for non seekable file systems.

Actually those should simply ignore the position argument.

CU, Ingo

Other related posts: