Print this page
4095 minor cleanup up libshare

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libshare/common/libshare_impl.h
          +++ new/usr/src/lib/libshare/common/libshare_impl.h
↓ open down ↓ 17 lines elided ↑ open up ↑
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
  27   27  /*
       28 + * Copyright (c) 2013 RackTop Systems.
       29 + */
       30 +
       31 +/*
  28   32   * basic declarations for implementation of the share management
  29   33   * libraries.
  30   34   */
  31   35  
  32   36  #ifndef _LIBSHARE_IMPL_H
  33   37  #define _LIBSHARE_IMPL_H
  34   38  
  35   39  #include <libshare.h>
  36   40  #include <libscf.h>
  37   41  #include <scfutil.h>
↓ open down ↓ 55 lines elided ↑ open up ↑
  93   97          struct propertylist     *pl_next;
  94   98          int                     pl_type;
  95   99          union propval {
  96  100              sa_optionset_t      pl_optionset;
  97  101              sa_security_t       pl_security;
  98  102              void                *pl_void;
  99  103          }                       pl_value;
 100  104  } property_list_t;
 101  105  
 102  106  /* internal version of sa_handle_t */
 103      -typedef struct sa_handle_impl {
      107 +struct sa_handle {
 104  108          uint64_t        flags;
 105  109          scfutilhandle_t *scfhandle;
 106  110          libzfs_handle_t *zfs_libhandle;
 107  111          zfs_handle_t    **zfs_list;
 108  112          size_t          zfs_list_count;
 109  113          xmlNodePtr      tree;
 110  114          xmlDocPtr       doc;
 111  115          uint64_t        tssharetab;
 112  116          uint64_t        tstrans;
 113      -} *sa_handle_impl_t;
      117 +};
 114  118  
 115  119  extern int sa_proto_share(char *, sa_share_t);
 116  120  extern int sa_proto_unshare(sa_share_t, char *, char *);
 117  121  extern int sa_proto_valid_prop(sa_handle_t, char *, sa_property_t,
 118  122      sa_optionset_t);
 119  123  extern int sa_proto_security_prop(char *, char *);
 120  124  extern int sa_proto_legacy_opts(char *, sa_group_t, char *);
 121  125  extern int sa_proto_share_resource(char *, sa_resource_t);
 122  126  extern int sa_proto_unshare_resource(char *, sa_resource_t);
 123  127  
 124  128  /* internal utility functions */
 125  129  extern sa_optionset_t sa_get_derived_optionset(sa_group_t, char *, int);
 126  130  extern void sa_free_derived_optionset(sa_optionset_t);
 127  131  extern sa_optionset_t sa_get_all_security_types(void *, char *, int);
 128  132  extern sa_security_t sa_get_derived_security(void *, char *, char *, int);
 129  133  extern void sa_free_derived_security(sa_security_t);
 130  134  extern sa_protocol_properties_t sa_create_protocol_properties(char *);
 131  135  extern int sa_start_transaction(scfutilhandle_t *, char *);
 132      -extern int sa_end_transaction(scfutilhandle_t *, sa_handle_impl_t);
      136 +extern int sa_end_transaction(scfutilhandle_t *, sa_handle_t);
 133  137  extern void sa_abort_transaction(scfutilhandle_t *);
 134  138  extern int sa_commit_share(scfutilhandle_t *, sa_group_t, sa_share_t);
 135  139  extern int sa_set_property(scfutilhandle_t *, char *, char *);
 136  140  extern void sa_free_fstype(char *fstyp);
 137  141  extern int sa_delete_share(scfutilhandle_t *, sa_group_t, sa_share_t);
 138  142  extern int sa_delete_instance(scfutilhandle_t *, char *);
 139  143  extern int sa_create_pgroup(scfutilhandle_t *, char *);
 140  144  extern int sa_delete_pgroup(scfutilhandle_t *, char *);
 141  145  extern void sa_fillshare(sa_share_t share, char *proto, struct share *sh);
 142  146  extern void sa_emptyshare(struct share *sh);
↓ open down ↓ 40 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX