Print this page
8225 passing invalid global pattern to coreadm wedges it nicely


   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  24  * Copyright 2016 RackTop Systems.
  25  */
  26 
  27 #ifndef _LIBSCF_H
  28 #define _LIBSCF_H
  29 
  30 
  31 #include <stddef.h>
  32 #include <libnvpair.h>
  33 
  34 #ifndef NATIVE_BUILD
  35 #include <sys/secflags.h>
  36 #endif  /* NATIVE_BUILD */
  37 #include <sys/types.h>
  38 
  39 #ifdef  __cplusplus
  40 extern "C" {
  41 #endif
  42 
  43 typedef unsigned long scf_version_t;
  44 #define SCF_VERSION             1UL


 795 void scf_tmpl_reset_errors(scf_tmpl_errors_t *errs);
 796 int scf_tmpl_strerror(scf_tmpl_error_t *err, char *s, size_t n, int flag);
 797 int scf_tmpl_error_source_fmri(const scf_tmpl_error_t *, char **);
 798 int scf_tmpl_error_type(const scf_tmpl_error_t *, scf_tmpl_error_type_t *);
 799 int scf_tmpl_error_pg_tmpl(const scf_tmpl_error_t *, char **, char **);
 800 int scf_tmpl_error_pg(const scf_tmpl_error_t *, char **, char **);
 801 int scf_tmpl_error_prop_tmpl(const scf_tmpl_error_t *, char **, char **);
 802 int scf_tmpl_error_prop(const scf_tmpl_error_t *, char **, char **);
 803 int scf_tmpl_error_value(const scf_tmpl_error_t *, char **);
 804 
 805 /*
 806  * Simplified calls
 807  */
 808 int smf_enable_instance(const char *, int);
 809 int smf_disable_instance(const char *, int);
 810 int smf_refresh_instance(const char *);
 811 int smf_restart_instance(const char *);
 812 int smf_maintain_instance(const char *, int);
 813 int smf_degrade_instance(const char *, int);
 814 int smf_restore_instance(const char *);







 815 char *smf_get_state(const char *);
 816 
 817 int scf_simple_walk_instances(uint_t, void *,
 818     int (*inst_callback)(scf_handle_t *, scf_instance_t *, void *));
 819 
 820 scf_simple_prop_t *scf_simple_prop_get(scf_handle_t *, const char *,
 821     const char *, const char *);
 822 void scf_simple_prop_free(scf_simple_prop_t *);
 823 scf_simple_app_props_t *scf_simple_app_props_get(scf_handle_t *, const char *);
 824 void scf_simple_app_props_free(scf_simple_app_props_t *);
 825 const scf_simple_prop_t *scf_simple_app_props_next(
 826     const scf_simple_app_props_t *, scf_simple_prop_t *);
 827 const scf_simple_prop_t *scf_simple_app_props_search(
 828     const scf_simple_app_props_t *, const char *, const char *);
 829 ssize_t scf_simple_prop_numvalues(const scf_simple_prop_t *);
 830 scf_type_t scf_simple_prop_type(const scf_simple_prop_t *);
 831 char *scf_simple_prop_name(const scf_simple_prop_t *);
 832 char *scf_simple_prop_pgname(const scf_simple_prop_t *);
 833 uint8_t *scf_simple_prop_next_boolean(scf_simple_prop_t *);
 834 uint64_t *scf_simple_prop_next_count(scf_simple_prop_t *);




   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  24  * Copyright 2017 RackTop Systems.
  25  */
  26 
  27 #ifndef _LIBSCF_H
  28 #define _LIBSCF_H
  29 
  30 
  31 #include <stddef.h>
  32 #include <libnvpair.h>
  33 
  34 #ifndef NATIVE_BUILD
  35 #include <sys/secflags.h>
  36 #endif  /* NATIVE_BUILD */
  37 #include <sys/types.h>
  38 
  39 #ifdef  __cplusplus
  40 extern "C" {
  41 #endif
  42 
  43 typedef unsigned long scf_version_t;
  44 #define SCF_VERSION             1UL


 795 void scf_tmpl_reset_errors(scf_tmpl_errors_t *errs);
 796 int scf_tmpl_strerror(scf_tmpl_error_t *err, char *s, size_t n, int flag);
 797 int scf_tmpl_error_source_fmri(const scf_tmpl_error_t *, char **);
 798 int scf_tmpl_error_type(const scf_tmpl_error_t *, scf_tmpl_error_type_t *);
 799 int scf_tmpl_error_pg_tmpl(const scf_tmpl_error_t *, char **, char **);
 800 int scf_tmpl_error_pg(const scf_tmpl_error_t *, char **, char **);
 801 int scf_tmpl_error_prop_tmpl(const scf_tmpl_error_t *, char **, char **);
 802 int scf_tmpl_error_prop(const scf_tmpl_error_t *, char **, char **);
 803 int scf_tmpl_error_value(const scf_tmpl_error_t *, char **);
 804 
 805 /*
 806  * Simplified calls
 807  */
 808 int smf_enable_instance(const char *, int);
 809 int smf_disable_instance(const char *, int);
 810 int smf_refresh_instance(const char *);
 811 int smf_restart_instance(const char *);
 812 int smf_maintain_instance(const char *, int);
 813 int smf_degrade_instance(const char *, int);
 814 int smf_restore_instance(const char *);
 815 int smf_enable_instance_synchronous(const char *, int);
 816 int smf_disable_instance_synchronous(const char *, int);
 817 int smf_refresh_instance_synchronous(const char *);
 818 int smf_restart_instance_synchronous(const char *);
 819 int smf_maintain_instance_synchronous(const char *, int);
 820 int smf_degrade_instance_synchronous(const char *, int);
 821 int smf_restore_instance_synchronous(const char *);
 822 char *smf_get_state(const char *);
 823 
 824 int scf_simple_walk_instances(uint_t, void *,
 825     int (*inst_callback)(scf_handle_t *, scf_instance_t *, void *));
 826 
 827 scf_simple_prop_t *scf_simple_prop_get(scf_handle_t *, const char *,
 828     const char *, const char *);
 829 void scf_simple_prop_free(scf_simple_prop_t *);
 830 scf_simple_app_props_t *scf_simple_app_props_get(scf_handle_t *, const char *);
 831 void scf_simple_app_props_free(scf_simple_app_props_t *);
 832 const scf_simple_prop_t *scf_simple_app_props_next(
 833     const scf_simple_app_props_t *, scf_simple_prop_t *);
 834 const scf_simple_prop_t *scf_simple_app_props_search(
 835     const scf_simple_app_props_t *, const char *, const char *);
 836 ssize_t scf_simple_prop_numvalues(const scf_simple_prop_t *);
 837 scf_type_t scf_simple_prop_type(const scf_simple_prop_t *);
 838 char *scf_simple_prop_name(const scf_simple_prop_t *);
 839 char *scf_simple_prop_pgname(const scf_simple_prop_t *);
 840 uint8_t *scf_simple_prop_next_boolean(scf_simple_prop_t *);
 841 uint64_t *scf_simple_prop_next_count(scf_simple_prop_t *);