xref: /freebsd/sys/contrib/openzfs/include/zfs_comutil.h (revision 22649d4dba730d46244fd2dff4fd174903c8379f)
1 // SPDX-License-Identifier: CDDL-1.0
2 /*
3  * This file and its contents are supplied under the terms of the
4  * Common Development and Distribution License ("CDDL"), version 1.0.
5  * You may only use this file in accordance with the terms of version
6  * 1.0 of the CDDL.
7  *
8  * A full copy of the text of the CDDL should have accompanied this
9  * source.  A copy of the CDDL is also available via the Internet at
10  * https://opensource.org/license/CDDL-1.0.
11  */
12 /*
13  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
14  * Copyright (c) 2012, 2017 by Delphix. All rights reserved.
15  */
16 
17 #ifndef	_ZFS_COMUTIL_H
18 #define	_ZFS_COMUTIL_H extern __attribute__((visibility("default")))
19 
20 #include <sys/fs/zfs.h>
21 #include <sys/types.h>
22 
23 #ifdef	__cplusplus
24 extern "C" {
25 #endif
26 
27 _ZFS_COMUTIL_H boolean_t zfs_allocatable_devs(nvlist_t *);
28 _ZFS_COMUTIL_H boolean_t zfs_special_devs(nvlist_t *, const char *);
29 _ZFS_COMUTIL_H void zpool_get_load_policy(nvlist_t *, zpool_load_policy_t *);
30 
31 _ZFS_COMUTIL_H int zfs_zpl_version_map(int spa_version);
32 _ZFS_COMUTIL_H int zfs_spa_version_map(int zpl_version);
33 
34 _ZFS_COMUTIL_H boolean_t zfs_dataset_name_hidden(const char *);
35 
36 #define	ZFS_NUM_LEGACY_HISTORY_EVENTS 41
37 _ZFS_COMUTIL_H const char *const
38     zfs_history_event_names[ZFS_NUM_LEGACY_HISTORY_EVENTS];
39 
40 #ifdef	__cplusplus
41 }
42 #endif
43 
44 #endif	/* _ZFS_COMUTIL_H */
45