Skip to content

Commit b5af61b

Browse files
robnbehlendorf
authored andcommitted
libspl: move zone definitions from zfs_context.h
Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Rob Norris <[email protected]> Closes #17861
1 parent 70a1fad commit b5af61b

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

include/sys/zfs_context.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ extern "C" {
113113
#include <sys/sunddi.h>
114114
#include <sys/debug.h>
115115
#include <sys/trace_zfs.h>
116+
#include <sys/zone.h>
116117

117118
#include <sys/mutex.h>
118119
#include <sys/rwlock.h>
@@ -211,10 +212,6 @@ typedef off_t loff_t;
211212
extern int highbit64(uint64_t i);
212213
extern int lowbit64(uint64_t i);
213214

214-
#define zone_dataset_visible(x, y) (1)
215-
#define INGLOBALZONE(z) (1)
216-
extern uint32_t zone_get_hostid(void *zonep);
217-
218215
/*
219216
* Hostname information
220217
*/
@@ -236,7 +233,6 @@ extern int zfs_secpolicy_rename_perms(const char *from, const char *to,
236233
cred_t *cr);
237234
extern int zfs_secpolicy_destroy_perms(const char *name, cred_t *cr);
238235
extern int secpolicy_zfs(const cred_t *cr);
239-
extern zoneid_t getzoneid(void);
240236

241237
#define DDI_SLEEP KM_SLEEP
242238
#define ddi_log_sysevent(_a, _b, _c, _d, _e, _f, _g) \

lib/libspl/include/sys/zone.h

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,19 @@
2121
* CDDL HEADER END
2222
*/
2323
/*
24-
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
25-
* Use is subject to license terms.
24+
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
25+
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
26+
* Copyright (c) 2012, 2018 by Delphix. All rights reserved.
27+
* Copyright (c) 2012, Joyent, Inc. All rights reserved.
2628
*/
2729

28-
#ifndef _LIBSPL_SYS_ZONE_H
29-
#define _LIBSPL_SYS_ZONE_H
30+
#ifndef _SYS_ZONE_H
31+
#define _SYS_ZONE_H
3032

31-
#endif
33+
#define zone_dataset_visible(x, y) (1)
34+
35+
#define INGLOBALZONE(z) (1)
36+
37+
extern uint32_t zone_get_hostid(void *zonep);
38+
39+
#endif /* _SYS_ZONE_H */

0 commit comments

Comments
 (0)