Lines Matching defs:rc

140 	int rc;
142 if ((zfs_hdl = sa_get_fs_handle(shdl, SA_FS_ZFS, &rc)) == NULL) {
143 salog_error(rc, "libshare_zfs");
164 int rc;
187 if ((rc = sa_share_set_mntpnt(share, new_path)) != SA_OK)
188 return (rc);
196 if ((rc = sa_share_set_path(share, new_path)) != SA_OK)
197 return (rc);
206 int rc;
208 if ((zfs_hdl = sa_get_fs_handle(shdl, SA_FS_ZFS, &rc)) == NULL)
209 return (rc);
211 rc = zfssa_share_storage_write(zfs_hdl, share, persist);
212 return (rc);
220 int rc;
222 if ((zfs_hdl = sa_get_fs_handle(shdl, SA_FS_ZFS, &rc)) == NULL)
223 return (rc);
225 rc = zfssa_share_storage_read(zfs_hdl, mntpnt, sh_name, sharep);
226 if (rc != 0) {
227 if (rc != SA_SHARE_NOT_FOUND)
228 salog_error(rc, "libshare_zfs: %s", mntpnt);
229 return (rc);
236 if ((rc = sazfs_add_mntpnt(*sharep, mntpnt)) != SA_OK) {
237 salog_error(rc, "libshare_zfs: error adding mntpnt to share %s",
239 return (rc);
242 return (rc);
249 int rc;
253 if ((zfs_hdl = sa_get_fs_handle(shdl, SA_FS_ZFS, &rc)) == NULL)
254 return (rc);
256 rc = zfssa_share_storage_read_init(zfs_hdl, srhp->srh_mntpnt,
258 if (rc != 0) {
259 salog_error(rc, "libshare_zfs: "
272 int rc;
276 rc = SA_INVALID_READ_HDL;
277 salog_error(rc, "libshare_zfs");
278 return (rc);
281 rc = zfssa_share_storage_read_next(srhp->srh_handle, sharep);
287 if (rc == 0 &&
288 (rc = sazfs_add_mntpnt(*sharep, srhp->srh_mntpnt)) != SA_OK) {
292 salog_error(rc, "libshare_zfs: error adding mntpnt to share %s",
295 return (rc);
317 int rc;
321 if ((zfs_hdl = sa_get_fs_handle(shdl, SA_FS_ZFS, &rc)) == NULL)
322 return (rc);
324 rc = zfs_path_to_mntpnt(zfs_hdl, fs_name, mntpnt, sizeof (mntpnt),
326 if (rc != 0) {
327 rc = SA_MNTPNT_NOT_FOUND;
328 salog_error(rc, "libshare_zfs: %s", fs_name);
329 return (rc);
332 rc = zfs_share_resource_remove(zfs_hdl, ds_name, mntpnt,
334 if (rc != 0) {
356 int rc;
360 if ((zfs_hdl = sa_get_fs_handle(shdl, SA_FS_ZFS, &rc)) == NULL)
361 return (rc);
363 rc = zfs_path_to_mntpnt(zfs_hdl, sh_path, mntpnt, sizeof (mntpnt),
365 if (rc != 0) {
366 rc = SA_MNTPNT_NOT_FOUND;
367 salog_error(rc, "libshare_zfs: %s", sh_path);
368 return (rc);
372 rc = SA_NO_MEMORY;
373 salog_error(rc, "libshare_zfs: %s", sh_name);
374 return (rc);
377 rc = acl_get(sh_fname, 0, aclp);
378 if (rc != 0) {
381 rc = SA_NO_PERMISSION;
384 rc = SA_INVALID_SHARE_PATH;
387 rc = SA_NOT_SUPPORTED;
392 rc = SA_SYSTEM_ERR;
396 rc = SA_OK;
401 return (rc);
409 int rc;
413 if ((zfs_hdl = sa_get_fs_handle(shdl, SA_FS_ZFS, &rc)) == NULL)
414 return (rc);
416 rc = zfs_path_to_mntpnt(zfs_hdl, sh_path, mntpnt, sizeof (mntpnt),
418 if (rc != 0) {
419 rc = SA_MNTPNT_NOT_FOUND;
420 salog_error(rc, "libshare_zfs: %s", sh_path);
421 return (rc);
425 rc = SA_NO_MEMORY;
426 salog_error(rc, "libshare_zfs: %s", sh_name);
427 return (rc);
430 rc = acl_set(sh_fname, acl);
431 if (rc != 0) {
434 rc = SA_NO_PERMISSION;
437 rc = SA_INVALID_SHARE_PATH;
440 rc = SA_NOT_SUPPORTED;
445 rc = SA_SYSTEM_ERR;
449 rc = SA_OK;
455 return (rc);
468 int rc;
470 if ((zfs_hdl = sa_get_fs_handle(shdl, SA_FS_ZFS, &rc)) == NULL)
471 return (rc);
473 rc = zfs_path_to_mntpnt(zfs_hdl, sh_path, mntpnt, mplen,
476 if (rc != 0)
487 int rc;
491 if ((zfs_hdl = sa_get_fs_handle(shdl, SA_FS_ZFS, &rc)) == NULL)
492 return (rc);
503 int rc;
505 if ((zfs_hdl = sa_get_fs_handle(shdl, SA_FS_ZFS, &rc)) == NULL)
506 return (rc);
517 int rc;
519 if ((zfs_hdl = sa_get_fs_handle(shdl, SA_FS_ZFS, &rc)) == NULL)
520 return (rc);
533 int rc;
535 if ((zfs_hdl = sa_get_fs_handle(shdl, SA_FS_ZFS, &rc)) == NULL)
536 return (rc);
551 rc = SA_OK;
554 rc = SA_MNTPNT_NOT_FOUND;
558 return (rc);
566 int rc;
568 if ((zfs_hdl = sa_get_fs_handle(shdl, SA_FS_ZFS, &rc)) == NULL)
569 return (rc);
684 int rc;
689 if ((zfs_hdl = sa_get_fs_handle(shdl, SA_FS_ZFS, &rc)) == NULL) {
690 salog_error(rc, "libshare_zfs");
717 if ((rc = sa_zfs_get_share_state(notify_op, protos, &notify,
719 salog_error(rc, "libshare_zfs");