Date: Wed, 29 May 2013 19:55:27 -0500 From: Brooks Davis <brooks@FreeBSD.org> To: Mark Johnston <markj@FreeBSD.org> Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-9@FreeBSD.org Subject: Re: svn commit: r251113 - stable/9/usr.sbin/newsyslog Message-ID: <20130530005527.GA29026@lor.one-eyed-alien.net> In-Reply-To: <20130529223717.GB59966@raichu> References: <201305292230.r4TMUUPX079884@svn.freebsd.org> <20130529223717.GB59966@raichu>
next in thread | previous in thread | raw e-mail | index | archive | help
--cWoXeonUoKmBZSoM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 29, 2013 at 06:37:17PM -0400, Mark Johnston wrote: > I'm very sorry about this. I was going to merge r235647 first so that I > wouldn't make the same mistake a second time, but I decided against it > when I saw that the commit extended beyond newsyslog, and then managed > to do the MFC incorrectly after verifying that newsyslog built on the > stable branches. Is it possible to only do the newsyslog portion of this > MFC, or is it a rule that either all or none of a given revision should > be merged to the stable branches? The approved way to merge a change like r235647 would be per-library and per-program so only merging changes to a single program would be fine. -- Brooks >=20 > Sorry again, > -Mark >=20 > On Wed, May 29, 2013 at 10:30:30PM +0000, Mark Johnston wrote: > > Author: markj > > Date: Wed May 29 22:30:29 2013 > > New Revision: 251113 > > URL: http://svnweb.freebsd.org/changeset/base/251113 > >=20 > > Log: > > Revert my previous merge. There's a variable name difference between = head > > and stable (dirfd vs. dir_fd) and I managed to get it wrong again whe= n I > > did the MFC, even after I tested. > >=20 > > Modified: > > stable/9/usr.sbin/newsyslog/newsyslog.c > > Directory Properties: > > stable/9/usr.sbin/newsyslog/ (props changed) > >=20 > > Modified: stable/9/usr.sbin/newsyslog/newsyslog.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- stable/9/usr.sbin/newsyslog/newsyslog.c Wed May 29 22:29:33 2013 (r= 251112) > > +++ stable/9/usr.sbin/newsyslog/newsyslog.c Wed May 29 22:30:29 2013 (r= 251113) > > @@ -1450,27 +1450,16 @@ oldlog_entry_compare(const void *a, cons > > * tm if this is the case; otherwise return false. > > */ > > static int > > -validate_old_timelog(int fd, const struct dirent *dp, const char *logf= name, > > - struct tm *tm) > > +validate_old_timelog(const struct dirent *dp, const char *logfname, st= ruct tm *tm) > > { > > - struct stat sb; > > size_t logfname_len; > > char *s; > > int c; > > =20 > > logfname_len =3D strlen(logfname); > > =20 > > - if (dp->d_type !=3D DT_REG) { > > - /* > > - * Some filesystems (e.g. NFS) don't fill out the d_type field > > - * and leave it set to DT_UNKNOWN; in this case we must obtain > > - * the file type ourselves. > > - */ > > - if (dp->d_type !=3D DT_UNKNOWN || > > - fstatat(fd, dp->d_name, &sb, AT_SYMLINK_NOFOLLOW) !=3D 0 || > > - !S_ISREG(sb.st_mode)) > > - return (0); > > - } > > + if (dp->d_type !=3D DT_REG) > > + return (0); > > /* Ignore everything but files with our logfile prefix. */ > > if (strncmp(dp->d_name, logfname, logfname_len) !=3D 0) > > return (0); > > @@ -1556,7 +1545,7 @@ delete_oldest_timelog(const struct conf_ > > err(1, "Cannot open log directory '%s'", dir); > > dirfd =3D dirfd(dirp); > > while ((dp =3D readdir(dirp)) !=3D NULL) { > > - if (validate_old_timelog(dir_fd, dp, logfname, &tm) =3D=3D 0) > > + if (validate_old_timelog(dp, logfname, &tm) =3D=3D 0) > > continue; > > =20 > > /* > > @@ -2321,10 +2310,10 @@ mtime_old_timelog(const char *file) > > dir_fd =3D dirfd(dirp); > > /* Open the archive dir and find the most recent archive of logfname.= */ > > while ((dp =3D readdir(dirp)) !=3D NULL) { > > - if (validate_old_timelog(dir_fd, dp, logfname, &tm) =3D=3D 0) > > + if (validate_old_timelog(dp, logfname, &tm) =3D=3D 0) > > continue; > > =20 > > - if (fstatat(dir_fd, logfname, &sb, AT_SYMLINK_NOFOLLOW) =3D=3D -1) { > > + if (fstatat(dir_fd, logfname, &sb, 0) =3D=3D -1) { > > warn("Cannot stat '%s'", file); > > continue; > > } >=20 --cWoXeonUoKmBZSoM Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFRpqN/XY6L6fI4GtQRAlWvAKCfo1o7ShOOvE56C8UJAzCIFtmbYQCZAYsQ Y8wYpxVeZGwlqaKU7QvsqnA= =SDiT -----END PGP SIGNATURE----- --cWoXeonUoKmBZSoM--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130530005527.GA29026>