util/nvmutil: remove errant code
parent
a94bac81f3
commit
b81b51f98b
|
@ -95,8 +95,6 @@ main(int argc, char *argv[])
|
||||||
strMac = strRMac;
|
strMac = strRMac;
|
||||||
else if (strcmp(COMMAND, "swap") == 0)
|
else if (strcmp(COMMAND, "swap") == 0)
|
||||||
cmd = &cmd_swap;
|
cmd = &cmd_swap;
|
||||||
else
|
|
||||||
errno = EINVAL;
|
|
||||||
} else if (argc == 4) {
|
} else if (argc == 4) {
|
||||||
if (strcmp(COMMAND, "setmac") == 0)
|
if (strcmp(COMMAND, "setmac") == 0)
|
||||||
strMac = MAC_ADDRESS;
|
strMac = MAC_ADDRESS;
|
||||||
|
@ -109,21 +107,15 @@ main(int argc, char *argv[])
|
||||||
cmd = &cmd_brick;
|
cmd = &cmd_brick;
|
||||||
else if (strcmp(COMMAND, "copy") == 0)
|
else if (strcmp(COMMAND, "copy") == 0)
|
||||||
cmd = &cmd_copy;
|
cmd = &cmd_copy;
|
||||||
else
|
}
|
||||||
errno = EINVAL;
|
|
||||||
} else
|
|
||||||
errno = EINVAL;
|
|
||||||
|
|
||||||
if (errno != 0)
|
if (errno != 0)
|
||||||
goto nvmutil_exit;
|
goto nvmutil_exit;
|
||||||
|
|
||||||
if (readFromFile(&fd, gbe, FILENAME, flags, SIZE_8KB) != SIZE_8KB)
|
if (readFromFile(&fd, gbe, FILENAME, flags, SIZE_8KB) != SIZE_8KB)
|
||||||
goto nvmutil_exit;
|
goto nvmutil_exit;
|
||||||
|
else if (errno == ENOTDIR)
|
||||||
if (errno == ENOTDIR)
|
|
||||||
errno = 0;
|
errno = 0;
|
||||||
if (errno != 0)
|
|
||||||
goto nvmutil_exit;
|
|
||||||
|
|
||||||
if (strMac != NULL)
|
if (strMac != NULL)
|
||||||
setmac(strMac);
|
setmac(strMac);
|
||||||
|
|
Loading…
Reference in New Issue