mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 10:01:01 +03:00
libshare: interface: {=> const} char *
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13165
This commit is contained in:
parent
2faf05612f
commit
4ccbb23971
@ -77,7 +77,7 @@ libshare_init(void)
|
|||||||
|
|
||||||
int
|
int
|
||||||
sa_enable_share(const char *zfsname, const char *mountpoint,
|
sa_enable_share(const char *zfsname, const char *mountpoint,
|
||||||
const char *shareopts, char *protocol)
|
const char *shareopts, const char *protocol)
|
||||||
{
|
{
|
||||||
int rc, ret = SA_OK;
|
int rc, ret = SA_OK;
|
||||||
boolean_t found_protocol = B_FALSE;
|
boolean_t found_protocol = B_FALSE;
|
||||||
@ -111,7 +111,7 @@ sa_enable_share(const char *zfsname, const char *mountpoint,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
sa_disable_share(const char *mountpoint, char *protocol)
|
sa_disable_share(const char *mountpoint, const char *protocol)
|
||||||
{
|
{
|
||||||
int rc, ret = SA_OK;
|
int rc, ret = SA_OK;
|
||||||
boolean_t found_protocol = B_FALSE;
|
boolean_t found_protocol = B_FALSE;
|
||||||
@ -140,7 +140,7 @@ sa_disable_share(const char *mountpoint, char *protocol)
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean_t
|
boolean_t
|
||||||
sa_is_shared(const char *mountpoint, char *protocol)
|
sa_is_shared(const char *mountpoint, const char *protocol)
|
||||||
{
|
{
|
||||||
sa_fstype_t *fstype;
|
sa_fstype_t *fstype;
|
||||||
boolean_t ret = B_FALSE;
|
boolean_t ret = B_FALSE;
|
||||||
@ -177,7 +177,7 @@ sa_commit_shares(const char *protocol)
|
|||||||
*
|
*
|
||||||
* convert an error value to an error string
|
* convert an error value to an error string
|
||||||
*/
|
*/
|
||||||
char *
|
const char *
|
||||||
sa_errorstr(int err)
|
sa_errorstr(int err)
|
||||||
{
|
{
|
||||||
static char errstr[32];
|
static char errstr[32];
|
||||||
@ -295,7 +295,7 @@ sa_errorstr(int err)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
sa_validate_shareopts(char *options, char *proto)
|
sa_validate_shareopts(const char *options, const char *proto)
|
||||||
{
|
{
|
||||||
sa_fstype_t *fstype;
|
sa_fstype_t *fstype;
|
||||||
|
|
||||||
|
@ -73,16 +73,16 @@
|
|||||||
#define SA_SHARE_EXISTS 33 /* path or file is already shared */
|
#define SA_SHARE_EXISTS 33 /* path or file is already shared */
|
||||||
|
|
||||||
/* initialization */
|
/* initialization */
|
||||||
_LIBSPL_LIBSHARE_H char *sa_errorstr(int);
|
_LIBSPL_LIBSHARE_H const char *sa_errorstr(int);
|
||||||
|
|
||||||
/* share control */
|
/* share control */
|
||||||
_LIBSPL_LIBSHARE_H int sa_enable_share(const char *, const char *, const char *,
|
_LIBSPL_LIBSHARE_H int sa_enable_share(const char *, const char *, const char *,
|
||||||
char *);
|
const char *);
|
||||||
_LIBSPL_LIBSHARE_H int sa_disable_share(const char *, char *);
|
_LIBSPL_LIBSHARE_H int sa_disable_share(const char *, const char *);
|
||||||
_LIBSPL_LIBSHARE_H boolean_t sa_is_shared(const char *, char *);
|
_LIBSPL_LIBSHARE_H boolean_t sa_is_shared(const char *, const char *);
|
||||||
_LIBSPL_LIBSHARE_H void sa_commit_shares(const char *);
|
_LIBSPL_LIBSHARE_H void sa_commit_shares(const char *);
|
||||||
|
|
||||||
/* protocol specific interfaces */
|
/* protocol specific interfaces */
|
||||||
_LIBSPL_LIBSHARE_H int sa_validate_shareopts(char *, char *);
|
_LIBSPL_LIBSHARE_H int sa_validate_shareopts(const char *, const char *);
|
||||||
|
|
||||||
#endif /* _LIBSPL_LIBSHARE_H */
|
#endif /* _LIBSPL_LIBSHARE_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user