diff options
author | mm <mm@FreeBSD.org> | 2013-03-05 08:09:53 +0000 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2013-03-05 08:09:53 +0000 |
commit | 99f883783c89d10b9d02e77393eb9d0a307f3ca0 (patch) | |
tree | 669ea5740806cbf29b6e064275d3f5a62478bd47 /cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h | |
parent | 712512f2cc075f7890eaf59c6aa392f330857ff9 (diff) | |
parent | d5063724619a16bd1592c39395c787e97be18693 (diff) | |
download | FreeBSD-src-99f883783c89d10b9d02e77393eb9d0a307f3ca0.zip FreeBSD-src-99f883783c89d10b9d02e77393eb9d0a307f3ca0.tar.gz |
WiP merge of libzfs_core (MFV r238590, r238592)
not yet working, ioctl handling needs to be changed
Diffstat (limited to 'cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h index be07187..d55e942 100644 --- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h +++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h @@ -23,12 +23,12 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 Pawel Jakub Dawidek <pawel@dawidek.net>. * All rights reserved. - * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. * Copyright (c) 2013 Martin Matuska <mm@FreeBSD.org>. All rights reserved. */ -#ifndef _LIBFS_IMPL_H -#define _LIBFS_IMPL_H +#ifndef _LIBZFS_IMPL_H +#define _LIBZFS_IMPL_H #include <sys/dmu.h> #include <sys/fs/zfs.h> @@ -39,6 +39,7 @@ #include <libshare.h> #include <libuutil.h> #include <libzfs.h> +#include <libzfs_core.h> #include "zfs_ioctl_compat.h" @@ -70,7 +71,6 @@ struct libzfs_handle { int libzfs_desc_active; char libzfs_action[1024]; char libzfs_desc[1024]; - char *libzfs_log_str; int libzfs_printerr; int libzfs_storeerr; /* stuff error messages into buffer */ void *libzfs_sharehdl; /* libshare handle */ @@ -225,11 +225,14 @@ static int zfs_ioctl_version = 0; * error is returned zc_nvlist_dst_size won't be updated. */ static __inline int -zcmd_ioctl(int fd, unsigned long cmd, zfs_cmd_t *zc) +zcmd_ioctl(int fd, int request, zfs_cmd_t *zc) { + unsigned long cmd; size_t oldsize, zfs_kernel_version_size, zfs_ioctl_version_size; int version, ret, cflag = ZFS_CMD_COMPAT_NONE; + cmd = _IOWR('Z', request, struct zfs_cmd); + zfs_ioctl_version_size = sizeof(zfs_ioctl_version); if (zfs_ioctl_version == 0) { sysctlbyname("vfs.zfs.version.ioctl", &zfs_ioctl_version, @@ -273,4 +276,4 @@ zcmd_ioctl(int fd, unsigned long cmd, zfs_cmd_t *zc) } #endif -#endif /* _LIBFS_IMPL_H */ +#endif /* _LIBZFS_IMPL_H */ |