On 2011-05-17 11.50, Nathanael Rensen wrote:
> Poking around in newsyslog(8) I noticed:
> 
> $ grep MIN_SIZE newsyslog.c
> #define       MIN_SIZE        256             /* Don't rotate if smaller (in 
> bytes) */
>           && ((ent->flags & CE_BINARY) || size >= MIN_SIZE)))) {
> 
> hence:

I don't know about the rest of you guys, but to me it would make more
sense to change MIN_SIZE to 512, which after all is the traditional size
of a disk block. Not that it matters all that much nowadays, but it's
still a size that has a nice, cozy feeling of recognition about it. :-)


Regards,
/Benny


> Index: newsyslog.8
> ===================================================================
> RCS file: /cvs/src/usr.bin/newsyslog/newsyslog.8,v
> retrieving revision 1.45
> diff -u -p -r1.45 newsyslog.8
> --- newsyslog.8       28 Nov 2009 14:42:04 -0000      1.45
> +++ newsyslog.8       17 May 2011 09:40:13 -0000
> @@ -213,7 +213,7 @@ or set to
>  then the size of
>  the log file is not taken into account when determining when to trim the
>  log file.
> -By default, files smaller than 512 bytes are not rotated unless the
> +By default, files smaller than 256 bytes are not rotated unless the
>  .Sq B
>  (binary) flag is set or the
>  .Fl F
> 
> Index: newsyslog.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/newsyslog/newsyslog.c,v
> retrieving revision 1.88
> diff -u -p -r1.88 newsyslog.c
> --- newsyslog.c       24 Jul 2010 00:54:46 -0000      1.88
> +++ newsyslog.c       17 May 2011 09:40:14 -0000
> @@ -898,7 +898,7 @@ compress_log(struct conf_entry *ent)
>       }
>  }
> 
> -/* Return size in kilobytes of a file */
> +/* Return size in bytes of a file */
>  off_t
>  sizefile(struct stat *sb)
>  {
> 
> Nathanael
> 

-- 
internetlabbet.se     / work:   +46 8 551 124 80      / "Words must
Benny Lvfgren        /  mobile: +46 70 718 11 90     /   be weighed,
                    /   fax:    +46 8 551 124 89    /    not counted."
                   /    email:  benny -at- internetlabbet.se

Reply via email to