From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 22 14:11:12 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id C049A1065675; Tue, 22 Feb 2011 14:11:12 +0000 (UTC) Date: Tue, 22 Feb 2011 14:11:12 +0000 From: Alexander Best To: freebsd-hackers@freebsd.org Message-ID: <20110222141112.GA98964@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: seeking into /dev/{null,zero} X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Feb 2011 14:11:12 -0000 hi there, there's a PR [1] regarding seeking into /dev/null and /dev/zero. i just wanted to ask what the overall opinion is on this matter. technically it's quite easy to seek into those files upon fwrite(3) and fread(3). the point is, if the file position should be repositioned according the the amount of bytes read or written. the zero(4) and null(4) manual pages claim that both devices act as "ordinary" files. right now only reading from /dev/zero will seek into the file. writing to /dev/zero and reading/writing to /dev/null will *not* adjust the file position. cheers. alex [1] http://www.freebsd.org/cgi/query-pr.cgi?pr=misc/152485 ps: i might also be worth thinking about turning null(4) and zero(4) into a single manual page, since their contents seem quite similar. -- a13x