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

Function dprintf_find_string

freebsd/contrib/openzfs/lib/libzpool/kernel.c:503–523  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

501static int dprintf_print_all;
502
503int
504dprintf_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
525void
526dprintf_setup(int *argc, char **argv)

Callers 3

spa_initFunction · 0.85
dprintf_setupFunction · 0.85
__dprintfFunction · 0.85

Calls 2

strncmpFunction · 0.85
strchrFunction · 0.85

Tested by

no test coverage detected