From owner-freebsd-arch Mon Aug 13 3:40:32 2001 Delivered-To: freebsd-arch@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 729) id 55AE437B406; Mon, 13 Aug 2001 03:40:30 -0700 (PDT) X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0 To: "Andrey A. Chernov" Cc: arch@freebsd.org Subject: Re: CFR: fseek<0 + feof error (with fix) In-Reply-To: Your message of "Fri, 10 Aug 2001 23:29:40 +0400." <20010810232939.A14964@nagual.pp.ru> Mime-Version: 1.0 Content-Type: text/plain Message-Id: <20010813104030.55AE437B406@hub.freebsd.org> Date: Mon, 13 Aug 2001 03:40:30 -0700 (PDT) From: jkoshy@FreeBSD.ORG (Joseph Koshy) Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > According to POSIX fseek{o}() description, it must return > > [EINVAL] > The whence argument is invalid. The resulting file-position > indicator would be set to a negative value. > > which expicetly disallows seek beyond beginning of a file. Currently we FreeBSD's implementation of `lseek()' allows negative offsets --- these seem to be required to allow reading of /dev/[k]mem. See PR kern/6184. Regards, Koshy To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message