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()
179 (void) strlcpy(*token, start, len); in get_token()
189 *token = s_strdup(start); in get_token()
512 char *token, *parsestr; in cvt_metal_kernel() local
532 if ((parsestr = get_token(&token, parsestr, " \t,")) == NULL) { in cvt_metal_kernel()
533 if (token != NULL) in cvt_metal_kernel()
534 free(token); in cvt_metal_kernel()
539 if (strncmp(token, BFLAG, strlen(BFLAG)) != 0) { in cvt_metal_kernel()
540 free(token); in cvt_metal_kernel()
544 free(token); in cvt_metal_kernel()
546 while ((parsestr = get_token(&token, parsestr, ",")) != NULL) { in cvt_metal_kernel()
547 (void) cvt_metal_option(token); in cvt_metal_kernel()
548 free(token); in cvt_metal_kernel()
551 if (token != NULL) { in cvt_metal_kernel()
552 (void) cvt_metal_option(token); in cvt_metal_kernel()
553 free(token); in cvt_metal_kernel()
568 char *token, *parsestr; in cvt_hyper_kernel() local
570 parsestr = get_token(&token, kernel, " \t,"); in cvt_hyper_kernel()
572 if (token == NULL) in cvt_hyper_kernel()
580 if (strncmp(token, METAL_KERNEL_DIR, strlen(METAL_KERNEL_DIR)) == 0) { in cvt_hyper_kernel()
583 free(token); in cvt_hyper_kernel()
587 free(token); in cvt_hyper_kernel()
590 while ((parsestr = get_token(&token, parsestr, " ")) != NULL) { in cvt_hyper_kernel()
591 (void) cvt_hyper_option(token); in cvt_hyper_kernel()
592 free(token); in cvt_hyper_kernel()
595 if (token != NULL) { in cvt_hyper_kernel()
596 (void) cvt_hyper_option(token); in cvt_hyper_kernel()
597 free(token); in cvt_hyper_kernel()
610 char *token = NULL; in cvt_hyper_module() local
626 ((parsestr = get_token(&token, parsestr, " \t,")) == NULL)) { in cvt_hyper_module()
627 if (token != NULL) in cvt_hyper_module()
628 free(token); in cvt_hyper_module()
632 if (token == NULL) in cvt_hyper_module()
636 if (strncmp(token, BFLAG, strlen(BFLAG)) != 0) { in cvt_hyper_module()
637 free(token); in cvt_hyper_module()
641 free(token); in cvt_hyper_module()
644 while ((parsestr = get_token(&token, parsestr, ",")) != NULL) { in cvt_hyper_module()
645 (void) cvt_hyper_option(token); in cvt_hyper_module()
646 free(token); in cvt_hyper_module()
649 if (token != NULL) { in cvt_hyper_module()
650 (void) cvt_hyper_option(token); in cvt_hyper_module()
651 free(token); in cvt_hyper_module()
680 char *parsestr, *token; in parse_bootenvrc() local
688 if ((parsestr = get_token(&token, line, " \t")) == NULL) { in parse_bootenvrc()
689 if (token != NULL) in parse_bootenvrc()
690 free(token); in parse_bootenvrc()
695 if (strcmp(token, "setprop") != 0) { in parse_bootenvrc()
696 free(token); in parse_bootenvrc()
700 free(token); in parse_bootenvrc()
703 if ((parsestr = get_token(&token, parsestr, " \t")) == NULL) { in parse_bootenvrc()
704 if (token != NULL) in parse_bootenvrc()
705 free(token); in parse_bootenvrc()
710 if (strcmp(token, "console") == 0) { in parse_bootenvrc()
711 free(token); in parse_bootenvrc()
714 parsestr = get_token(&token, parsestr, " \t"); in parse_bootenvrc()
715 if (token == NULL) in parse_bootenvrc()
721 bootenv_rc_console = s_strdup(token); in parse_bootenvrc()
726 if (strcmp(token, "ttya-mode") == 0) { in parse_bootenvrc()
727 free(token); in parse_bootenvrc()
729 } else if (strcmp(token, "ttyb-mode") == 0) { in parse_bootenvrc()
730 free(token); in parse_bootenvrc()
734 free(token); in parse_bootenvrc()
739 parsestr = get_token(&token, parsestr, " \t"); in parse_bootenvrc()
741 if (token == NULL) in parse_bootenvrc()
747 bootenv_rc_serial[port] = s_strdup(token); in parse_bootenvrc()
748 free(token); in parse_bootenvrc()