aboutsummaryrefslogtreecommitdiff
path: root/module/zfs/zcp.c
diff options
context:
space:
mode:
authorChris Williamson <chris.williamson@delphix.com>2018-02-08 16:17:52 +0000
committerBrian Behlendorf <behlendorf1@llnl.gov>2018-02-08 23:28:52 +0000
commit475eca4908731a87fff1be500ba4d7b011d392e4 (patch)
tree4dcc6c4bb7e897e94486c3c7e5aa6f95e413c789 /module/zfs/zcp.c
parentd99a015343425a1c856c900aa8223016400ac2dc (diff)
downloadsrc-475eca4908731a87fff1be500ba4d7b011d392e4.tar.gz
src-475eca4908731a87fff1be500ba4d7b011d392e4.zip
OpenZFS 8605 - zfs channel programs fix zfs.exists
Authored by: Chris Williamson <chris.williamson@delphix.com> Reviewed by: Paul Dagnelie <pcd@delphix.com> Reviewed by: Dan Kimmel <dan.kimmel@delphix.com> Reviewed by: Matt Ahrens <mahrens@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Ported-by: Don Brady <don.brady@delphix.com> zfs.exists() in channel programs doesn't return any result, and should have a man page entry. This patch corrects zfs.exists so that it returns a value indicating if the dataset exists or not. It also adds documentation about it in the man page. OpenZFS-issue: https://www.illumos.org/issues/8605 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/1e85e111
Diffstat (limited to 'module/zfs/zcp.c')
-rw-r--r--module/zfs/zcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/zcp.c b/module/zfs/zcp.c
index 07f96e298ddf..83560309b3ad 100644
--- a/module/zfs/zcp.c
+++ b/module/zfs/zcp.c
@@ -714,7 +714,7 @@ zcp_exists(lua_State *state)
return (luaL_error(state, "unexpected error %d", error));
}
- return (0);
+ return (1);
}
/*