|
From: Olivier A. <oli...@co...> - 2011-06-16 12:02:23
|
hello
here is my patch. What is the process to add them ?
it's in production on one of my hobbit plateform.
oau
On Tue, Jun 14, 2011 at 06:33:05PM -0700, Richard Finegold wrote:
> On Tue, Jun 14, 2011 at 04:52, Olivier AUDRY <oli...@co...> wrote:
> > sub octets_to_human
> > 2 {
> > 5 my $size = shift;
> > 7 if ($size > 1099511627776) # TiB: 1024 GiB
> > 8 {
> > 9 return sprintf("%.2f TiB", $size / 1099511627776);
> > 10 }
> > 11 elsif ($size > 1073741824) # GiB: 1024 MiB
> > 12 {
> > 13 return sprintf("%.2f GiB", $size / 1073741824);
> > 14 }
> [snip]
>
> There's a SPEED transform already implemented, with an automatic
> ending of "bps". If this ending and SI prefixes (instead of binary
> prefixes) are acceptable, all is well, no modifications required.
>
> If you want to remove this ending, you should be able to do it with a
> negative SUBSTR transform; I submitted
> http://sourceforge.net/tracker/?func=detail&aid=2963118&group_id=160720&atid=816979
> but I'm not sure if it was accepted (due to lack of persuasive use
> case). A very low impact patch.
>
> If you insist on binary prefixes, duplicating the speeds
> array/trans_speed function in dm_tests.pm is fairly straightforward,
> but that's a much bigger patch.
>
> ------------------------------------------------------------------------------
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev
> _______________________________________________
> Devmon-support mailing list
> Dev...@li...
> https://lists.sourceforge.net/lists/listinfo/devmon-support
|