Lines Matching refs:token

132  * Set "token" to be the the string starting from the pointer "str" delimited
139 * memory for the new token string.
142 get_token(char **token, char *str, char *delim)
148 *token = NULL;
172 /* found a delimiter, so create a token string */
173 if ((*token = malloc(len)) == NULL) {
179 (void) strlcpy(*token, start, len);
188 /* if we hit the end of the string, the token is the whole string */
189 *token = s_strdup(start);
389 * If there's no "=" in the token, it's likely a standalone
390 * hypervisor token we don't care about (e.g. "noreboot" or
512 char *token, *parsestr;
532 if ((parsestr = get_token(&token, parsestr, " \t,")) == NULL) {
533 if (token != NULL)
534 free(token);
538 /* if the next token is "-B" process boot options */
539 if (strncmp(token, BFLAG, strlen(BFLAG)) != 0) {
540 free(token);
544 free(token);
546 while ((parsestr = get_token(&token, parsestr, ",")) != NULL) {
547 (void) cvt_metal_option(token);
548 free(token);
551 if (token != NULL) {
552 (void) cvt_metal_option(token);
553 free(token);
568 char *token, *parsestr;
570 parsestr = get_token(&token, kernel, " \t,");
572 if (token == NULL)
580 if (strncmp(token, METAL_KERNEL_DIR, strlen(METAL_KERNEL_DIR)) == 0) {
583 free(token);
587 free(token);
590 while ((parsestr = get_token(&token, parsestr, " ")) != NULL) {
591 (void) cvt_hyper_option(token);
592 free(token);
595 if (token != NULL) {
596 (void) cvt_hyper_option(token);
597 free(token);
610 char *token = NULL;
626 ((parsestr = get_token(&token, parsestr, " \t,")) == NULL)) {
627 if (token != NULL)
628 free(token);
632 if (token == NULL)
636 if (strncmp(token, BFLAG, strlen(BFLAG)) != 0) {
637 free(token);
641 free(token);
644 while ((parsestr = get_token(&token, parsestr, ",")) != NULL) {
645 (void) cvt_hyper_option(token);
646 free(token);
649 if (token != NULL) {
650 (void) cvt_hyper_option(token);
651 free(token);
680 char *parsestr, *token;
688 if ((parsestr = get_token(&token, line, " \t")) == NULL) {
689 if (token != NULL)
690 free(token);
695 if (strcmp(token, "setprop") != 0) {
696 free(token);
700 free(token);
703 if ((parsestr = get_token(&token, parsestr, " \t")) == NULL) {
704 if (token != NULL)
705 free(token);
710 if (strcmp(token, "console") == 0) {
711 free(token);
714 parsestr = get_token(&token, parsestr, " \t");
715 if (token == NULL)
721 bootenv_rc_console = s_strdup(token);
726 if (strcmp(token, "ttya-mode") == 0) {
727 free(token);
729 } else if (strcmp(token, "ttyb-mode") == 0) {
730 free(token);
734 free(token);
739 parsestr = get_token(&token, parsestr, " \t");
741 if (token == NULL)
747 bootenv_rc_serial[port] = s_strdup(token);
748 free(token);