[mythtv] how to get "Extra Disk Space" setting?

Richard Gering rg4myth at dutchies.us
Wed Jan 20 00:53:35 UTC 2016


Spot on! To (mis)quote Obi-wan: "Use the source, Luke". You did well :-) 

<soapbox> 

Whomever thought it was a good idea to come up with GiB to mean a 1024-based value and re-purpose GB to mean a 1000-based one did the computing world a disservice. The (ab)use of the SI multipliers K, M and G to mean a 1024-based value in describing computer memory size started LONG before the hard-disk industry started pushing 1000-based numbers, likely to make their disks look larger than they actually were. 

Yes, it is technically more correct to have GB be 1000-based (10-base) instead of 1024-based (2-base), but changing the meaning ignores decades worth of history. This mess could also have been cleaned up by creating a unique name for the new "true SI" multiplier based values instead of changing the meaning of the old one, as right now you have no idea what you're looking at unless you examine the code, as it will depend on when the app was written, whether the developers know about GB vs. GiB and whether they care to followed the new scheme. 

</soapbox> 

Glad you found the true meaning of the value, though! 

Cheers, 

- Richard. 


From: "Jerome Yuzyk" <jerome at supernet.ab.ca> 
To: "MythTV-dev" <mythtv-dev at mythtv.org> 
Sent: Tuesday, January 19, 2016 4:33:03 PM 
Subject: Re: [mythtv] how to get "Extra Disk Space" setting? 



On Wednesday, January 20, 2016 11:09:27 AM Nigel Pearson wrote: 

> 

> On 20 Jan 2016, at 10:40 am, Jerome Yuzyk <jerome at supernet.ab.ca> wrote: 

> > 

> > Got it. Is that value GB (1000 ** 3) or GiB (1024 ** 3)? 

> 

> 

> Googled for "MythTV AutoExpireExtraSpace: and looked for some code, and: 

> 

> 

> http://www.cuymedia.com/mythtv-jya/mythtv_2programs_2mythfrontend_2globalsettings_8cpp_source.html 

> 

>
> 

> 00326 static GlobalSpinBox *AutoExpireExtraSpace() 

> 00327 { 

> 00328 GlobalSpinBox *bs = new GlobalSpinBox("AutoExpireExtraSpace", 0, 200, 1); 

> 00329 bs->setLabel(QObject::tr("Extra disk space (GB)")); 

> 00330 bs->setHelpText(QObject::tr("Extra disk space (in gigabytes) beyond what " 

> 00331 "MythTV requires that you want to keep free on the " 

> 00332 "recording file systems.")); 

> 00333 bs->setValue(1); 

> 00334 return bs; 

> 00335 }; 



Thanks! Inspired by that I dug a little deeper and it seems autoexpire.cpp uses GiB (1024-based) which makes sense, but I needed to verify that since the UI says GB. 



-- 

A little of Jerome's MythTV World: http://mythtv.bss.ab.ca 
_______________________________________________ 
mythtv-dev mailing list 
mythtv-dev at mythtv.org 
http://lists.mythtv.org/mailman/listinfo/mythtv-dev 
http://wiki.mythtv.org/Mailing_List_etiquette 
MythTV Forums: https://forum.mythtv.org 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20160120/f2150dec/attachment.html>


More information about the mythtv-dev mailing list