[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-ddrescue] Feature request: Print drive size even if drive name
Re: [Bug-ddrescue] Feature request: Print drive size even if drive name is available
Wed, 7 Sep 2016 18:45:38 +0200
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0 SeaMonkey/2.40
Antonio Diaz Diaz wrote:
Christian Franke wrote:
it is very useful that the drive name+serial is printed on --ask if
known. But unfortunately the size is no longer printed then.
An additional size info would be in particular useful when a partition
is addressed (e.g. /dev/sda3) instead of the whole drive.
Thanks for the suggestion. I'll see how (or if) this can be
implemented correctly (showing the real size of the partition).
The "size = lseek(fd, 0, SEEK_END)" method already in
device_id_or_size() also works for partitions.
Without --enable-non-posix, ddrescue-1.21 --ask shows the correct size
of disks, partitions and CD/DVDs (at least on Linux and Windows).
I would suggest:
For regular files: Keep current behavior (Print size only, empty if file
does not exist)
If device_id() succeeds: Print the DEVICE_ID and the size.
Otherwise: Print some fixed string (e.g. "UNKNOWN") and the size.