Print this page
4095 minor cleanup up libshare

@@ -19,10 +19,11 @@
  * CDDL HEADER END
  */
 
 /*
  * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013 RackTop Systems.
  */
 
 /*
  * basic API declarations for share management
  */

@@ -46,11 +47,11 @@
 typedef void *sa_optionset_t;
 typedef void *sa_security_t;
 typedef void *sa_protocol_properties_t;
 typedef void *sa_resource_t;
 
-typedef void *sa_handle_t;      /* opaque handle to access core functions */
+typedef struct sa_handle *sa_handle_t;  /* opaque handle to access core functions */
 
 /*
  * defined error values
  */
 

@@ -175,11 +176,11 @@
 extern sa_group_t sa_get_parent_group(sa_share_t);
 extern int sa_set_share_attr(sa_share_t, char *, char *);
 extern int sa_set_share_description(sa_share_t, char *);
 extern int sa_enable_share(sa_group_t, char *);
 extern int sa_disable_share(sa_share_t, char *);
-extern int sa_is_share(void *);
+extern boolean_t sa_is_share(void *);
 
 /* resource name related */
 extern sa_resource_t sa_find_resource(sa_handle_t, char *);
 extern sa_resource_t sa_get_resource(sa_group_t, char *);
 extern sa_resource_t sa_get_next_resource(sa_resource_t);

@@ -220,11 +221,11 @@
 extern int sa_add_property(void *, sa_property_t);
 extern int sa_update_property(sa_property_t, char *);
 extern int sa_remove_property(sa_property_t);
 extern int sa_commit_properties(sa_optionset_t, int);
 extern int sa_valid_property(sa_handle_t, void *, char *, sa_property_t);
-extern int sa_is_persistent(void *);
+extern boolean_t sa_is_persistent(void *);
 
 /* security control */
 extern sa_security_t sa_get_security(sa_group_t, char *, char *);
 extern sa_security_t sa_get_next_security(sa_security_t);
 extern char *sa_get_security_attr(sa_optionset_t, char *);

@@ -236,11 +237,11 @@
 extern void sa_free_derived_security(sa_security_t);
 
 /* protocol specific interfaces */
 extern int sa_parse_legacy_options(sa_group_t, char *, char *);
 extern char *sa_proto_legacy_format(char *, sa_group_t, int);
-extern int sa_is_security(char *, char *);
+extern boolean_t sa_is_security(char *, char *);
 extern sa_protocol_properties_t sa_proto_get_properties(char *);
 extern uint64_t sa_proto_get_featureset(char *);
 extern sa_property_t sa_get_protocol_section(sa_protocol_properties_t, char *);
 extern sa_property_t sa_get_next_protocol_section(sa_property_t, char *);
 extern sa_property_t sa_get_protocol_property(sa_protocol_properties_t, char *);

@@ -264,13 +265,13 @@
 extern int sa_update_legacy(sa_share_t, char *);
 extern int sa_update_sharetab(sa_share_t, char *);
 extern int sa_delete_sharetab(sa_handle_t, char *, char *);
 
 /* ZFS functions */
-extern int sa_zfs_is_shared(sa_handle_t, char *);
-extern int sa_group_is_zfs(sa_group_t);
-extern int sa_path_is_zfs(char *);
+extern boolean_t sa_zfs_is_shared(sa_handle_t, char *);
+extern boolean_t sa_group_is_zfs(sa_group_t);
+extern boolean_t sa_path_is_zfs(char *);
 extern int sa_zfs_setprop(sa_handle_t, char *, nvlist_t *);
 
 /* SA Handle specific functions */
 extern sa_handle_t sa_find_group_handle(sa_group_t);