LU-12898 utils: %llu mismatch with type __u64 on ppcle64
Fix build errors like this one on ppcle64:
BUILDSTDERR: libmount_utils_zfs.c: In function 'zfs_mkfs_opts':
BUILDSTDERR: libmount_utils_zfs.c:573:5: error: format '%llu' expects
argument of type 'long long unsigned int', but argument 4 has type
'__u64' [-Werror=format=]
BUILDSTDERR: mop->mo_device_kb * 1024);
__u64 was treated as an unsigned long long which breaks the build on
ppc64le, where they are not the same size.
In printf cases, cast to unsigned long long to match the printf format
so the format is compatible with the type and it is guaranteed
not to lose any data.
In the case of sscanf(), replace the call with strtoull() to eliminate
the issue.
Lustre-change: https://review.whamcloud.com/36558
Lustre-commit:
56b4b112a497661de8dbf5a851c7a045d470deff
Test-Parameters: trivial
Change-Id: I02fd82e0be4d756881c15aa9faedb9b40961661a
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/37130
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>