Whamcloud - gitweb
LU-14460 lnet: fix mismatched printf format 62/44162/4
authorOriginal Author Lei Feng <flei@whamcloud.com>
Thu, 25 Feb 2021 00:31:56 +0000 (08:31 +0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 9 Nov 2021 03:35:56 +0000 (03:35 +0000)
Original "%llx" does not work on all platforms. Fix it.

Lustre-change: https://review.whamcloud.com/41755
Lustre-commit: 58e05ff5af3d1fcd7b059dc56955a5f8d94db4ab

Signed-off-by: Lei Feng <flei@whamcloud.com>
Change-Id: I2edecbf66ccb2141c72294d324ade79574f5c084
Test-Parameters: trivial fortestonly
Signed-off-by: Gian-Carlo DeFazio <defazio1@llnl.gov>
Reviewed-on: https://review.whamcloud.com/44162
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/utils/lnetctl.c

index 2328d00..eeb26d4 100644 (file)
@@ -272,7 +272,7 @@ static int jt_calc_service_id(int argc, char **argv)
         * cYAML currently doesn't support printing hex values.
         * Therefore just print it locally here
         */
-       printf("service id:\n    value: 0x%llx\n", service_id);
+       printf("service id:\n    value: 0x%jx\n", (uintmax_t)service_id);
 
        return rc;
 }