summaryrefslogtreecommitdiff
path: root/usr/src/lib/libshare/common/libshare.c
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2019-12-03 12:37:33 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2019-12-03 12:37:33 +0000
commit1e3614d0308cc53fe5630084af9ef8719a9c44a8 (patch)
treea783e76bfac006395d41cf5b28d40c568b075c78 /usr/src/lib/libshare/common/libshare.c
parent98860832862cef20612fd5b10b324f5eba1b4015 (diff)
parentb8dc1b43d204b714c2fda8dd4efd67de0c671db6 (diff)
downloadillumos-joyent-1e3614d0308cc53fe5630084af9ef8719a9c44a8.tar.gz
[illumos-gate merge]
commit b8dc1b43d204b714c2fda8dd4efd67de0c671db6 11945 pool import performance regression due to repeated libshare initialization commit 69d9b1c5b0824b6e4feadaf289d68d945f0fbe6f 11984 libproc: passing argument 2 to restrict-qualified parameter aliases with argument 1 commit ec38b3f5fb92a39a55897ec0e3e4eeb0e84fefcc 12036 iscsi: zpool create pool fails to create label commit c54162e4540c6b4eb112c199658a34287d2dc971 12018 loader.efi: efipart needs better support detecting nested partitions
Diffstat (limited to 'usr/src/lib/libshare/common/libshare.c')
-rw-r--r--usr/src/lib/libshare/common/libshare.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/usr/src/lib/libshare/common/libshare.c b/usr/src/lib/libshare/common/libshare.c
index 5a58e0268e..a507e8a1a5 100644
--- a/usr/src/lib/libshare/common/libshare.c
+++ b/usr/src/lib/libshare/common/libshare.c
@@ -21,7 +21,7 @@
/*
* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2018 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2016 by Delphix. All rights reserved.
*/
@@ -1153,6 +1153,20 @@ sa_fini(sa_handle_t handle)
}
/*
+ * sa_service(sa_handle_t handle)
+ *
+ * Returns the service for which the handle is currently initialized.
+ */
+int
+sa_service(sa_handle_t handle)
+{
+ if (handle == NULL)
+ return (0);
+
+ return (((sa_handle_impl_t)handle)->sa_service);
+}
+
+/*
* sa_get_protocols(char **protocol)
* Get array of protocols that are supported
* Returns pointer to an allocated and NULL terminated