From owner-freebsd-audit Wed May 15 4:23:13 2002 Delivered-To: freebsd-audit@freebsd.org Received: from svr-ganmtc-appserv-mgmt.ncf.coxexpress.com (svr-ganmtc-appserv-mgmt.ncf.coxexpress.com [24.136.46.5]) by hub.freebsd.org (Postfix) with ESMTP id 0E1E237B408; Wed, 15 May 2002 04:23:10 -0700 (PDT) Received: from darkstar.doublethink.cx (cpe-oca-24-136-59-202-cmcpe.ncf.coxexpress.com [24.136.59.202]) by svr-ganmtc-appserv-mgmt.ncf.coxexpress.com (8.11.4/8.11.4) with ESMTP id g4FBN9701888; Wed, 15 May 2002 07:23:09 -0400 Received: by darkstar.doublethink.cx (Postfix, from userid 1000) id D8C741BD; Wed, 15 May 2002 07:23:09 -0400 (EDT) Date: Wed, 15 May 2002 07:23:09 -0400 From: Chris Faulhaber <jedgar@fxp.org> To: Giorgos Keramidas <keramida@FreeBSD.org> Cc: freebsd-audit@FreeBSD.org Subject: Re: RFC: Port of NetBSD cat(1)'s -f option. Message-ID: <20020515112309.GA53228@darkstar.doublethink.cx> Mail-Followup-To: Chris Faulhaber <jedgar@fxp.org>, Giorgos Keramidas <keramida@FreeBSD.org>, freebsd-audit@FreeBSD.org References: <20020515061827.GA47688@hades.hell.gr> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FCuugMFkClbJLl1L" Content-Disposition: inline In-Reply-To: <20020515061827.GA47688@hades.hell.gr> User-Agent: Mutt/1.3.28i Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: <freebsd-audit.FreeBSD.ORG> List-Archive: <http://docs.freebsd.org/mail/> (Web Archive) List-Help: <mailto:majordomo@FreeBSD.ORG?subject=help> (List Instructions) List-Subscribe: <mailto:majordomo@FreeBSD.ORG?subject=subscribe%20freebsd-audit> List-Unsubscribe: <mailto:majordomo@FreeBSD.ORG?subject=unsubscribe%20freebsd-audit> X-Loop: FreeBSD.ORG --FCuugMFkClbJLl1L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 15, 2002 at 09:18:28AM +0300, Giorgos Keramidas wrote: > Here's a patch that adds to our cat(1) the same functionality as > NetBSD cat(1) when passed -f on the command line. The original > commit log from NetBSD's CVS tree is: >=20 > } else { > + struct stat st; > + > filename =3D path; > + if (stat(path, &st) < 0 || > + S_ISREG(st.st_mode) =3D=3D 0) { > + i++; /* Skip to next file. */ > + continue; > + } > + You might not want to declare 'st' with such a local scope; otherwise looks ok here. --=20 Chris D. Faulhaber - jedgar@fxp.org - jedgar@FreeBSD.org -------------------------------------------------------- FreeBSD: The Power To Serve - http://www.FreeBSD.org --FCuugMFkClbJLl1L Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: FreeBSD: The Power To Serve iEYEARECAAYFAjziRR0ACgkQObaG4P6BelCi8ACdGJ2J6Mas0OeBtfns/Kd46FI8 oH4AmwcIA+ka1+Bb0rWkeQGIxfOixruk =WD3t -----END PGP SIGNATURE----- --FCuugMFkClbJLl1L-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message