Commit b1b84a2a authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Gerrit Code Review
Browse files

nvme_manage: use inttypes.h SCN macro for uint64_t



Also switch from %d to %i to allow either decimal or hexidecimal input.

Change-Id: Ia866f9ab804d09e4bf8a2726b8db99208637a5ed
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 74a82a26
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -356,14 +356,14 @@ add_ns(void)
	}

	printf("Please Input Namespace Size (in LBAs): \n");
	if (!scanf("%ld", &ns_size)) {
	if (!scanf("%" SCNi64, &ns_size)) {
		printf("Invalid Namespace Size\n");
		while (getchar() != '\n');
		return;
	}

	printf("Please Input Namespace Capacity (in LBAs): \n");
	if (!scanf("%ld", &ns_capacity)) {
	if (!scanf("%" SCNi64, &ns_capacity)) {
		printf("Invalid Namespace Capacity\n");
		while (getchar() != '\n');
		return;