1# Copyright (c) 2020 Tobias Svehagen
2# Copyright (c) 2023 Meta
3#
4# SPDX-License-Identifier: Apache-2.0
5
6menuconfig ZVFS
7	bool "Zephyr virtual filesystem (ZVFS) support [EXPERIMENTAL]"
8	select FDTABLE
9	select EXPERIMENTAL
10	help
11	  ZVFS is a central, Zephyr-native library that provides a common interoperable API for all
12	  types of file descriptors such as those from the non-virtual FS, sockets, eventfds, FILE *'s
13	  and more. It is designed to be used by all Zephyr subsystems that need to work with files.
14
15if ZVFS
16
17config ZVFS_EVENTFD
18	bool "ZVFS event file descriptor support"
19	imply ZVFS_POLL
20	help
21	  Enable support for ZVFS event file descriptors. An eventfd can
22	  be used as an event wait/notify mechanism together with POSIX calls
23	  like read, write and poll.
24
25if ZVFS_EVENTFD
26
27config ZVFS_EVENTFD_MAX
28	int "Maximum number of ZVFS eventfd's"
29	default 1
30	range 1 4096
31	help
32	  The maximum number of supported event file descriptors.
33
34endif # ZVFS_EVENTFD
35
36config ZVFS_POLL
37	bool "ZVFS poll"
38	select POLL
39	help
40	  Enable support for zvfs_poll().
41
42if ZVFS_POLL
43
44config ZVFS_POLL_MAX
45	int "Max number of supported zvfs_poll() entries"
46	default NET_SOCKETS_POLL_MAX if NET_SOCKETS_POLL_MAX > 0
47	default 6 if WIFI_NM_WPA_SUPPLICANT
48	default 4 if SHELL_BACKEND_TELNET
49	default 3
50	help
51	  Maximum number of entries supported for poll() call.
52
53config ZVFS_SELECT
54	bool "ZVFS select"
55	help
56	  Enable support for zvfs_select().
57
58endif # ZVFS_POLL
59
60endif # ZVFS
61