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
This commit is contained in:
Chris Williamson
2018-02-08 09:17:52 -07:00
committed by Brian Behlendorf
parent d99a015343
commit 475eca4908
6 changed files with 88 additions and 3 deletions
+1 -1
View File
@@ -714,7 +714,7 @@ zcp_exists(lua_State *state)
return (luaL_error(state, "unexpected error %d", error));
}
return (0);
return (1);
}
/*