Print this page
OS-4251 lxbrand want lx_init for less boot-time overrides
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
OS-4254 libbrand token substitution incomplete for mount entries
        
*** 815,824 ****
--- 815,825 ----
      const char *, const char *), void *data, const xmlChar *mount_type)
  {
          xmlNodePtr node;
          xmlChar *special, *dir, *type, *opt;
          char special_exp[MAXPATHLEN];
+         char dir_exp[MAXPATHLEN];
          char opt_exp[MAXPATHLEN];
          int ret;
  
          if ((node = xmlDocGetRootElement(bhp->bh_platform)) == NULL)
                  return (-1);
*** 841,850 ****
--- 842,855 ----
                  /* Substitute token values as needed. */
                  if ((ret = i_substitute_tokens((char *)special,
                      special_exp, sizeof (special_exp),
                      zonename, zonepath, NULL, NULL)) != 0)
                          goto next;
+                 if ((ret = i_substitute_tokens((char *)dir,
+                     dir_exp, sizeof (dir_exp),
+                     zonename, zonepath, NULL, NULL)) != 0)
+                         goto next;
  
                  /* opt might not be defined */
                  if (strlen((const char *)opt) == 0) {
                          xmlFree(opt);
                          opt = NULL;
*** 853,863 ****
                              opt_exp, sizeof (opt_exp),
                              zonename, zonepath, NULL, NULL)) != 0)
                                  goto next;
                  }
  
!                 ret = func(data, (char *)special_exp, (char *)dir,
                      (char *)type, ((opt != NULL) ? opt_exp : NULL));
  
  next:
                  if (special != NULL)
                          xmlFree(special);
--- 858,868 ----
                              opt_exp, sizeof (opt_exp),
                              zonename, zonepath, NULL, NULL)) != 0)
                                  goto next;
                  }
  
!                 ret = func(data, (char *)special_exp, (char *)dir_exp,
                      (char *)type, ((opt != NULL) ? opt_exp : NULL));
  
  next:
                  if (special != NULL)
                          xmlFree(special);