MCPcopy Create free account
hub / github.com/F-Stack/f-stack / get_action

Function get_action

tools/knictl/knictl.c:13–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11}
12
13enum FF_KNICTL_CMD get_action(const char *c){
14 if (!c)
15 return FF_KNICTL_ACTION_MAX;
16 if (0 == strcasecmp(c, "alltokni")){
17 return FF_KNICTL_ACTION_ALL_TO_KNI;
18 } else if (0 == strcasecmp(c, "alltoff")){
19 return FF_KNICTL_ACTION_ALL_TO_FF;
20 } else if (0 == strcasecmp(c, "default")){
21 return FF_KNICTL_ACTION_DEFAULT;
22 } else {
23 return FF_KNICTL_ACTION_MAX;
24 }
25}
26
27const char * get_action_str(enum FF_KNICTL_CMD cmd){
28 switch (cmd)

Callers 1

mainFunction · 0.85

Calls 1

strcasecmpFunction · 0.85

Tested by

no test coverage detected