nvme_manage: retry the input command instead of just quitting.

Change-Id: Ifd924bcee94bc4e36530b42a07afb5141b150cad
Signed-off-by: lu fan <lux.fan@intel.com>
Reviewed-on: https://review.gerrithub.io/387722
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
lu fan 2017-11-16 22:39:37 +08:00 committed by Jim Harris
parent f539bb0374
commit 2716cd2a76

View File

@ -910,9 +910,10 @@ int main(int argc, char **argv)
bool exit_flag = false;
if (!scanf("%d", &cmd)) {
printf("Invalid Command\n");
printf("Invalid Command: command must be number 1-8\n");
while (getchar() != '\n');
return 0;
usage();
continue;
}
switch (cmd) {
case 1: