mirror of
https://github.com/AuxXxilium/kmod.git
synced 2024-11-23 23:10:53 +07:00
tools: kmod: break iteration once a command is executed
This commit is contained in:
parent
895aa13478
commit
ace71985fc
@ -124,10 +124,10 @@ static int handle_kmod_commands(int argc, char *argv[])
|
||||
cmd = argv[optind];
|
||||
|
||||
for (i = 0, err = -EINVAL; i < ARRAY_SIZE(kmod_cmds); i++) {
|
||||
if (strcmp(kmod_cmds[i]->name, cmd) != 0)
|
||||
continue;
|
||||
|
||||
if (strcmp(kmod_cmds[i]->name, cmd) == 0) {
|
||||
err = kmod_cmds[i]->cmd(--argc, ++argv);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (err < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user