Re: How to interrogate optical discs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 16, 2010 at 8:29 AM, Richard Shaw <hobbes1069@xxxxxxxxx> wrote:
> On Wed, Jun 16, 2010 at 7:59 AM, Bruno Wolff III <bruno@xxxxxxxx> wrote:
>> On Tue, Jun 15, 2010 at 20:38:56 -0500,
>>  Richard Shaw <hobbes1069@xxxxxxxxx> wrote:
>>> 3        iso_size = math.ceil(file_size/(2*1024))*2*1024
>>
>> With loose typing the about might be doing the division as integer division.
>> One possible fix would be:
>> iso_size = ((file_size + ((2*1024)-1))/(2*1024))*(2*1024)
>
> I eventually came to the same conclusion last night, I changed that
> line to the following:
>
> iso_size = math.ceil(file_size/(2.0**11))*(2.0**11)
>
> The "2.0" trips it over to floating point math, but I didn't see any
> significant difference in the disc_size calculation.

I think I've figured out part of the problem. It looks like if I file
is over a certain size, the system reports the size already rounded up
by the file system block size. I think my ext4 partition is using a 4k
block size. I tried getting the file size of many files, and
everything but the smallest files came out even in 4k chunks. I had
one small file only at 92 bytes that I get get a file size with
significant decimal places.

I have no idea how to get around this to get the true file size and
then round up the 2k block size of an ISO.

Any ideas?

Richard
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux