| 501 | static int dprintf_print_all; |
| 502 | |
| 503 | int |
| 504 | dprintf_find_string(const char *string) |
| 505 | { |
| 506 | char *tmp_str = dprintf_string; |
| 507 | int len = strlen(string); |
| 508 | |
| 509 | /* |
| 510 | * Find out if this is a string we want to print. |
| 511 | * String format: file1.c,function_name1,file2.c,file3.c |
| 512 | */ |
| 513 | |
| 514 | while (tmp_str != NULL) { |
| 515 | if (strncmp(tmp_str, string, len) == 0 && |
| 516 | (tmp_str[len] == ',' || tmp_str[len] == '\0')) |
| 517 | return (1); |
| 518 | tmp_str = strchr(tmp_str, ','); |
| 519 | if (tmp_str != NULL) |
| 520 | tmp_str++; /* Get rid of , */ |
| 521 | } |
| 522 | return (0); |
| 523 | } |
| 524 | |
| 525 | void |
| 526 | dprintf_setup(int *argc, char **argv) |
no test coverage detected