From nobody Tue Apr 16 20:12:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VJwFM28qrz5H0Gs; Tue, 16 Apr 2024 20:12:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VJwFL6GBFz4sjP; Tue, 16 Apr 2024 20:12:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713298358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aPQkOb72h+D1/e7XjuLmQYquFHWole+PXDzHB/hoQNw=; b=Zq9W8/wih7B7Nd+ha99low6hRiUwUc8QCf3aJrgEmvsXRuiolTNeGiwRwpzQEB2evyTT6e cRJFCaO51d2P2eqy9YlmjTUURUfs0HcPTh+AY1d9uJNho7WOQqNtLkVmQBE0n9LDf/jNjI emoooWCTKt8e/6KOLmX4LXDVDpLIDhTPRtMdcz50QjzgHj/a6IOAfTkCsP1vSpD2zGCE1I ag+6JUziis7PmzhxglAqu4F3uY6IaKU2YOqKJP8UHmcL3laJGHVk30aSnuNrPC+BOsoJN7 993tO1YyGGdgO4GmQx/9PM9ebFySpP6c1SO7XX4+SpMNnnaZf6bQ3in4r4ksXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713298358; a=rsa-sha256; cv=none; b=s8/4NFM57B6tqMHQoKSllILNqTmXZTzCDQqM+hPwrSL2vZlAAqlGLCgcjC/GpUj6TdShV0 +bezr/qpPP9CqqE2QaBMeh47vFCCtZtMGGMmve+AVaprdndbJdxfHOV3DMWTRvLLUDyv6a 4xlScqytULNduAe1MkgYQvMndgG/moZTjv127opV+4Wv2hQzN9arXbXJqXFCMBAoVak7MC I95DH2+hdckXF3Cm/kvDM2fxTnKCYALgXAVxasPbFKfMsp3Ye/Q8Gyj0/8c+EmhKmuvQtd IKntupWWbA5ogZjzhuOahfe3aX1A5w+F/sUUKAdQfeLfdovxApraOXMG3gzKFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713298358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aPQkOb72h+D1/e7XjuLmQYquFHWole+PXDzHB/hoQNw=; b=AX849OL3R92MyKuVNyGVNj+JxqilWK0oHAKYxjUhSoyeHCpSVD/J2ffAIjFJH84V9qobqJ 58wqWi01Ft+kUzfCb14gCCii1CZDyFDBGQgfMHUU9YTZvaiTnv62B0Gt1VPqrWerBGvA6H nuI6On+E7fF35yoekrYeVdFWQbdBFLJfuH3U6OIAUor7TFgpdvbojjZUfrYaVfa2lDLAsI m9iXLE8Y82bFaqby6cfuZDxTLNGzEEZRzTbmLNWLgV4j/RyZRLWijuSHmf+unjU7ZNhzxo rOw3futOwWufBId/HbGtww3EUPDufhQK8qN+OOm76E1YeyXJOzsS/58UHhZaaw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VJwFL5rSgzwhc; Tue, 16 Apr 2024 20:12:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43GKCc1N037507; Tue, 16 Apr 2024 20:12:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43GKCc6i037504; Tue, 16 Apr 2024 20:12:38 GMT (envelope-from git) Date: Tue, 16 Apr 2024 20:12:38 GMT Message-Id: <202404162012.43GKCc6i037504@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 3601f439783a - stable/14 - loader: export the CMD_ constants in loader table List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3601f439783a711c3860e9770cb654670b8e4ed1 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3601f439783a711c3860e9770cb654670b8e4ed1 commit 3601f439783a711c3860e9770cb654670b8e4ed1 Author: Warner Losh AuthorDate: 2024-02-14 17:51:58 +0000 Commit: Warner Losh CommitDate: 2024-04-16 19:54:22 +0000 loader: export the CMD_ constants in loader table Export the CMD_OK, etc constants in the loader table. They are the return values of loader.perform, etc. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D43821 (cherry picked from commit 62a52c15422470f97fc7b311d89c83f910bcc1b1) --- stand/liblua/lutils.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/stand/liblua/lutils.c b/stand/liblua/lutils.c index 274d9a39da21..8066d3f685f7 100644 --- a/stand/liblua/lutils.c +++ b/stand/liblua/lutils.c @@ -639,6 +639,16 @@ luaopen_loader(lua_State *L) lua_setfield(L, -2, "lua_path"); lua_pushinteger(L, bootprog_rev); lua_setfield(L, -2, "version"); + lua_pushinteger(L, CMD_OK); + lua_setfield(L, -2, "CMD_OK"); + lua_pushinteger(L, CMD_WARN); + lua_setfield(L, -2, "CMD_WARN"); + lua_pushinteger(L, CMD_ERROR); + lua_setfield(L, -2, "CMD_ERROR"); + lua_pushinteger(L, CMD_CRIT); + lua_setfield(L, -2, "CMD_CRIT"); + lua_pushinteger(L, CMD_FATAL); + lua_setfield(L, -2, "CMD_FATAL"); lua_add_features(L); /* Set global printc to loader.printc */ lua_register(L, "printc", lua_printc);