HomeFreeBSD

loader: Simplify the loader.has_command

Description

loader: Simplify the loader.has_command

luaL_checkstring already checks for the right number of
arguments. There's no need to do that by hand here. Now an exception
will be thrown like any other function with the wrong args. Also,
push a boolean instead of an int.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D43820

Details

Provenance
impAuthored on Feb 16 2024, 3:52 AM
Differential Revision
D43820: loader: Simplify the loader.has_command
Parents
rG33a2406eed00: reboot: Use posix_spawn instead of system
Branches
Unknown
Tags
Unknown