Package: dvd+rw-tools
Version: 7.1-14build1
Severity: wishlist

This would add human-readable sizes to the output. To accomplish this, my 
suggestion would be to re-use code from ls, which has this option too (both 
short and long forms).

Note: "G" means "GiB" (1024*1024*1024 bytes). 1 GB is 1000*1000*1000 bytes. To 
clear up confusion, I suggest listing both sizes, given that recordable optical 
media is advertised with their GB size.

Usage:

dvd+rw-mediainfo /dev/sr0 -h
dvd+rw-mediainfo /dev/sr0 --human-readable

Example output (excerpt):
~~~~
READ TRACK INFORMATION[#1]:
 Track State:           partial incremental
 Track Start Address:   0*2KB (0 K, 0 KB)
 Free Blocks:           0*2KB (0 K, 0 KB)
 Track Size:            48877696*2KB=100101521408 (93.2 G, 100.1 GB)
 Last Recorded Address: 48877679*2KB=100101486592 (93.2 G, 100.1 GB)
FABRICATED TOC:
 Track#1  :             14@0
 Track#AA :             14@48877680
 Multi-session Info:    #1@0
READ CAPACITY:          48877680*2048=100101488640 (93.2 G, 100.1 GB)
~~~~

A value in the megabyte range could look like this:

~~~~
Track Size:            438848*2KB=898760704 (857.1 M, 898.7 MB)
~~~~

A value in the kilobyte range could look like this:

~~~~
Track Size:            448*2KB=917504 (896.0 K, 917.5 KB)
~~~~

I also suggest implementing human-readable terabytes for future-proofness. 
There is a chance a terabyte-sized optical disc format will be released in the 
coming 10-20 years, so it would be good to get this out of the way early. If 
the code from ls is re-used, this will be included anyway.

Reply via email to