Re: parameter value overflow in main.cf

This is a discussion on Re: parameter value overflow in main.cf within the mailing.postfix.users forums, part of the Mail Servers and Related category; On Tue, 3 Feb 2004, Marcin Gryszkalis wrote: > I looked at the code and I think that it would ...


Go Back   Usenet Forums > Mail Servers and Related > mailing.postfix.users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-03-2004
Victor.Duchovni@morganstanley.com
 
Posts: n/a
Default Re: parameter value overflow in main.cf

On Tue, 3 Feb 2004, Marcin Gryszkalis wrote:

> I looked at the code and I think that it would be pretty nice to
> add mail_conf_size.c (we already have bool, int, raw, str and time).
> It would accept k, m and g as units.
> I would also add overflow check there.
>


Presumably this is for byte counts, and the canonical units are Kilobytes,
Megabytes and Gigabytes with upper case prefixes.

If you are going to do this, as with time scales, the default scale should
be the scale of the default value of the parameter. For backwards
compatibility all the existing parameters would need a default scale of
bytes so your units need to be:

1b = 1 byte
1K = 1 Kilo-byte (1024 bytes)
1M = 1 Mega-byte (2^20 bytes)
1G = 1 Giga-byte (2^30 bytes)

And the default values of all "size" units would be modified to end with a
"b".

This will need to wait for the 2.1+ snapshots, too late for 2.1. Wietse,
is the potential increased legibility worth the effort?

--
Viktor.

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:48 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0