From owner-cvs-all Tue Feb 11 18:21:30 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 11A6D37B401; Tue, 11 Feb 2003 18:21:28 -0800 (PST) Received: from smtp03.iprimus.com.au (smtp03.iprimus.com.au [210.50.30.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D22D43F85; Tue, 11 Feb 2003 18:21:26 -0800 (PST) (envelope-from tim@robbins.dropbear.id.au) Received: from smtp02.iprimus.net.au (210.50.76.70) by smtp03.iprimus.com.au (6.7.010) id 3E3E0A810017AC62; Wed, 12 Feb 2003 13:21:24 +1100 Received: from dilbert.robbins.dropbear.id.au ([210.50.200.72]) by smtp02.iprimus.net.au with Microsoft SMTPSVC(5.0.2195.5600); Wed, 12 Feb 2003 13:21:22 +1100 Received: from dilbert.robbins.dropbear.id.au (1cb2hy61q4m0dc47@localhost [127.0.0.1]) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6) with ESMTP id h1C2LF7W099697; Wed, 12 Feb 2003 13:21:17 +1100 (EST) (envelope-from tim@dilbert.robbins.dropbear.id.au) Received: (from tim@localhost) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6/Submit) id h1C2LDk7099696; Wed, 12 Feb 2003 13:21:13 +1100 (EST) (envelope-from tim) Date: Wed, 12 Feb 2003 13:21:13 +1100 From: Tim Robbins To: Sean Chittenden Cc: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/games/random Makefile random.6 random.c randomize_fd.c randomize_fd.h Message-ID: <20030212132113.A99070@dilbert.robbins.dropbear.id.au> References: <200302111932.h1BJWIqU016787@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200302111932.h1BJWIqU016787@repoman.freebsd.org>; from seanc@FreeBSD.org on Tue, Feb 11, 2003 at 11:32:18AM -0800 X-OriginalArrivalTime: 12 Feb 2003 02:21:23.0727 (UTC) FILETIME=[7036C1F0:01C2D23D] Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Feb 11, 2003 at 11:32:18AM -0800, Sean Chittenden wrote: > seanc 2003/02/11 11:32:18 PST > > Modified files: > games/random Makefile random.6 random.c > Added files: > games/random randomize_fd.c randomize_fd.h > Log: > Update random(6) to have the ability to randomize a file/stdin based > off of lines or words. See the man page for details. > > Reviewed by: markm > MFC after: 3 days Please fix the style bugs before MFCing it. Also fix randomize_fd() so that it properly handles the case where read() returns less than the amount of data that was requested so that it can work on FIFOs, character devices, sockets, etc. This looks suspiscious too and will mysteriously break if another option is implemented that takes an argument: 151 if ((fd = open(filename, O_RDONLY, 0)) < 0) 152 err(1, "%s", optarg); Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message