ID: 113 - delloem exec file won't handle more than one command

Commit fixes issue with 'delloem' subcommands being executed via 'exec'. State
of variable 'current_arg' is kept between calls which leads to incorrect argv
parsing.
Set variable 'current_arg' every time ipmi_delloem_main() is called.
This commit is contained in:
Zdenek Styblik 2013-07-09 11:10:03 +00:00
parent 47d53000ce
commit 287b313e26

View File

@ -257,6 +257,7 @@ int
ipmi_delloem_main(struct ipmi_intf * intf, int argc, char ** argv) ipmi_delloem_main(struct ipmi_intf * intf, int argc, char ** argv)
{ {
int rc = 0; int rc = 0;
current_arg = 0;
if (argc == 0 || strncmp(argv[0], "help\0", 5) == 0) { if (argc == 0 || strncmp(argv[0], "help\0", 5) == 0) {
usage(); usage();
return 0; return 0;