From patchwork Tue Oct 24 09:20:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Storm, Christian" X-Patchwork-Id: 829824 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:400c:c0c::240; helo=mail-wr0-x240.google.com; envelope-from=swupdate+bncbdd6bwv65qpbb2elxthqkgqeuturdoa@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b="iEiPIKFx"; dkim-atps=neutral Received: from mail-wr0-x240.google.com (mail-wr0-x240.google.com [IPv6:2a00:1450:400c:c0c::240]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yLnn93H9Nz9sDB for ; Tue, 24 Oct 2017 20:20:44 +1100 (AEDT) Received: by mail-wr0-x240.google.com with SMTP id 4sf6596354wrt.8 for ; Tue, 24 Oct 2017 02:20:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1508836841; cv=pass; d=google.com; s=arc-20160816; b=cIJJwQ0G+NIpGxeFqsjQeKIvxZVXI53k/iJMAZI9mSVRFlVwzO0ygy59b5X/kjeZNv ALelVJ45iQS6Igawn4Xmgkv2PDHACfmfxmxGaUP2AC/Xp2QkIDxonVWrSHBJApy9WqF0 spe6PkwGVEELvpjGz+FU3lVW/e/7AhBTWPDvudawfxLp7kekLgVUFhLEtVCWVgHVMahe 4F/UW2+URfFIbVqmRNbV8HmF4X3evnQ2lHBt1BL50lhGlYE2KCtGd9qaAyoSMITdmTgq fobRhNKe0nWtpiaaqd8tUzeN7YCbvBv1g403E3OkhrWK8TEzu0757l6Q0+nzFQHwTWmP 3Vzw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:message-id:date:subject:cc:to:from :arc-authentication-results:arc-message-signature:mime-version :sender:dkim-signature:arc-authentication-results; bh=ZCcZcSTy6vHYnLFW0KbiAXuoIG6sKAU7axaf58ZTKxA=; b=unbwWtemE110GKlHwoeLWFvomQR6yzZGAj9OotJDLc0Z+WUaTepRm4ThoB/AM6wld7 8Ryvpe0E09f+eq5CO0hULvEavIs6QX2O9WpswjGzNrKHls3Yfi/eDXv3dZqCKOWKuaWp Jyd/9ClHcAaNfSaLlAfwWCK1bqoz9eVeSbGnA4EkWBT1JEGxIUKwIo2f1GJnCLiBszGL 2buvV6JLndd7ziohUxqqMpWKK9DCr8RULpgdzJfi0WP2jG7QCvVd1GqpY3xyql/hC/Qp igEiveU1bDJlj3H3WwcONXLC+IwxKiIbZuWdhczgg7VCrQCKE9+QMr5ZSXLnJ3kLVFQe ubMg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of christian.storm@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=christian.storm@siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:from:to:cc:subject:date:message-id :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=ZCcZcSTy6vHYnLFW0KbiAXuoIG6sKAU7axaf58ZTKxA=; b=iEiPIKFx3i+O2ssFTYFbYW6Qw9F1GJVhspu1HgF35YKORx2uwZX+6UuhNup6ET2w6A ZTkLVP3xSgmtqjShvIWyBi0R898rXiMIcM7YH0VgdIxoOTu+zPiXmm1hJVD3vTbpoqon PDhvbGeZExlWeL2NF2Y/Tjju/A9VhcgVQXZFStDe6C5vq+ygpYNvT+3t9j4y4mhzMbcq +1uK8cBrnUueaJ5r0zrDEkMiNOaqskyf/Wti+PKs+gJJExOVs1evZaH2tvLJTZLoG+L8 Z+utwFfhBWLfRMTVsSvhj8zC4GZmdDZYq9SrUsRfgBhq58eGBeQuCnJGPuf5PwN22LGG fdkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:from:to:cc:subject:date :message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=ZCcZcSTy6vHYnLFW0KbiAXuoIG6sKAU7axaf58ZTKxA=; b=eU4Ab5WCeTXGvMYXfLrtp446Cl+WhHSbrQOFFqW5YMoBIiONMK+lRYM0MGSbUygoeR dM9Uy6FFUQH2V7TiudpLXCRfvoooYawDRDhHaggQLpVYB+UusR2NDLy4L5N7SSfcZICl qOkNfCpniwk8WpIa2TZyHYHRdQS9fNsBKVd2c96AnEoIYTa1YvuMMiqGiGJrw5NX94wk PXgxhwBP2mNTQlfVI4dBYqU5TjZ0crXHiPTz46wEoYnAWxhSHTZQMREQxkHOfw4/+Pbm jn6c+Kdr0zfANvP5jqdWpGQtiIIb8DlOAIPLMoAwJ7oGGFkPIXqAvDPWFAPe7yxYR5cH nHUw== Sender: swupdate@googlegroups.com X-Gm-Message-State: AMCzsaUKDx7RXtHbX/L1kVo/XB5nQjDAkJ0M4wXEba04ICANCLE/68qn VqGT0EwPo0EisPR0K3UZMmU= X-Google-Smtp-Source: ABhQp+Qv5THQPD1ZJ3oWAcl/a9wEgiGPRGOuj1jvWKZakh11s9uuU3Xmb/WMtryVy2Jx9mUspeYWjg== X-Received: by 10.28.199.202 with SMTP id x193mr93538wmf.1.1508836841096; Tue, 24 Oct 2017 02:20:41 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: swupdate@googlegroups.com Received: by 10.223.157.208 with SMTP id q16ls325046wre.6.gmail; Tue, 24 Oct 2017 02:20:40 -0700 (PDT) X-Received: by 10.223.139.198 with SMTP id w6mr1363926wra.4.1508836840697; Tue, 24 Oct 2017 02:20:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508836840; cv=none; d=google.com; s=arc-20160816; b=mglDy9GUFwW9W7vn7h7NVetTOTjIFo777222g6Wefjuc2ZPaE3KQ4KqmXxLFEg6d0y 38gO6vid2kl7oY6ao55VecTZ/4b5FXrt+CZxQL2PsgSXhbuH2sK+KDKBuG7OXZAnSS7c Z7rhUR1WxWOagcszLQRV5T4w6p2Q2v8FrHarbm3hQGO+10nAeBDMcUmP87iqGgqwToUT SqZ6cG8K/Jxoxm/uwQH4ELs6RBGdRWVW4K19NJ22TQDoyfZQSWtzwn3tYt/lmc9Z1ON8 626fgjngCNPZ5oWJuSh9gH+Pn+nf/r/1QTy1je6XRyjiAMnH+5gvO0sQFPZdh3SYIrOU 7Kjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:arc-authentication-results; bh=/VwfODZy71njVL2CXQKsRQVH/jHXFuRx+/3iSVIvwKo=; b=ZgwGhXOoYNXPtaWPnEeoKJbou5viQkkDKvbMV17fUZFbaKNxCODwIppbN2R3M6Bha0 jLn55rJcfDATzOAPrQyo3ncIHfVsWn81ge+gkbf2t9DlYXP1xPdvHxzodd34F14VgFQc cr/qvJI8OLj4whFLG6jgwiLEo0Zbz/m5Ti5no0PYJ/SY3PnWvPm5oo0NoQiusrYlEmOI k7Vqx+iBykapIIWI1e/7Nc0jee72wQUKeLaFteZ0UI521fTjgb6zT0LKcpvA80TTYgOU A7eTIpq1r4S4WMDYR2kIE+8wJ2PjqoWm821exWw4/Ls9tv+ivTlOqdOgpKnCiGcoqDOu SqTA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of christian.storm@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=christian.storm@siemens.com Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id o2si74815wmf.1.2017.10.24.02.20.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Oct 2017 02:20:40 -0700 (PDT) Received-SPF: pass (google.com: domain of christian.storm@siemens.com designates 192.35.17.2 as permitted sender) client-ip=192.35.17.2; Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id v9O9KeaV026954 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 24 Oct 2017 11:20:40 +0200 Received: from MD1KR9XC.ww002.siemens.net ([139.25.69.251]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id v9O9KeLY030456; Tue, 24 Oct 2017 11:20:40 +0200 From: Christian Storm To: swupdate@googlegroups.com Cc: Christian Storm Subject: [swupdate] [PATCH] Lua: fix spelling of Lua #2 Date: Tue, 24 Oct 2017 11:20:06 +0200 Message-Id: <20171024092006.19378-1-christian.storm@siemens.com> X-Mailer: git-send-email 2.14.2 X-Original-Sender: christian.storm@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of christian.storm@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=christian.storm@siemens.com Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , According to Lua's about page (https://www.lua.org/about.html), section "What's in a name?", Lua should be spelled "Lua". Commit 5810b5e has fixed the documentation, this commit fixes occurrences in other places. Signed-off-by: Christian Storm --- README.md | 2 +- corelib/lua_interface.c | 42 +++++++++++++++++++++--------------------- doc/source/roadmap.rst | 2 +- examples/lua-xml/xmlparser.lua | 2 +- handlers/Config.in | 4 ++-- include/handler.h | 2 +- mongoose/Config.in | 2 +- parser/parse_external.c | 2 +- 8 files changed, 29 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index afb5446..b15b4e1 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ such as as NOR / NAND flashes, UBI volumes, SD / eMMC, and can be easy extended to introduce project specific update procedures. -Pre- and postinstall scripts are supported, and a LUA +Pre- and postinstall scripts are supported, and a Lua interpreter helps to customize the update process. An update package is described by the sw-description file, diff --git a/corelib/lua_interface.c b/corelib/lua_interface.c index 8e8e077..6694a30 100644 --- a/corelib/lua_interface.c +++ b/corelib/lua_interface.c @@ -168,9 +168,9 @@ int run_lua_script(char *script, char *function, char *parms) } /** - * @brief convert a image description struct to a lua table + * @brief convert a image description struct to a Lua table * - * @param L [inout] the lua stack + * @param L [inout] the Lua stack * @param software [in] the software struct */ @@ -311,12 +311,12 @@ static void table2image(lua_State* L, struct img_type *img) { } /** - * @brief function to send notifications to the recovery from lua + * @brief function to send notifications to the recovery from Lua * - * This function is exported to the lua stack and can be called - * from any lua script in the same context (Stack) + * This function is exported to the Lua stack and can be called + * from any Lua script in the same context (Stack) * - * @param [in] the lua Stack + * @param [in] the Lua Stack * @return This function returns 0 if successfull and -1 if unsuccessfull. */ static int l_notify (lua_State *L) { @@ -362,7 +362,7 @@ static int l_info(lua_State *L) { } /** - * @brief array with the function which are exported to lua + * @brief array with the function which are exported to Lua */ static const luaL_Reg l_swupdate[] = { #ifdef CONFIG_HANDLER_IN_LUA @@ -383,9 +383,9 @@ static void lua_push_enum(lua_State *L, const char *name, int value) } /** - * @brief function to register the swupdate package in the lua Stack + * @brief function to register the swupdate package in the Lua Stack * - * @param [in] the lua Stack + * @param [in] the Lua Stack * @return 1 (nr. of results on stack, the 'swupdate' module table) */ static int luaopen_swupdate(lua_State *L) { @@ -424,17 +424,17 @@ static int luaopen_swupdate(lua_State *L) { static lua_State *gL = NULL; /** - * @brief wrapper to call the lua function + * @brief wrapper to call the Lua function * - * The reference to the lua function is stored in the registry table. + * The reference to the Lua function is stored in the registry table. * To access the reference the index into this table is required. The * index is stored in the void* data pointer. This is due to the fact - * that c can not store a direct reference to a lua object. + * that c can not store a direct reference to a Lua object. * * @param sw [in] software struct which contains all installable images * @param index [in] defines which image have to be installed * @param unused [in] unused in this context - * @param data [in] pointer to the index in the lua registry for the function + * @param data [in] pointer to the index in the Lua registry for the function * @return This function returns 0 if successfull and -1 if unsuccessfull. */ static int l_handler_wrapper(struct img_type *img, void *data) { @@ -467,7 +467,7 @@ static int l_handler_wrapper(struct img_type *img, void *data) { image2table(gL, img); if (LUA_OK != (res = lua_pcall(gL, 1, 1, 0))) { - ERROR("error while executing the lua callback: %d\n",res); + ERROR("error while executing the Lua callback: %d\n",res); puts(lua_tostring(gL, -1)); return -1; } @@ -479,24 +479,24 @@ static int l_handler_wrapper(struct img_type *img, void *data) { } result = lua_tonumber(gL, -1); - TRACE("[lua handler] returned: %d\n",(int)result); + TRACE("[Lua handler] returned: %d\n",(int)result); return (int) result; } /** - * @brief function to register a callback from lua + * @brief function to register a callback from Lua * - * This function is exported to the lua stack and can be called - * from any lua script in the same context (Stack) + * This function is exported to the Lua stack and can be called + * from any Lua script in the same context (Stack) * - * @param [in] the lua Stack + * @param [in] the Lua Stack * @return This function returns 0 values back to Lua. */ static int l_register_handler( lua_State *L ) { int *l_func_ref = malloc(sizeof(int)); if(!l_func_ref) { - ERROR("lua handler: unable to allocate memory\n"); + ERROR("Lua handler: unable to allocate memory\n"); lua_pop(L, 2); return 0; } else { @@ -527,7 +527,7 @@ int lua_handlers_init(void) luaL_openlibs(gL); luaL_requiref( gL, "swupdate", luaopen_swupdate, 1 ); lua_pop(gL, 1); /* remove unused copy left on stack */ - /* try to load lua handlers for the swupdate system */ + /* try to load Lua handlers for the swupdate system */ #if defined(CONFIG_EMBEDDED_LUA_HANDLER) if ((ret = luaL_dostring(gL, EMBEDDED_LUA_SRC)) != 0) { INFO("No compiled-in Lua handler(s) found."); diff --git a/doc/source/roadmap.rst b/doc/source/roadmap.rst index 07fbe3a..9999b40 100644 --- a/doc/source/roadmap.rst +++ b/doc/source/roadmap.rst @@ -79,7 +79,7 @@ Some ideas for new handlers: - Package handler to install packages (ipk, deb) Packages can be inserted into the SWU and the atomicity is guaranteed by SWUpdate. - - LUA handlers should be added if possible to the project + - Lua handlers should be added if possible to the project to show how to solve custom install. There are custom specific solutions - I will be glad if these additional diff --git a/examples/lua-xml/xmlparser.lua b/examples/lua-xml/xmlparser.lua index 66a9799..158bdc0 100644 --- a/examples/lua-xml/xmlparser.lua +++ b/examples/lua-xml/xmlparser.lua @@ -1,5 +1,5 @@ ---------------------------------------------- --- Test XML parsing with lua +-- Test XML parsing with Lua ---------------------------------------------- lxp = require "lxp" diff --git a/handlers/Config.in b/handlers/Config.in index 86a78ef..818b8a0 100644 --- a/handlers/Config.in +++ b/handlers/Config.in @@ -88,7 +88,7 @@ config RAW into the destination. config LUASCRIPTHANDLER - bool "luascript" + bool "Lua Script" depends on LUA default n help @@ -104,7 +104,7 @@ config SHELLSCRIPTHANDLER is called. config HANDLER_IN_LUA - bool "Handlers in LUA" + bool "Handlers in Lua" depends on LUASCRIPTHANDLER default n help diff --git a/include/handler.h b/include/handler.h index 0659ff6..04165c9 100644 --- a/include/handler.h +++ b/include/handler.h @@ -30,7 +30,7 @@ typedef enum { } script_fn ; /* - * Use enum for mask to easy transfer to LUA + * Use enum for mask to easy transfer to Lua * scripts */ typedef enum { diff --git a/mongoose/Config.in b/mongoose/Config.in index 2a69f92..27c98f3 100644 --- a/mongoose/Config.in +++ b/mongoose/Config.in @@ -18,7 +18,7 @@ menu "Mongoose Feature" depends on MONGOOSE config MONGOOSELUA - bool "lua interpreter" + bool "Lua interpreter" depends on LUA default y help diff --git a/parser/parse_external.c b/parser/parse_external.c index 4f2702a..b876c07 100644 --- a/parser/parse_external.c +++ b/parser/parse_external.c @@ -150,7 +150,7 @@ int parse_external(struct swupdate_cfg *software, const char *filename) if (lua_pcall(L, 3, 4, 0)) { LUAstackDump(L); - ERROR("ERROR Calling XML Parser in LUA"); + ERROR("ERROR Calling XML Parser in Lua"); lua_close(L); return 1; }