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

Function DebugCmd

tools/ngctl/debug.c:60–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58};
59
60static int
61DebugCmd(int ac, char **av)
62{
63 int level;
64
65 /* Get arguments */
66 switch (ac) {
67 case 2:
68 if (!strcmp(av[1], "+"))
69 level = NgSetDebug(-1) + 1;
70 else if (!strcmp(av[1], "-"))
71 level = NgSetDebug(-1) - 1;
72 else if ((level = atoi(av[1])) < 0)
73 return (CMDRTN_USAGE);
74 NgSetDebug(level);
75 break;
76 case 1:
77 printf("Current debug level is %d\n", NgSetDebug(-1));
78 break;
79 default:
80 return (CMDRTN_USAGE);
81 }
82 return (CMDRTN_OK);
83}
84

Callers

nothing calls this directly

Calls 3

strcmpFunction · 0.85
NgSetDebugFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected