GNOME Bugzilla – Bug 768239
sizes are wrong with musl libc due to use of non-standard sscanf "%Ld" modifier
Last modified: 2016-10-19 16:24:21 UTC
On Alpine Linux (with musl libc) the used size of ntfs partition is calculated wrong due to sscanf is using %Ld as modifier. POSIX says that %lld should be used for long long. http://pubs.opengroup.org/onlinepubs/9699919799/functions/fscanf.html
Created attachment 330644 [details] [review] 0001-Fix-sscanf-modifier-for-long-long.patch Proposed fix
Hi Natanael, Thank you for the patch. I have also added changing the use of scanf directive "%Lx" to "%llx" in jfs.cc too. Successfully tested on CentOS 5 and Ubuntu 16.04 LTS. Read a range of file system usages: ext*, fat*, jfs, linux_swap, ntfs, xfs; read ntfs >= 5 GIB in size; progress of ext* create and copy using e2image. The following commit has been committed to upstream GIT and will be included in the next release of GParted. Fix sscanf modifier for long long (#768239) https://git.gnome.org/browse/gparted/commit/?id=25209904a9cd368665cb4fbd8dc94ae7dd37f4de Thanks, Mike
This enhancement was included in the GParted 0.27.0 release on October 19, 2016.