]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r235647 for newsyslog (by gleb):
authormarkj <markj@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 8 Jun 2013 15:46:09 +0000 (15:46 +0000)
committermarkj <markj@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 8 Jun 2013 15:46:09 +0000 (15:46 +0000)
commitbe411516754c26bbb6d8a62c697079ff172c975a
tree45d84a4f58c50d7d772791be8f29910f52ddaf68
parent34f85d8aa67d0504464c4f49861e7406fd4e7fc0
MFC r235647 for newsyslog (by gleb):
Hide DIR definition by making it an opaque struct typedef.

Introduce dirfd() libc exported symbol replacing macro with same name,
preserve _dirfd() macro for internal use.

Replace dirp->dd_fd with dirfd() call. Avoid using dirfd as variable
name to prevent shadowing global symbol.

MFC r250545:
Some filesystems (NFS in particular) do not fill out the d_type field when
returning directory entries through readdir(3). In this case we need to
obtain the file type ourselves; otherwise newsyslog -t will not be able to
find archived log files and will fail to both delete old log files and to
do interval-based rotations properly.

MFC r251240:
We want to stat the archived log file rather than the logfile itself.

git-svn-id: svn://svn.freebsd.org/base/stable/8@251533 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.sbin/newsyslog/newsyslog.c