Author: bdrewery
Date: Mon Feb 17 16:18:04 2014
New Revision: 262078
URL: http://svnweb.freebsd.org/changeset/base/262078

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/8/usr.sbin/newsyslog/newsyslog.c
Directory Properties:
  stable/8/usr.sbin/newsyslog/   (props changed)

Modified: stable/8/usr.sbin/newsyslog/newsyslog.c
==============================================================================
--- stable/8/usr.sbin/newsyslog/newsyslog.c     Mon Feb 17 16:17:56 2014        
(r262077)
+++ stable/8/usr.sbin/newsyslog/newsyslog.c     Mon Feb 17 16:18:04 2014        
(r262078)
@@ -2248,7 +2248,7 @@ sizefile(const char *file)
 
        if (stat(file, &sb) < 0)
                return (-1);
-       return (kbytes(dbtob(sb.st_blocks)));
+       return (kbytes(sb.st_size));
 }
 
 /*
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to