| 58 | }; |
| 59 | |
| 60 | static int |
| 61 | DebugCmd(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 |
nothing calls this directly
no test coverage detected