3120 zinject hangs in zfsdev_ioctl() due to uninitialized zc
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Eric Schrock <eric.schrock@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>

Fixes a panic in zinject on OS X.
Resolves #113

(cherry picked from commit https://github.com/illumos/illumos-gate/commit/f4c46b1)
Signed-off-by: ilovezfs <ilovezfs@icloud.com>
Prevent infinite loop in zinject.

Since OS X can return 0 from ioctl even when there was a zfs error,
zinject needs to check zc_ioc_error and set errno, which is handled
for us if we use zfs_ioctl instead of ioctl.