From nobody Wed Feb 14 17:55:46 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 4TZm824zCxz51dcw; Wed, 14 Feb 2024 17:55:46 +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 4TZm8242z9z4MBg; Wed, 14 Feb 2024 17:55:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707933346; 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=58SzIsSMUHnxQUqFNtM7jrLEbh3lvYj/EqPlE4tJR2c=; b=jIXc5OuaFPpkz4PfMebi2yGuUwBU7G5aocNCgd3SHQrd5tegNMiEVNjP5KHCbIb1O95POd JjGxZg+lPjT52KRkZmwSTYvhNw+u+G/WoLlo/jirR48EGXc2tvjAubL/R45h2VuSU93TtH eqleQqT8Y0X89KK2k4ETDaCJMGytgAWOZzfWfg183Pz2yzkhzUGiekar7C0G+3/2mL/aMV Qdc2or7wokeDc/H0esYJsH9chlxcsA7xntOWBf8A14BRLtHwxSpMBf5PbhbPHNhIqeMFm7 s1YqHGLRNKNoOYsBDHklNzdd/1AH5V14Z6Ub5VMwFltHkegnCP/29Hht8965yg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707933346; a=rsa-sha256; cv=none; b=K1oPRU2J2d/S6odMFr2bfVvWd4ceveQOkQO9qsytOp8xXhzMPwnxpBDfQQEElVLscNtycI 1EVzq2VRS2U79E7XgSaBWVpSfaJPfXr4Vc+gNIGBzFXeFRaq+u23G6wxd57oMvp15JXVWF OEh4G+O3a5hn7jSEbrdpih5DQd8xw8mwwKKDJCmWZ2fSZQp7hq+cSxueSWEwfos60R5hbZ 1vFE9we6sYV5UlwVujAZoqCYxkvOf7uRQPZF222sTaeholDTWylTxyvtf7cbkMtHrATn21 9G9kAIWDWFICCM9oyCCyeUIWuOTXXmArmSc54W8TCxPHRzu/9IOnQrfAjFS0hw== 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=1707933346; 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=58SzIsSMUHnxQUqFNtM7jrLEbh3lvYj/EqPlE4tJR2c=; b=ohsN+EwHWzD7nUI6761GdRngMbpVd3B6zeZw6Sz295NU1uIeqWHvvRpgK1uqhutypDrU6Q dNmkQPGi/DlojudZ6fw37bRSCdQhjiw/FUmcHz1rMF/oPcqxPxz6LSOTTw2AHWx3MpuzcR KpDcAGZMuhuoVBerfBgNqSP/dOTCzgwX+BbORPILEeehxnD4IM5BqqNS6wZBdHoajbZoyE n0NybyvzZ37ZUUPvjLi5wIsbI6Ceqga2akxj56vlSGOMJUg5NfnZeJjJkA9O0Ry/w/EAHg MA9vAs1pUhNmD/68DQOZ+g0QY/9RXF3BG/GcEBo0/0t5j6Q5Nu5jDqrW0JtAJQ== 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 4TZm8238Cnz17S2; Wed, 14 Feb 2024 17:55:46 +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 41EHtkkF083054; Wed, 14 Feb 2024 17:55:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41EHtk2T083051; Wed, 14 Feb 2024 17:55:46 GMT (envelope-from git) Date: Wed, 14 Feb 2024 17:55:46 GMT Message-Id: <202402141755.41EHtk2T083051@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 62a52c154224 - main - 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/main X-Git-Reftype: branch X-Git-Commit: 62a52c15422470f97fc7b311d89c83f910bcc1b1 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=62a52c15422470f97fc7b311d89c83f910bcc1b1 commit 62a52c15422470f97fc7b311d89c83f910bcc1b1 Author: Warner Losh AuthorDate: 2024-02-14 17:51:58 +0000 Commit: Warner Losh CommitDate: 2024-02-14 17:55:38 +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 --- 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);