From 050a6d49248024cfa4717fca3b065fdde7f3878b Mon Sep 17 00:00:00 2001 From: Robin Hahling Date: Sun, 16 Nov 2014 11:13:01 +0100 Subject: [PATCH] newsyslog(8): use the size of the file instead of the blocks... ... it takes on disk, as advertised in newsyslog.conf(5). Taken-from: FreeBSD --- usr.sbin/newsyslog/newsyslog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c index 5a447593be..cca5ffb0d9 100644 --- a/usr.sbin/newsyslog/newsyslog.c +++ b/usr.sbin/newsyslog/newsyslog.c @@ -2172,7 +2172,7 @@ sizefile(const char *file) if (stat(file, &sb) < 0) return (-1); - return (kbytes(dbtob(sb.st_blocks))); + return (kbytes(sb.st_size)); } /* Return the age of old log file (file.0) */ -- 2.41.0