HomeFreeBSD

stand: lua: enhance lfs.dir() to speed up kernels_autodetect

Description

stand: lua: enhance lfs.dir() to speed up kernels_autodetect

This eliminates a lot of stat() calls that happen when lualoader renders the
menu with the default settings, and greatly speeds up rendering on my
laptop.

ftype is nil if loader/loader.efi hasn't been updated yet, falling back to
lfs.attributes() to test.

This is technically incompatible with lfs, but not in a particularly
terrible way.

(cherry picked from commit e25ee296c919d6567aa76058a7049eac974797fb)

Details

Provenance
kevansAuthored on Jan 24 2021, 1:32 AM
Parents
rG4a1ea6a210b2: cxgb(4): Remove assumption of physically contiguous mbufs.
Branches
Unknown
Tags
Unknown