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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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. |