From owner-freebsd-arch@FreeBSD.ORG Sun Nov 13 10:54:32 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9758E1065675 for ; Sun, 13 Nov 2011 10:54:32 +0000 (UTC) (envelope-from phk@phk.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 534B28FC13 for ; Sun, 13 Nov 2011 10:54:31 +0000 (UTC) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 3212F5DA8; Sun, 13 Nov 2011 10:54:30 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.5/8.14.5) with ESMTP id pADAsRAE015484; Sun, 13 Nov 2011 10:54:28 GMT (envelope-from phk@phk.freebsd.dk) To: perryh@pluto.rain.com From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sat, 12 Nov 2011 20:57:03 PST." <4ebf4e1f.hkNuKvwPEzh2GJhi%perryh@pluto.rain.com> Content-Type: text/plain; charset=ISO-8859-1 Date: Sun, 13 Nov 2011 10:54:27 +0000 Message-ID: <15483.1321181667@critter.freebsd.dk> Cc: tim@kientzle.com, freebsd-arch@freebsd.org Subject: Re: [PATCH] fadvise(2) system call X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Nov 2011 10:54:32 -0000 In message <4ebf4e1f.hkNuKvwPEzh2GJhi%perryh@pluto.rain.com>, perryh@pluto.rain .com writes: >Warner Losh wrote: >> >> wrote: >> >>> ... seek(2) is badly broken on tape drives. >> >>> It does nothing and doesn't return an error ... >> >> >> >> Honestly, I think we've got bigger problems to worry about >> >> than whether lseek() works on magnetic tape drives ... >> > >> > True, but failing silently -- doing nothing but not returning an >> > error -- is a POLA violation. Those are worth fixing simply on >> > principle. >> >> Early Unix layering made that kinda hard... :( > >and yet, it somehow manages to return an error if applied to a pipe. >There must be some point at which the inode type affects the result. There is a big difference: pipes operate at the fdesc level, devices sit behind what can best be explained as a symlink into a different name-space, and the cdevsw API does not pass the fdesc offset in. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.