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) {
178 (void) strlcpy(*token, start, len);
187 /* if we hit the end of the string, the token is the whole string */
188 *token = s_strdup(start);
388 * If there's no "=" in the token, it's likely a standalone
389 * hypervisor token we don't care about (e.g. "noreboot" or
511 char *token, *parsestr;
530 if ((parsestr = get_token(&token, parsestr, " \t,")) == NULL) {
531 if (token != NULL)
532 free(token);
536 /* if the next token is "-B" process boot options */
537 if (strncmp(token, BFLAG, strlen(BFLAG)) != 0) {
538 free(token);
542 free(token);
544 while ((parsestr = get_token(&token, parsestr, ",")) != NULL) {
545 (void) cvt_metal_option(token);
546 free(token);
549 if (token != NULL) {
550 (void) cvt_metal_option(token);
551 free(token);
566 char *token, *parsestr;
568 parsestr = get_token(&token, kernel, " \t,");
570 if (token == NULL)
578 if (strncmp(token, METAL_KERNEL_DIR, strlen(METAL_KERNEL_DIR)) == 0) {
580 free(token);
584 free(token);
587 while ((parsestr = get_token(&token, parsestr, " ")) != NULL) {
588 (void) cvt_hyper_option(token);
589 free(token);
592 if (token != NULL) {
593 (void) cvt_hyper_option(token);
594 free(token);
607 char *token = NULL;
623 ((parsestr = get_token(&token, parsestr, " \t,")) == NULL)) {
624 if (token != NULL)
625 free(token);
629 if (token == NULL)
633 if (strncmp(token, BFLAG, strlen(BFLAG)) != 0) {
634 free(token);
638 free(token);
641 while ((parsestr = get_token(&token, parsestr, ",")) != NULL) {
642 (void) cvt_hyper_option(token);
643 free(token);
646 if (token != NULL) {
647 (void) cvt_hyper_option(token);
648 free(token);
676 char *parsestr, *token;
684 if ((parsestr = get_token(&token, line, " \t")) == NULL) {
685 if (token != NULL)
686 free(token);
691 if (strcmp(token, "setprop") != 0) {
692 free(token);
696 free(token);
699 if ((parsestr = get_token(&token, parsestr, " \t")) == NULL) {
700 if (token != NULL)
701 free(token);
706 if (strcmp(token, "console") == 0) {
707 free(token);
710 parsestr = get_token(&token, parsestr, " \t");
711 if (token == NULL)
717 bootenv_rc_console = s_strdup(token);
722 if (strcmp(token, "ttya-mode") == 0) {
723 free(token);
725 } else if (strcmp(token, "ttyb-mode") == 0) {
726 free(token);
730 free(token);
735 parsestr = get_token(&token, parsestr, " \t");
737 if (token == NULL)
743 bootenv_rc_serial[port] = s_strdup(token);
744 free(token);