Print this page
OS-3280 need a way to specify the root of a native system in the lx brand
OS-3279 lx brand should allow delegated datasets
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
        
*** 595,604 ****
--- 595,606 ----
          void (*funcp)(psinfo_t *);
  
          const char *optstr;
          optdesc_t *optd;
          int nmatches, c;
+         const char *zroot;
+         char buf[PATH_MAX];
  
          DIR *dirp;
  
          (void) setlocale(LC_ALL, "");
          (void) textdomain(TEXT_DOMAIN);
*** 624,633 ****
--- 626,641 ----
          } else
                  optstr = PGREP_OPTS;
  
          opterr = 0;
  
+         zroot = zone_get_nroot();
+         if (zroot != NULL) {
+                 (void) snprintf(buf, sizeof (buf), "%s/%s", zroot, g_procdir);
+                 g_procdir = buf;
+         }
+ 
          while (optind < argc) {
                  while ((c = getopt(argc, argv, optstr)) != (int)EOF) {
  
                          if (c == ':' || c == '?' ||
                              g_optdtab[c - 'A'].o_opts == 0) {