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: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2016-03-07 13:14:42 -07:00 committed by Gerrit Code Review
parent 74a82a26b5
commit b1b84a2a66

View File

@ -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;