Mailinglist Archive: opensuse-storage (4 mails)

< Previous Next >
Re: [opensuse-storage] Sizes in yast-storage-ng after introducing alignment in libstorage-ng
Franky, I didn't find it that intuitive before. :-/

I tend more to solution 2.

On Wednesday 2016-06-15 10:59, Ancor Gonzalez Sosa wrote:

Solution 2
==========

We could rename all the methods in the ruby layer that return a DiskSize
object to something like #disk_size. So #size is always a Fixnum (bytes)
and #disk_size is always a DiskSize object. For example

FreeDiskSpace#disk_size #=> DiskSize

In addition, I would add DiskSize#bytes as a more readable alias for
DiskSize#size, resulting in things like this:

Or DiskSize#to_i?

BTW, we have also the ::Storage::Region class where sizes are returned in
*sectors*.

Also, I would change the DiskSize implementation so that -1 is no longer a special value.


Steffen
--
To unsubscribe, e-mail: opensuse-storage+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-storage+owner@xxxxxxxxxxxx

< Previous Next >
List Navigation
References