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> In-Reply-To: <20020515061827.GA47688@hades.hell.gr> References: <20020515061827.GA47688@hades.hell.gr>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
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:
>
> } else {
> + struct stat st;
> +
> filename = path;
> + if (stat(path, &st) < 0 ||
> + S_ISREG(st.st_mode) == 0) {
> + i++; /* Skip to next file. */
> + continue;
> + }
> +
You might not want to declare 'st' with such a local scope; otherwise
looks ok here.
--
Chris D. Faulhaber - jedgar@fxp.org - jedgar@FreeBSD.org
--------------------------------------------------------
FreeBSD: The Power To Serve - http://www.FreeBSD.org
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: FreeBSD: The Power To Serve
iEYEARECAAYFAjziRR0ACgkQObaG4P6BelCi8ACdGJ2J6Mas0OeBtfns/Kd46FI8
oH4AmwcIA+ka1+Bb0rWkeQGIxfOixruk
=WD3t
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020515112309.GA53228>
