util/nvmutil: remove errant code

fsdg20230625
Leah Rowe 2022-11-27 00:39:06 +00:00
parent a94bac81f3
commit b81b51f98b
1 changed files with 2 additions and 10 deletions

View File

@ -95,8 +95,6 @@ main(int argc, char *argv[])
strMac = strRMac;
else if (strcmp(COMMAND, "swap") == 0)
cmd = &cmd_swap;
else
errno = EINVAL;
} else if (argc == 4) {
if (strcmp(COMMAND, "setmac") == 0)
strMac = MAC_ADDRESS;
@ -109,21 +107,15 @@ main(int argc, char *argv[])
cmd = &cmd_brick;
else if (strcmp(COMMAND, "copy") == 0)
cmd = &cmd_copy;
else
errno = EINVAL;
} else
errno = EINVAL;
}
if (errno != 0)
goto nvmutil_exit;
if (readFromFile(&fd, gbe, FILENAME, flags, SIZE_8KB) != SIZE_8KB)
goto nvmutil_exit;
if (errno == ENOTDIR)
else if (errno == ENOTDIR)
errno = 0;
if (errno != 0)
goto nvmutil_exit;
if (strMac != NULL)
setmac(strMac);