Skip to content

Commit 99d7453

Browse files
robnbehlendorf
authored andcommitted
libzpool: add BE_POSIX_VENDOR for userspace bootenv
This is mostly a placeholder; it's not actually clear if a boot environment makes any sense for userspace. Still, "posix" is the likely future name of libzpool as a port, and this define is mandatory, so lets roll with it for now. Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Rob Norris <[email protected]> Closes #17861
1 parent 801d9b4 commit 99d7453

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

include/sys/zfs_bootenv.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ extern "C" {
3131
#define BE_FREEBSD_VENDOR "freebsd"
3232
#define BE_GRUB_VENDOR "grub"
3333
#define BE_LINUX_VENDOR "linux"
34+
#define BE_POSIX_VENDOR "posix"
3435

3536
#include <sys/zfs_bootenv_os.h>
3637

lib/libzpool/include/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ libzpool_sys_HEADERS = \
33
%D%/sys/abd_os.h \
44
%D%/sys/abd_impl_os.h \
55
%D%/sys/trace_zfs.h \
6+
%D%/sys/zfs_bootenv_os.h \
67
%D%/sys/zfs_context_os.h \
78
%D%/sys/zfs_debug_os.h
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// SPDX-License-Identifier: CDDL-1.0
2+
/*
3+
* CDDL HEADER START
4+
*
5+
* The contents of this file are subject to the terms of the
6+
* Common Development and Distribution License (the "License").
7+
* You may not use this file except in compliance with the License.
8+
*
9+
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10+
* or https://opensource.org/licenses/CDDL-1.0.
11+
* See the License for the specific language governing permissions
12+
* and limitations under the License.
13+
*
14+
* When distributing Covered Code, include this CDDL HEADER in each
15+
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16+
* If applicable, add the following below this CDDL HEADER, with the
17+
* fields enclosed by brackets "[]" replaced with your own identifying
18+
* information: Portions Copyright [yyyy] [name of copyright owner]
19+
*
20+
* CDDL HEADER END
21+
*/
22+
/*
23+
* Copyright (c) 2025, Rob Norris <[email protected]>
24+
*/
25+
26+
#ifndef _ZFS_BOOTENV_OS_H
27+
#define _ZFS_BOOTENV_OS_H
28+
29+
#ifdef __cplusplus
30+
extern "C" {
31+
#endif
32+
33+
#define BOOTENV_OS BE_POSIX_VENDOR
34+
35+
#ifdef __cplusplus
36+
}
37+
#endif
38+
39+
#endif /* _ZFS_BOOTENV_OS_H */

0 commit comments

Comments
 (0)