Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Feb 2014 16:07:58 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r262076 - stable/9/usr.sbin/newsyslog
Message-ID:  <201402171607.s1HG7woK026558@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Mon Feb 17 16:07:58 2014
New Revision: 262076
URL: http://svnweb.freebsd.org/changeset/base/262076

Log:
  MFC r261401:
  
    Fix newsyslog(8) to use the size of the file instead of the blocks it
    takes on disk, as advertised in newsyslog.conf(5).
  
  Approved by:	bapt (mentor, implicit)

Modified:
  stable/9/usr.sbin/newsyslog/newsyslog.c
Directory Properties:
  stable/9/usr.sbin/newsyslog/   (props changed)

Modified: stable/9/usr.sbin/newsyslog/newsyslog.c
==============================================================================
--- stable/9/usr.sbin/newsyslog/newsyslog.c	Mon Feb 17 15:57:16 2014	(r262075)
+++ stable/9/usr.sbin/newsyslog/newsyslog.c	Mon Feb 17 16:07:58 2014	(r262076)
@@ -2282,7 +2282,7 @@ sizefile(const char *file)
 
 	if (stat(file, &sb) < 0)
 		return (-1);
-	return (kbytes(dbtob(sb.st_blocks)));
+	return (kbytes(sb.st_size));
 }
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402171607.s1HG7woK026558>