| 396 | |
| 397 | |
| 398 | static struct test_table *find_cmd_entry(int cmd) |
| 399 | { |
| 400 | int i; |
| 401 | |
| 402 | for (i = 0; test_list[i].cmd != 0x00; i++) |
| 403 | { |
| 404 | if (test_list[i].cmd == cmd) |
| 405 | { |
| 406 | break; |
| 407 | } |
| 408 | } |
| 409 | |
| 410 | if (test_list[i].cmd == 0x00) |
| 411 | { |
| 412 | return NULL; |
| 413 | } |
| 414 | |
| 415 | return &test_list[i]; |
| 416 | } |
| 417 | |
| 418 | |
| 419 | /* Structure for hash table provided by uthash.h |