]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r329727-r329728: lualoader ZFS BE Support
authorkevans <kevans@FreeBSD.org>
Mon, 18 Feb 2019 19:13:28 +0000 (19:13 +0000)
committerkevans <kevans@FreeBSD.org>
Mon, 18 Feb 2019 19:13:28 +0000 (19:13 +0000)
commit8f71efa289b88e3a516b37cb44911d71c09a3fb2
treeba0a45b46bb0f19c8bd37f0478098599e90ca19a
parent141a04400cd06f592cb07d819f90322e47565f0c
MFC r329727-r329728: lualoader ZFS BE Support

r329727:
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.

r329728:
stand/zfs: Unbreak build, 'truct' ~= 'struct'
stand/zfs/libzfs.h
stand/zfs/zfs.c