Path: blob/main/sys/contrib/openzfs/lib/libspl/include/zone.h
48406 views
// SPDX-License-Identifier: CDDL-1.01/*2* CDDL HEADER START3*4* The contents of this file are subject to the terms of the5* Common Development and Distribution License (the "License").6* You may not use this file except in compliance with the License.7*8* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE9* or https://opensource.org/licenses/CDDL-1.0.10* See the License for the specific language governing permissions11* and limitations under the License.12*13* When distributing Covered Code, include this CDDL HEADER in each14* file and include the License file at usr/src/OPENSOLARIS.LICENSE.15* If applicable, add the following below this CDDL HEADER, with the16* fields enclosed by brackets "[]" replaced with your own identifying17* information: Portions Copyright [yyyy] [name of copyright owner]18*19* CDDL HEADER END20*/21/*22* Copyright 2007 Sun Microsystems, Inc. All rights reserved.23* Use is subject to license terms.24*/2526#ifndef _LIBSPL_ZONE_H27#define _LIBSPL_ZONE_H2829#include <sys/types.h>30#include <sys/zone.h>3132#ifdef __cplusplus33extern "C" {34#endif3536#ifdef __FreeBSD__37#define GLOBAL_ZONEID 038#else39/*40* Hardcoded in the kernel's root user namespace. A "better" way to get41* this would be by using ioctl_ns(2), but this would need to be performed42* recursively on NS_GET_PARENT and then NS_GET_USERNS. Also, that's only43* supported since Linux 4.9.44*/45#define GLOBAL_ZONEID 4026531837U46#endif4748extern zoneid_t getzoneid(void);4950#ifdef __cplusplus51}52#endif5354#endif /* _LIBSPL_ZONE_H */555657