]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix an old bug in newsyslog where we kept one log file more than was
authorsimon <simon@FreeBSD.org>
Thu, 21 Apr 2011 16:31:05 +0000 (16:31 +0000)
committersimon <simon@FreeBSD.org>
Thu, 21 Apr 2011 16:31:05 +0000 (16:31 +0000)
commit5a46569c8d5ce5e53e7a60289af3986857568c7f
tree94a194499363689de697d96d4221f051c1803c68
parent2e668e262f35385cf5c738221ad870f0fc0f75d1
Fix an old bug in newsyslog where we kept one log file more than was
requested in newsyslog.conf.  This was only the case using the non-time
based filenames (.0, .1, .2 etc.).

The change also makes newsyslog clean clean up the old extra logfile so
users don't end up with a single stale logfile which won't be rotated
out.

This change also cleans up some code a bit to avoid more copy / paste
code and removes some old copy / paste code in the process.

PR: bin/76697
MFC after: 2 weeks
usr.sbin/newsyslog/newsyslog.c