Print this page
11691 ptree could show service FMRIs
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Jason King <jason.king@joyent.com>
Reviewed by: Andy Fiddaman <andy@omniosce.org>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/contract/process.c
          +++ new/usr/src/uts/common/contract/process.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
       24 + * Copyright 2019 Joyent, Inc.
  24   25   */
  25   26  
  26   27  #include <sys/mutex.h>
  27   28  #include <sys/debug.h>
  28   29  #include <sys/types.h>
  29   30  #include <sys/param.h>
  30   31  #include <sys/kmem.h>
  31   32  #include <sys/thread.h>
  32   33  #include <sys/id_space.h>
  33   34  #include <sys/avl.h>
↓ open down ↓ 695 lines elided ↑ open up ↑
 729  730                  VERIFY(nvlist_add_string(nvl, CTPS_SVC_CREATOR,
 730  731                      refstr_value(ctp->conp_svc_creator)) == 0);
 731  732                  kmem_free(pids, spids * sizeof (uint32_t));
 732  733                  kmem_free(ctids, sctids * sizeof (uint32_t));
 733  734          }
 734  735  
 735  736          /*
 736  737           * if we are in a local zone and svc_fmri was inherited from
 737  738           * the global zone, we provide fake svc_fmri and svc_ctid
 738  739           */
 739      -        if (local_svc_zone_enter == 0||
      740 +        if (local_svc_zone_enter == 0 ||
 740  741              zone->zone_uniqid == GLOBAL_ZONEUNIQID) {
 741  742                  if (detail > CTD_COMMON) {
 742  743                          VERIFY(nvlist_add_int32(nvl, CTPS_SVC_CTID,
 743  744                              ctp->conp_svc_ctid) == 0);
 744      -                }
 745      -                if (detail == CTD_ALL) {
 746  745                          VERIFY(nvlist_add_string(nvl, CTPS_SVC_FMRI,
 747  746                              refstr_value(ctp->conp_svc_fmri)) == 0);
 748  747                  }
 749  748          } else {
 750  749                  if (detail > CTD_COMMON) {
 751  750                          VERIFY(nvlist_add_int32(nvl, CTPS_SVC_CTID,
 752  751                              local_svc_zone_enter) == 0);
 753      -                }
 754      -                if (detail == CTD_ALL) {
 755  752                          VERIFY(nvlist_add_string(nvl, CTPS_SVC_FMRI,
 756  753                              CT_PR_SVC_FMRI_ZONE_ENTER) == 0);
 757  754                  }
 758  755          }
 759  756  }
 760  757  
 761  758  /*ARGSUSED*/
 762  759  static int
 763  760  contract_process_newct(contract_t *ct)
 764  761  {
↓ open down ↓ 431 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX