freebsd-dev/stand/zfs
Kyle Evans 97875f4aa9 stand/zfs: Add all bootenvs to environment
For the benefit of lualoader, add all bootenvs to environment when
init_zfs_bootenv is invoked. All of the boot environment logic can then be
implemented in pure lua, rather than going back and forth with C to
implement paging.

This stores all boot environments in bootenvs[idx] and the final count of
bootenvs in bootenvs_count.

While here, make a copy of currdev for init_zfs_bootenv since it will be
modifying it and the caller may not necessarily want that. Some of the logic
was shifted around so that the 'currdev' pointer remains at the beginning of
the string and 'beroot' is moved around as needed to modify it or ultimately
store it in zfs_be_root.

The original zfs_bootenv that this was copied from will be able to go away
only if/when forth eventually goes away.

Tested with:	lualoader (and local changes to add boot env. support)
Tested with:	forth
Reviewed by:	cem (earlier version), imp
Differential Revision:	https://reviews.freebsd.org/D14435
2018-02-21 16:26:16 +00:00
..
devicename_stubs.c
libzfs.h stand/zfs: Add all bootenvs to environment 2018-02-21 16:26:16 +00:00
Makefile Eliminate bsd.stand.mk and -fPIC 32-bit intel builds 2018-02-16 00:17:32 +00:00
Makefile.depend
zfs.c stand/zfs: Add all bootenvs to environment 2018-02-21 16:26:16 +00:00
zfsimpl.c Mark two things as unused (since they are only sometimes used) and 2017-12-03 04:55:33 +00:00