Print this page
12071 clarify implementation of single_instance in SMF services
Reviewed by: Robert Mustacchi <rm@fingolfin.org>

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/svc/svccfg/svccfg_xml.c
          +++ new/usr/src/cmd/svc/svccfg/svccfg_xml.c
↓ open down ↓ 15 lines elided ↑ open up ↑
  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 (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  23   23   */
  24   24  /*
  25   25   * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
       26 + * Copyright 2019 Joyent, Inc.
  26   27   */
  27   28  
  28   29  
  29   30  /*
  30   31   * XML document manipulation routines
  31   32   *
  32   33   * These routines provide translation to and from the internal representation to
  33   34   * XML.  Directionally-oriented verbs are with respect to the external source,
  34   35   * so lxml_get_service() fetches a service from the XML file into the
  35   36   * internal representation.
↓ open down ↓ 3274 lines elided ↑ open up ↑
3310 3311                          uu_die(gettext(
3311 3312                              "illegal element \"%s\" on instance \"%s\"\n"),
3312 3313                              cursor->name, i->sc_name);
3313 3314                          break;
3314 3315                  }
3315 3316          }
3316 3317  
3317 3318          return (0);
3318 3319  }
3319 3320  
3320      -/* ARGSUSED1 */
     3321 +/*
     3322 + * Unimplemented and obsolete, but we still process it for compatibility
     3323 + * purposes.
     3324 + */
3321 3325  static int
3322      -lxml_get_single_instance(entity_t *entity, xmlNodePtr si)
     3326 +lxml_get_single_instance(entity_t *entity, xmlNodePtr si __unused)
3323 3327  {
3324 3328          pgroup_t *pg;
3325 3329          property_t *p;
3326 3330          int r;
3327 3331  
3328 3332          pg = internal_pgroup_find_or_create(entity, (char *)scf_pg_general,
3329 3333              (char *)scf_group_framework);
3330 3334  
3331 3335          p = internal_property_create(SCF_PROPERTY_SINGLE_INSTANCE,
3332 3336              SCF_TYPE_BOOLEAN, 1, (uint64_t)1);
↓ open down ↓ 499 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX