Lines Matching refs:token
142 get_token(char **token, char *str, char *delim) in get_token() argument
148 *token = NULL; in get_token()
173 if ((*token = malloc(len)) == NULL) { in get_token()
178 (void) strlcpy(*token, start, len); in get_token()
188 *token = s_strdup(start); in get_token()
511 char *token, *parsestr; in cvt_metal_kernel() local
530 if ((parsestr = get_token(&token, parsestr, " \t,")) == NULL) { in cvt_metal_kernel()
531 if (token != NULL) in cvt_metal_kernel()
532 free(token); in cvt_metal_kernel()
537 if (strncmp(token, BFLAG, strlen(BFLAG)) != 0) { in cvt_metal_kernel()
538 free(token); in cvt_metal_kernel()
542 free(token); in cvt_metal_kernel()
544 while ((parsestr = get_token(&token, parsestr, ",")) != NULL) { in cvt_metal_kernel()
545 (void) cvt_metal_option(token); in cvt_metal_kernel()
546 free(token); in cvt_metal_kernel()
549 if (token != NULL) { in cvt_metal_kernel()
550 (void) cvt_metal_option(token); in cvt_metal_kernel()
551 free(token); in cvt_metal_kernel()
566 char *token, *parsestr; in cvt_hyper_kernel() local
568 parsestr = get_token(&token, kernel, " \t,"); in cvt_hyper_kernel()
570 if (token == NULL) in cvt_hyper_kernel()
578 if (strncmp(token, METAL_KERNEL_DIR, strlen(METAL_KERNEL_DIR)) == 0) { in cvt_hyper_kernel()
580 free(token); in cvt_hyper_kernel()
584 free(token); in cvt_hyper_kernel()
587 while ((parsestr = get_token(&token, parsestr, " ")) != NULL) { in cvt_hyper_kernel()
588 (void) cvt_hyper_option(token); in cvt_hyper_kernel()
589 free(token); in cvt_hyper_kernel()
592 if (token != NULL) { in cvt_hyper_kernel()
593 (void) cvt_hyper_option(token); in cvt_hyper_kernel()
594 free(token); in cvt_hyper_kernel()
607 char *token = NULL; in cvt_hyper_module() local
623 ((parsestr = get_token(&token, parsestr, " \t,")) == NULL)) { in cvt_hyper_module()
624 if (token != NULL) in cvt_hyper_module()
625 free(token); in cvt_hyper_module()
629 if (token == NULL) in cvt_hyper_module()
633 if (strncmp(token, BFLAG, strlen(BFLAG)) != 0) { in cvt_hyper_module()
634 free(token); in cvt_hyper_module()
638 free(token); in cvt_hyper_module()
641 while ((parsestr = get_token(&token, parsestr, ",")) != NULL) { in cvt_hyper_module()
642 (void) cvt_hyper_option(token); in cvt_hyper_module()
643 free(token); in cvt_hyper_module()
646 if (token != NULL) { in cvt_hyper_module()
647 (void) cvt_hyper_option(token); in cvt_hyper_module()
648 free(token); in cvt_hyper_module()
676 char *parsestr, *token; in parse_bootenvrc() local
684 if ((parsestr = get_token(&token, line, " \t")) == NULL) { in parse_bootenvrc()
685 if (token != NULL) in parse_bootenvrc()
686 free(token); in parse_bootenvrc()
691 if (strcmp(token, "setprop") != 0) { in parse_bootenvrc()
692 free(token); in parse_bootenvrc()
696 free(token); in parse_bootenvrc()
699 if ((parsestr = get_token(&token, parsestr, " \t")) == NULL) { in parse_bootenvrc()
700 if (token != NULL) in parse_bootenvrc()
701 free(token); in parse_bootenvrc()
706 if (strcmp(token, "console") == 0) { in parse_bootenvrc()
707 free(token); in parse_bootenvrc()
710 parsestr = get_token(&token, parsestr, " \t"); in parse_bootenvrc()
711 if (token == NULL) in parse_bootenvrc()
717 bootenv_rc_console = s_strdup(token); in parse_bootenvrc()
722 if (strcmp(token, "ttya-mode") == 0) { in parse_bootenvrc()
723 free(token); in parse_bootenvrc()
725 } else if (strcmp(token, "ttyb-mode") == 0) { in parse_bootenvrc()
726 free(token); in parse_bootenvrc()
730 free(token); in parse_bootenvrc()
735 parsestr = get_token(&token, parsestr, " \t"); in parse_bootenvrc()
737 if (token == NULL) in parse_bootenvrc()
743 bootenv_rc_serial[port] = s_strdup(token); in parse_bootenvrc()
744 free(token); in parse_bootenvrc()