From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Subject: Re: negative seek offsets in VFS Date: 27 May 2005 12:43:11 +0200 Message-ID: <20050527104311.GC86087@muc.de> References: <20050526192332.GW86087@muc.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, Paul Taysom , viro@www.linux.org.uk Return-path: Received: from colin.muc.de ([193.149.48.1]:21005 "EHLO mail.muc.de") by vger.kernel.org with ESMTP id S262430AbVE0KnM (ORCPT ); Fri, 27 May 2005 06:43:12 -0400 Date: Fri, 27 May 2005 12:43:11 +0200 To: Bryan Henderson Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org > I'm familiar with the ERR_PTR strategy for packing a kernel address and an > errno into a single word, but I haven't seen this for anything else. I'm > talking about the POSIX interface -- i.e. what the caller of the lseek() C > library routine would see. I am not talking about kernel internal interfaces like ERR_PTR. The linux system call interface on most (all?) architectures reserves -1 to -4095 for error returns. When such a error is detected it is converted to errno and -1. This applies to all system calls. Take a look at unistd.h of your favourite architecture if you dont believe me. -Andi