From patchwork Wed Jun 29 13:35:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Storm, Christian" X-Patchwork-Id: 1650076 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=i/LvvSX5; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::33a; helo=mail-wm1-x33a.google.com; envelope-from=swupdate+bncbdd6bwv65qpbbvfj6gkqmgqezymajby@googlegroups.com; receiver=) Received: from mail-wm1-x33a.google.com (mail-wm1-x33a.google.com [IPv6:2a00:1450:4864:20::33a]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LY2Vx0bvMz9sFk for ; Wed, 29 Jun 2022 23:34:16 +1000 (AEST) Received: by mail-wm1-x33a.google.com with SMTP id m20-20020a05600c4f5400b003a03aad6bdfsf6509114wmq.6 for ; Wed, 29 Jun 2022 06:34:16 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1656509652; cv=pass; d=google.com; s=arc-20160816; b=OiIc7/o7xRGKI/00pX/Aw7sN16FaE+M1IsRAR+nLZA12W4BQLXYRYfYWiJ9l2TA7p3 5mTMuj1G3kl+mava/vmrHsV2mgShw05tGvfYJXT4ouoXkStfclxMUaYBNvH8tjOc8Ws9 TP/e746NVToF02QHv6MnguGaTccN8c/c0t7WzLY8gCcTfnh1/7HR/qiVzc0SdPYyW/sk ykMESVP0Oa5K1ygyxOl0p733nZV8V04wImA/2n8CgENtFRL+6m+5+hHwwdOOQ8mjG0VE fkRKVbN8wmX0HTXsPMyrJz56d2XL1kbs1GhOzdELbRjnF1L2yULs24DpJXYtzuyHtcFA PIeA== ARC-Message-Signature: i=3; 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:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=CprM47XS2Tus+vyqbaWQRKFFCGDjXUrHUWGljCYJG7s=; b=NvLWaxvfkw4C+LI7mK4IFG6DsX8q+a9DHKQtjC9srOE9eRlvraxz/UW+Z7gkDrhcCg F/uteuu5NjZK8fojrLj7aIR0sCJUmAXwewg3rjmnb9XkdsmzuOjMVle6W2zBr+aVKLHu oLBaZgV6lOVbJJouNnkgxw+l7FXXlKnjBCXXCjgWn1z9DNsSP5FxZuv6244H0w6l1ZTT gLHemvXSPNjbrWYBvXPOCwKGL8Bb8jGAJqMBXTD82ErEHQuyTWPbwvUY2GnQ9PgD0cqp nbLP/cUyoAPiSDaaoYlos8v0HyXrzdbrd2JhTccelaNl/j6Nmrog9FsO+4PQMZqT4nPv /kdg== ARC-Authentication-Results: i=3; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=znlV5JgV; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of christian.storm@siemens.com designates 40.107.0.79 as permitted sender) smtp.mailfrom=christian.storm@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=CprM47XS2Tus+vyqbaWQRKFFCGDjXUrHUWGljCYJG7s=; b=i/LvvSX5MZMedU/wsdAdRQFlc0zJ9/qjOOIVn2hZtUj57VfPzeOvtvsbGiWoL+w4kH zSodNVh5ICaiCodnqwBoB8GqTsFMeEjx4soqt+VfJeQ4P90AaZC4n4by1kHyf7SFoZfC G2O9Le6roxdDUKhXuKdYJicMdgWKac2CIcIuE1tuj2RAnWjw0caPZmT5uCHvmhI0vrg2 ym7b4Fcz/9UwPIPZ0xfUD14P++WrGPJbylosd2OXEFH1Hk+BT5LgPRyCdwaFoLz2Wv5U Es21Depvh70RQgFzXJiQV1tRr2cD033hhMUkyju3AE8oOhQexo5AMB1atkivuS/kQm1M DOQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :mime-version: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=CprM47XS2Tus+vyqbaWQRKFFCGDjXUrHUWGljCYJG7s=; b=gJkZepdi2SAavG+4CQqrowQUTCuMgkqYs/NV3ujnqExNgNxzAmiJYNORE6WGNAG8CA aQyL5rimuyv8nPsVfsvPt1WluH+bAyx2zoFUMkEUV5q2NS8ZZ6zgLl+Ji25e3hwiq2Zs Y0UTOb77k1Vmf7k2kgyryT6AKULPow/SoLWmj0XOLl8M2udXTrHz8AiwV43aiwdiZ5VE pIcmtKZu6HVpyAVEa+flzFhblHSqMAKow1NOrblkby7MEJMdTb95abuptzJLz7QwYY3a c1lo/sMVxWY9xofOKG1ABZpTs7UFD9W7vOCYhFPcKEUOAS6WQ6FjHkifMpm91K2usUGs Uj9w== Sender: swupdate@googlegroups.com X-Gm-Message-State: AJIora9WCu4j1vd+3UpIcCjsJbxfY2x9DwEME43JWl2PZyMMXYuBZ+bi DiID6kKmKw3N71ecC3PY4y8= X-Google-Smtp-Source: AGRyM1sHom55mSli+k6KgswEEMB29hDFW2L4MroHVBwpv70m+up1ljbnQLXnod5+tgYY1dzm2XvMuA== X-Received: by 2002:a5d:6d84:0:b0:21b:9acb:c478 with SMTP id l4-20020a5d6d84000000b0021b9acbc478mr3152838wrs.491.1656509652442; Wed, 29 Jun 2022 06:34:12 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:600c:4ec7:b0:39c:871d:313f with SMTP id g7-20020a05600c4ec700b0039c871d313fls1654919wmq.2.canary-gmail; Wed, 29 Jun 2022 06:34:11 -0700 (PDT) X-Received: by 2002:a7b:c20d:0:b0:3a0:39e4:19e8 with SMTP id x13-20020a7bc20d000000b003a039e419e8mr5770804wmi.166.1656509651324; Wed, 29 Jun 2022 06:34:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1656509651; cv=pass; d=google.com; s=arc-20160816; b=1GRCfBO+LKXa2KnINQfcse+HLTaAw+wgvvvqLZLUMlgsE5m/yhrb9WDCbPU3Dw7KhT ZKWkPOLmy/Fli38IRIL/e+G1lETkICfQdhDNvlCDb9oH6uJLOQADM+nN54muTto8MOHZ vz0/bDwJz8JILzbobkNc/x49MyC/Snjmi1xon/f1JfKJF5F608ID4cPItMh64v4oHVMY SHlIjNgRJTH/AYnK5d2ZDIanDKotb+lRGP0OcGxTbCGNGrIPvzgu9+NshKlP5zUF8uiY VwCLnfv2ZY9ic2ydkDJy2Uiyizdzsdw40sLCngRFqLQ+IyJ1HCI6Dwh0nIt6rn5t8vFq o8ow== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=fh/O1JUPv7BljpT6cnofFMB7IcC9349dQP4H8vug2xI=; b=h9DExxNWXAcM6L1AHP7dBSnPTZCZIWrCSqzrOXNWjCTTovWExgYfWspxohHfQuhLUs eUpQmCx80YR76nvoNB6u3a82e+ZmgwYeFYc2/7Wuebwfvl7eM0nzknUjxtOhUqmdHAvN 4AoAataj5PrnqlZ3ZrOanGLOKyTTyosDpuIdvv29EQNMlxGyaqK4e/8Zsxuyj5TvMBJ6 jE8meBsJkGQT9GH32eA4qPpsB/uIm7wr3UCnmb9maU8A3LqYdjONY6xUhqxKmi+25I34 Ylziy27KBHBCi2mr5B8szs4u8FBM0XZD2UwOKMLxA95KR/le9qJYtr6pjgoaMvaCr2mW rPCg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=znlV5JgV; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of christian.storm@siemens.com designates 40.107.0.79 as permitted sender) smtp.mailfrom=christian.storm@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00079.outbound.protection.outlook.com. [40.107.0.79]) by gmr-mx.google.com with ESMTPS id l187-20020a1c25c4000000b003a050f3073asi169261wml.4.2022.06.29.06.34.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Jun 2022 06:34:11 -0700 (PDT) Received-SPF: pass (google.com: domain of christian.storm@siemens.com designates 40.107.0.79 as permitted sender) client-ip=40.107.0.79; ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oT3EEgktKEp0hGRC+TCIAFu8n2ICemq9Gt8jIpzcnp0aqa03Rrq2Q+4Xp63VIO8+UUB0no5DhlaBzLpKuliHvcoixrJWYMCQnSK95oPtdcZLQXjhLgNIEbSDo8Mj707Hkp0/GJJ9SYsmBSJoGqu/fht15clP2PBXBS37Wk54lJh/8bYGLz2+VuMxgiUGFJv/lci2qkRXgmdlMxU7WiEnTraKSsZqcIa/weRmvFu6hLzCfdtGIqFxwd3sqo8DNO2laLgfKwH5QhIYuC5yloux/9t5C/I4ndI9i7dtmLuxmEHmvg77A6s8J8GG0bozqm+XuKawVUZ4nD7SYue4jqq6Ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fh/O1JUPv7BljpT6cnofFMB7IcC9349dQP4H8vug2xI=; b=O89XqREy4aGZaRVzt6enWEjZLPUc9TAHWEvfqy9WxaABaZ/onAXDHaG3D9gsdRY/wSA5XSuBd8BYie3S3n2YGms+EvWoXopZx4Oe3xnYpffCK8NcRJKiSMNSmq4W1SJw6sDIYoyvSTPBRSHp0zEEw0U8JwP04bJmH25xklraLyh9qcW/XBwX7iD4u5xrESpUjR//UHbEfFsrK8BVdsv8xywqEKaZVP9PZBsmupKgij4V7+7ECozNt2zSdPVsrWZ677mahAztWpLHAGGhxggXmqQVG0aBpTX35vdsKBnm+gUuSzz6G8sOm/6WUqOaqKaTTkMWTLo+np4ilAvxmCP/sA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 194.138.21.71) smtp.rcpttodomain=googlegroups.com smtp.mailfrom=siemens.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=siemens.com; dkim=none (message not signed); arc=none Received: from OL1P279CA0027.NORP279.PROD.OUTLOOK.COM (2603:10a6:e10:13::14) by AM7PR10MB3511.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:132::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.18; Wed, 29 Jun 2022 13:34:10 +0000 Received: from HE1EUR01FT003.eop-EUR01.prod.protection.outlook.com (2603:10a6:e10:13:cafe::8b) by OL1P279CA0027.outlook.office365.com (2603:10a6:e10:13::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.14 via Frontend Transport; Wed, 29 Jun 2022 13:34:10 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 194.138.21.71) smtp.mailfrom=siemens.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=siemens.com; Received-SPF: Pass (protection.outlook.com: domain of siemens.com designates 194.138.21.71 as permitted sender) receiver=protection.outlook.com; client-ip=194.138.21.71; helo=hybrid.siemens.com; pr=C Received: from hybrid.siemens.com (194.138.21.71) by HE1EUR01FT003.mail.protection.outlook.com (10.152.0.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15 via Frontend Transport; Wed, 29 Jun 2022 13:34:10 +0000 Received: from DEMCHDC8A0A.ad011.siemens.net (139.25.226.106) by DEMCHDC9SKA.ad011.siemens.net (194.138.21.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.9; Wed, 29 Jun 2022 15:34:09 +0200 Received: from cosmos.fritz.box.net (139.22.41.144) by DEMCHDC8A0A.ad011.siemens.net (139.25.226.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.9; Wed, 29 Jun 2022 15:34:08 +0200 From: Christian Storm To: CC: Christian Storm Subject: [swupdate] [PATCH 1/3] bindings: Lua-export RECOVERY_STATUS and sourcetype enums Date: Wed, 29 Jun 2022 15:35:16 +0200 Message-ID: <20220629133518.48057-1-christian.storm@siemens.com> X-Mailer: git-send-email 2.37.0 MIME-Version: 1.0 X-Originating-IP: [139.22.41.144] X-ClientProxiedBy: DEMCHDC89XA.ad011.siemens.net (139.25.226.103) To DEMCHDC8A0A.ad011.siemens.net (139.25.226.106) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a5b1d737-f3e8-4f3a-5a91-08da59d40c6c X-MS-TrafficTypeDiagnostic: AM7PR10MB3511:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: j3HNAu7WZ+2kCcn4+aoxg7fpFsJH2x9UAHl7MmgOxAjzcH31EVep/4J9P3QuMJDkgrK6+9qkPDcmO2eFBNkD1Z78G0oqcYvUeuWsSTiN9nknktzqqgEoExJDaCmHdIKp53PC8nnZoHu6DbEZO7+DjxdGRMf5XVFZGmpSjJrH0AhdbmKBJjnhbMkOKK/EwklirwqrrZ0XDnQK3gNCU/z50C/tmOmWx+5afXAT66wDEp9iCSB2bNVdup+rkxFxY8XsGkEvbWdH/IGbS6W9VOgA6a2pduzyREfwvEQfwKR4x/8ex4Wxrun1pGA8WBjFK1vnErEaOFC/YAj5/o4yQS21KDxM7zjm+P9TveSOeJSwWLRI+VtuX/3325wR5suP02nZm64CPaQvmUXaQMkQRKD5byfvmoLXhsyQipuJ/kr3zq0i9Kw0pXO1G5Wzt3RA2VbjFGE4iBpm5RgQkRSQ/Z654cYUc3VpELrUnkoyLh3XmlaQk1Iu5OlUjUcnR2L0/+5WhtGVC6QfEBynz/e88J7WnE1jtMoRlqac1jB3v7LY5ItHw+DjbtDRqtjY6IrYlfxk3Z/ylp8fp1RniU8JYN0QCyL5B5bJuQ74QBYXM8vKlQtBSWkbSFcUxNc+Oksta11LQ82y22PMSD9AkVIlr4XnNifHDqnPO+fhEBwyIa6HLoRSDIyTSSwa1/qHp3qWLTwXSC8mB0Q8DpnK4ycFDs/tYzjmFnLdK/OhSt+4yS2FCET+ZIScBPxLtYcalgKJS/y2pQrtW5QH6rYJf3v+VOlnqxSH3KufzVg1zKRMOigTpgws7XGXZRoaIRgsrxLd6n5wTW0X8synoTXk1Yb4v7RLUQ== X-Forefront-Antispam-Report: CIP:194.138.21.71;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:hybrid.siemens.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230016)(4636009)(396003)(136003)(346002)(39860400002)(376002)(40470700004)(46966006)(36840700001)(82310400005)(186003)(6916009)(47076005)(81166007)(107886003)(36756003)(2906002)(8936002)(356005)(5660300002)(16526019)(83380400001)(316002)(956004)(336012)(2616005)(1076003)(86362001)(36860700001)(70586007)(70206006)(82960400001)(44832011)(8676002)(4326008)(40480700001)(82740400003)(40460700003)(6666004)(26005)(478600001)(41300700001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2022 13:34:10.0369 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a5b1d737-f3e8-4f3a-5a91-08da59d40c6c X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=38ae3bcd-9579-4fd4-adda-b42e1495d55a;Ip=[194.138.21.71];Helo=[hybrid.siemens.com] X-MS-Exchange-CrossTenant-AuthSource: HE1EUR01FT003.eop-EUR01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR10MB3511 X-Original-Sender: christian.storm@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=znlV5JgV; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of christian.storm@siemens.com designates 40.107.0.79 as permitted sender) smtp.mailfrom=christian.storm@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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: , Export the RECOVERY_STATUS and sourcetype enums to the Lua realm to improve the Lua API convenience as those are referenced in progress():receive().{source,status}. Signed-off-by: Christian Storm --- bindings/lua_swupdate.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/bindings/lua_swupdate.c b/bindings/lua_swupdate.c index 74efad7..28ace88 100644 --- a/bindings/lua_swupdate.c +++ b/bindings/lua_swupdate.c @@ -361,6 +361,32 @@ static const luaL_Reg lua_swupdate[] = { */ int luaopen_lua_swupdate(lua_State *L){ luaL_newlib(L, lua_swupdate); + + /* Export the RECOVERY_STATUS enum */ + lua_pushstring(L, "RECOVERY_STATUS"); + lua_newtable (L); + LUA_PUSH_INT("IDLE", IDLE); + LUA_PUSH_INT("START", START); + LUA_PUSH_INT("RUN", RUN); + LUA_PUSH_INT("SUCCESS", SUCCESS); + LUA_PUSH_INT("FAILURE", FAILURE); + LUA_PUSH_INT("DOWNLOAD", DOWNLOAD); + LUA_PUSH_INT("DONE", DONE); + LUA_PUSH_INT("SUBPROCESS", SUBPROCESS); + LUA_PUSH_INT("PROGRESS", PROGRESS); + lua_settable(L, -3); + + /* Export the sourcetype enum */ + lua_pushstring(L, "sourcetype"); + lua_newtable (L); + LUA_PUSH_INT("SOURCE_UNKNOWN", SOURCE_UNKNOWN); + LUA_PUSH_INT("SOURCE_WEBSERVER", SOURCE_WEBSERVER); + LUA_PUSH_INT("SOURCE_SURICATTA", SOURCE_SURICATTA); + LUA_PUSH_INT("SOURCE_DOWNLOADER", SOURCE_DOWNLOADER); + LUA_PUSH_INT("SOURCE_LOCAL", SOURCE_LOCAL); + LUA_PUSH_INT("SOURCE_CHUNKS_DOWNLOADER", SOURCE_CHUNKS_DOWNLOADER); + lua_settable(L, -3); + auxiliar_newclass(L, "swupdate_progress", progress_methods); auxiliar_newclass(L, "swupdate_control", ctrl_methods); return 1; From patchwork Wed Jun 29 13:35:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Storm, Christian" X-Patchwork-Id: 1650077 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=tYx13+3n; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::338; helo=mail-wm1-x338.google.com; envelope-from=swupdate+bncbdd6bwv65qpbbzfj6gkqmgqecin553y@googlegroups.com; receiver=) Received: from mail-wm1-x338.google.com (mail-wm1-x338.google.com [IPv6:2a00:1450:4864:20::338]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LY2WC69bJz9sFk for ; Wed, 29 Jun 2022 23:34:31 +1000 (AEST) Received: by mail-wm1-x338.google.com with SMTP id az40-20020a05600c602800b003a048edf007sf4205058wmb.5 for ; Wed, 29 Jun 2022 06:34:31 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1656509668; cv=pass; d=google.com; s=arc-20160816; b=s9ISTywiDYTN8JSPTl6aNpOThqpCuIyWcG59pQSAHZKlEvTse5YfzjqeXNk9VqqAhk bifOcLh927Daef7inRYnERj7z9Cp9ksnkmFEU6RpwUEQBx3q7BM5vNjD7kb4xKaXUh9A P0OhPcxiL3pB5AvwZsXFcZLFUdRoL92F9QmYx5+FlN3VUabYoATvGtZbYmqIfhhXnJ43 JdYu+GldTsSm1ABL05ps5uAaeUVrIo7zHiqc/pLkIML1DfiUk5QbxNWNUEnixYjYTTPi OHtntjvHLTHNxqjsEEMd/5NcvxWz9IXeKPrCbLHMAIeAE1JUUVGin+D5xEkNmBXm7VKU rTOA== ARC-Message-Signature: i=3; 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:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=U34Tgq2Tyi90iXWHdDWtZWSh6qFlfLwmdU2nNSW0Hmw=; b=MC6F9+zRTM5+c5e1dh+/Gq0kdXQW7CKKVVbdrEB85mX3Cn5R7l1+v629sbWGUmFtIi SMJsEevhhA0O8uTujdFuWRqhKrOkvXbn+2EcIGpcH5L7b1kts7TKAeufhrJHuLxoLgyg CqIyhftiVVo84LDKCNMDATNX7cWWqXlF+4gFpz3qpZS4lOyh2+n63noWQ1C4jvLuMARe 4SPlt2pbI6PuTgUtyTjzlvaVRNnSl9uasa3UrICJplzArrLlh39asI8TYwi2h+2n/PIZ Vmpnmp2iBTj+Vw8P7+z31BkkmJPbI3imPhKlxZPNFt6lPXlOaVS/GtE/GNo24yQ9plbA MI7g== ARC-Authentication-Results: i=3; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=Tb8dMNYP; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of christian.storm@siemens.com designates 40.107.22.50 as permitted sender) smtp.mailfrom=christian.storm@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=U34Tgq2Tyi90iXWHdDWtZWSh6qFlfLwmdU2nNSW0Hmw=; b=tYx13+3nCof4lxqlRk8YMXC8vjM8Jk/TNmNr/WCC4zCE2VEZYZyRMJ/BTdq8PsZtKe xiXPL69z8cyypE/fyUZfOGwpNuysc5UZ2K59jO3AeoGkGNzpMLRfjJm8M78MZdksNN8B BSz47zWIJnyM2DHjgHalQtcQ8vjHBaWiAsmdkeDO+rOtzSHKpTs+BxAq9KRtkIyahz8j Ybj1wYYuBqxFw0GiiaRRdta64CXvwLl3XPmCtUnR8kT5Jba7w5GwjkwJDIZdSLdnOdam vwC3NUZWLnqXmrk5XXDpI4GeNlIZH+qifjVN11G4/zgX/tQ/ZLsd9gPoIaN1M5TY7h+D 9KaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version: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=U34Tgq2Tyi90iXWHdDWtZWSh6qFlfLwmdU2nNSW0Hmw=; b=W3J9WEDMkbNAy1fjoxsu8QS7/j1l1XEBt8IIqyl6FsJSr4klyqs8Q1v3Kxhw2z8RXs ljLyh1G9yTdQErtMG8k2qOeuQ/39Acv1m4iScTv12tRFiCZTQn7v9Yrxdvt78k5Kykps okKRNFoX2LS05Ssm41c6XS1JjJhl7kP8jaIQ28emLYqcrr64XyWfGAYTY1N/7TUrM6c3 pxil7iKz9Bknf2KYG9/bUci7YMd2MzG1dKaliYOJ0vH5JJnoiLgqNw8RZUzWsfbWxOTb cjzmpFiPK0Gg3eZeXnhm/bbBxXKGhMiPNzq6CcvNeqX3oJnI4722RYxWSOsgsM5LY+3v 6vMQ== Sender: swupdate@googlegroups.com X-Gm-Message-State: AJIora9EAVP2kwueQ6SElRqOV8YdOlUCUm3JGzYtX8Vo+K4ck3jieh1P P56eNsBS6BpNYd5WkTTSNMI= X-Google-Smtp-Source: AGRyM1sG/zKSEM1VTSbRDXcdWrmqvXXaUO9nZ2KFGpDSXLyUbcnjZ1xDYvEuqpoxVA3/nkP9equC/Q== X-Received: by 2002:a05:6000:71e:b0:21b:adf2:c9ab with SMTP id bs30-20020a056000071e00b0021badf2c9abmr3247322wrb.153.1656509668458; Wed, 29 Jun 2022 06:34:28 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:6000:156e:b0:21d:2eb7:c707 with SMTP id 14-20020a056000156e00b0021d2eb7c707ls870825wrz.3.gmail; Wed, 29 Jun 2022 06:34:27 -0700 (PDT) X-Received: by 2002:a5d:6dae:0:b0:21b:bb44:3027 with SMTP id u14-20020a5d6dae000000b0021bbb443027mr3294653wrs.276.1656509667283; Wed, 29 Jun 2022 06:34:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1656509667; cv=pass; d=google.com; s=arc-20160816; b=ssMCrD/EtnJej5aqutLFb738DGT7phXrKbpVGJgsPKiZsrb/kKecDYwkEAtxjtgO3w dS9NzKF1T5kmgtF3i4/+X6A/6PxwtLLd//shWnfmdxgOXvByfFfHABUjZQ69I8v/bCYm dDrgOcSAV1JEv26WvCFfDvfuc0p+q73xF8gQNso5pLAjo1jN2Al/eyWNLzE7Hx8c3ubw khNeTzLjBYauxcOCfPfhk+uY58hp2bAWptdoipL9fIBlbfTuSNkf3fiH/afhW83SjVPu io79WJy5CNLYmQYiUMnJFwIAk1bG74cPcq7l7h87CarYrnCpG5LwH/dcLl947tLTZKO7 CcBw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Y98kwBt4UXQofG4Z841LKdeB2BAUnT+j1YgQqIFSB+I=; b=wMiPmLxMNrAlfos+ChRuPVs9WuohIyNiIG7D01nRKeb4ZEpvTP68XewB+XzR7TthBp 84I7Kc0K2ae0UM7jry8nYZrn3aMeUjeHOhrJ9YirJSLzwbFfhciL02tSVA20DQnF4QWc v+7OvI502TjZ3/An90E5V/cIpDTiDlrJoADIq3cdSFEsFzfGkgb0W1A16M52sbLPAL0H maLbXuC6cu0Mno5zVm9s5x02kozqGAIJxKYh1E7ogvUZM9o6Za+dUIBmq3/bd87J54GU wHN7tOs5nKZq+1kb7WXkjskIA/iRzzIH6VSolfdRHECa+9lxdmrZoy88/R9fgOEm6FRy VJkQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=Tb8dMNYP; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of christian.storm@siemens.com designates 40.107.22.50 as permitted sender) smtp.mailfrom=christian.storm@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2050.outbound.protection.outlook.com. [40.107.22.50]) by gmr-mx.google.com with ESMTPS id ay14-20020a05600c1e0e00b003a04819672csi299919wmb.0.2022.06.29.06.34.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Jun 2022 06:34:27 -0700 (PDT) Received-SPF: pass (google.com: domain of christian.storm@siemens.com designates 40.107.22.50 as permitted sender) client-ip=40.107.22.50; ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MtRLbPiDVhfdDeDV055ZXkUeJthnhtrckOP3pXfuTdp0Mma2wHV+g4bVlrhoXqkd6BDlfRddZzICWi5YzHhU+8CHYAz8iyj3uFzciMvU8vkFj7yZFFxoW77ujj4vLhxyQMVVDFynfDa0AyKrB1dhQlTQ/4Ylk+MJnyRO8EGDwAm2kBvn2FsodCcd31+EEPpNiiN5M95suTk7oWqfFbKjItAALmlKgIhzXRft1PdxSSUGp52Ynbdw9K+B9u+QvrTEiKbPOykMoXMpaT5kqi46tYP69kk5m5cm+ntxxij/kX4m2pmx8N20D/GBwc2Lg78+dVGJMvvOq429A71Wamg/Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Y98kwBt4UXQofG4Z841LKdeB2BAUnT+j1YgQqIFSB+I=; b=YxN52buaK58Fu6+1eOeG8tDjRvXyQqCWzU4jOGKexiEBWtnlOePz2aPienzZ3nFKs99flcZHJTOeCcdH3hPJ+do3Go/o1qjVFO1rnn9k8ZWph50QES3xFWedKtyvTGzrP7HE6UK5oAkJ7hO17ic7UGeQbak/wn0JNBz0sjHToRXzhgiyIjjFTqgk5U8cxyvVvNWnf43BHA00sOKfIkpddObYigInLV9W9ZKBYTSHhibSJcAHCDDgh6hzQLA0gCw19GdIq38m3BcXTODrB/l82UkTUgOyXp/dCdA/cpN4tbqKIAgCAVyzTnUqE7d/1U/C7xEGU+WNT4iEoA/cabpvyg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 194.138.21.70) smtp.rcpttodomain=googlegroups.com smtp.mailfrom=siemens.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=siemens.com; dkim=none (message not signed); arc=none Received: from AM5PR0601CA0059.eurprd06.prod.outlook.com (2603:10a6:206::24) by VI1PR1001MB1104.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:800:71::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.17; Wed, 29 Jun 2022 13:34:26 +0000 Received: from VE1EUR01FT028.eop-EUR01.prod.protection.outlook.com (2603:10a6:206:0:cafe::33) by AM5PR0601CA0059.outlook.office365.com (2603:10a6:206::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.16 via Frontend Transport; Wed, 29 Jun 2022 13:34:25 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 194.138.21.70) smtp.mailfrom=siemens.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=siemens.com; Received-SPF: Pass (protection.outlook.com: domain of siemens.com designates 194.138.21.70 as permitted sender) receiver=protection.outlook.com; client-ip=194.138.21.70; helo=hybrid.siemens.com; pr=C Received: from hybrid.siemens.com (194.138.21.70) by VE1EUR01FT028.mail.protection.outlook.com (10.152.2.220) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15 via Frontend Transport; Wed, 29 Jun 2022 13:34:25 +0000 Received: from DEMCHDC8A0A.ad011.siemens.net (139.25.226.106) by DEMCHDC9SJA.ad011.siemens.net (194.138.21.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.9; Wed, 29 Jun 2022 15:34:24 +0200 Received: from cosmos.fritz.box.net (139.22.41.144) by DEMCHDC8A0A.ad011.siemens.net (139.25.226.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.9; Wed, 29 Jun 2022 15:34:23 +0200 From: Christian Storm To: CC: Christian Storm Subject: [swupdate] [PATCH 2/3] progress: Fix comment typo Date: Wed, 29 Jun 2022 15:35:17 +0200 Message-ID: <20220629133518.48057-2-christian.storm@siemens.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220629133518.48057-1-christian.storm@siemens.com> References: <20220629133518.48057-1-christian.storm@siemens.com> MIME-Version: 1.0 X-Originating-IP: [139.22.41.144] X-ClientProxiedBy: DEMCHDC89XA.ad011.siemens.net (139.25.226.103) To DEMCHDC8A0A.ad011.siemens.net (139.25.226.106) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 38c1d8dd-9098-4700-4dfb-08da59d4155a X-MS-TrafficTypeDiagnostic: VI1PR1001MB1104:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FT/Zbq/B0RI9ECj1b6yXaA0pO6I7N15roB4u/JnEWz5ATV198J78AGiQ/QvToerBgXURK+2D6WQ8q5rJH+YF0I3qaZMD3jEEupOxqxXGLZ+GvHP1v5XdH6OrlY4HaAHmpdZJg2lTpMqRGzraoJ2LUvKP55jmBK1Wh5j7YHp6XHLLvCp/Sp2kDNFpRu1dm8i7f8qEK3OBXU/CAy5/p+O2swG2Pz51FOxhz21L1j49wSwea3XDDIsgbkBPrFXJXyaZGI8UMSlZZFV2HoxpRxtFnX8msdi4WUZZtg8mxtVTPH0EhmIDlsKC6eT1T4ILuT0IyEW3QbMXmvXpEPHYW5yRfm28yqftyFskKUzaRO8y0Jm0kid0MpyGOR9q1Mq3l3kFHpCoeFUiImQf7reg/VFRRiIe+8mQC/OXBq3FSUH4XBBCsK3OltwaU0UfQ5TmDA9BKUCVZqu85/3yZXuvlF8uRUkf4MU7iFihpR07WsEx5Rk8fUOPRxIdNuze7pj9cDungoyhrQcy5/iwkPG3ADmWIie1xnFVIOM62EbHtvQHlFqdGPtu9h4ZHNPmVKW7eYRFxG9fHsgm2OJo3oRAy2oqD3LMsl5kqS9M4ur4D0/BUSbV86dZedsT3/SAYTsJ5/Re5vBSMZEV0pC5UgtctMkR/UPUVispX/0oIi2mKGcu7q1mC7A80Xy0m7Gsi1D8OFAzT775ogaoXfdyk2lw/mOmtey5WFiF/XVuqLmfIkzY5tiVEdzE4GSM75DNdmPDPCFQDhYisKfMy1Bf8Xfw+ldLWX0kRMHIwvoYo4ZXkfU9DTL8lwHVMamGk7iFnvWP4N/N X-Forefront-Antispam-Report: CIP:194.138.21.70;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:hybrid.siemens.com;PTR:hybrid.siemens.com;CAT:NONE;SFS:(13230016)(4636009)(39860400002)(396003)(376002)(346002)(136003)(40470700004)(36840700001)(46966006)(356005)(6916009)(8936002)(82310400005)(186003)(1076003)(7596003)(16526019)(316002)(83380400001)(40480700001)(2616005)(107886003)(47076005)(336012)(5660300002)(956004)(36860700001)(36756003)(8676002)(70586007)(40460700003)(26005)(82960400001)(4326008)(70206006)(41300700001)(6666004)(7636003)(4744005)(82740400003)(2906002)(44832011)(478600001)(86362001);DIR:OUT;SFP:1101; X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2022 13:34:25.2056 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 38c1d8dd-9098-4700-4dfb-08da59d4155a X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=38ae3bcd-9579-4fd4-adda-b42e1495d55a;Ip=[194.138.21.70];Helo=[hybrid.siemens.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR01FT028.eop-EUR01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR1001MB1104 X-Original-Sender: christian.storm@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=Tb8dMNYP; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of christian.storm@siemens.com designates 40.107.22.50 as permitted sender) smtp.mailfrom=christian.storm@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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: , Signed-off-by: Christian Storm --- include/progress_ipc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/progress_ipc.h b/include/progress_ipc.h index 2efa61d..5d0be1c 100644 --- a/include/progress_ipc.h +++ b/include/progress_ipc.h @@ -32,7 +32,7 @@ struct progress_msg { unsigned int cur_step; /* Current step index */ unsigned int cur_percent; /* % in current step */ char cur_image[256]; /* Name of image to be installed */ - char hnd_name[64]; /* Name of running hanler */ + char hnd_name[64]; /* Name of running handler */ sourcetype source; /* Interface that triggered the update */ unsigned int infolen; /* Len of data valid in info */ char info[PRINFOSIZE]; /* additional information about install */ From patchwork Wed Jun 29 13:35:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Storm, Christian" X-Patchwork-Id: 1650079 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=neWpmn9r; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::33b; helo=mail-wm1-x33b.google.com; envelope-from=swupdate+bncbdd6bwv65qpbb5vj6gkqmgqedjqpe5a@googlegroups.com; receiver=) Received: from mail-wm1-x33b.google.com (mail-wm1-x33b.google.com [IPv6:2a00:1450:4864:20::33b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LY2WZ07bWz9sFk for ; Wed, 29 Jun 2022 23:34:49 +1000 (AEST) Received: by mail-wm1-x33b.google.com with SMTP id v125-20020a1cac83000000b0039c832fbd02sf10507112wme.4 for ; Wed, 29 Jun 2022 06:34:49 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1656509686; cv=pass; d=google.com; s=arc-20160816; b=uKPsi4hKh7UViMFVrW4qX94j+wWEnt6zV+kmHSmL0PEQnkYTc602j1UDRVMtK6AT0S MQhjHrZncrGDNKl/YacAHXN38nYAJniQJbmruCeS1a9WDK+oMBtAf2VFtC6GLZ5+RNBf ZDgiaRVt9yTKXO30/1oUnFFjM0ZPIShk8SNI08v1neiqQchdhUYju2WpyoS6l0pj4CJK Rj9rA7qbkyBl1nV9j+nhuoWN4AwgAEMkcuxpsv6GejA4WF3uNuPEk2o52cvMThagUJhx L7LlrYD3Dv19IBYCz9LbN8CuHbALZqJrWigCFlcFQkubcKsRvyN3uLSyMP17flf8faxm kJ2g== ARC-Message-Signature: i=3; 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:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=ua0LrvMkY4/6XVqGM6R/uG6wQVN7QU9RcVD1xZbRXpA=; b=DUkt2R4lMoHN54M4u8PMb4cNAAvlnS6bqO48MYvyBGHyw9LPhRpk/4B6Nz8zxr85Bp X5cC9dW18ic62J+biqY2tXkdQJwBWyXR5QwlOMaOE7gE12JNxJKFkXwAexMCl+OiGdHH pW8KZczNC501mx3gZrHhujENSPQY+nCkUDxLtsUyQznpMiLyjPctIjhQYqlsEM9Eu03o +8Q/aElsZpQLRCuQZZBrgN9Y4ba2RkkMjk7hfQbljRH0aBFoOAj1AfGmy80QspP970FN y+nBWGLTdxj6++EbeNK33DVGSkeTILcH2vd73ymc4Lo3TkJx9YTiGK+sjGGQFP5n819p xA3Q== ARC-Authentication-Results: i=3; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b="b/YO83Z9"; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of christian.storm@siemens.com designates 40.107.8.80 as permitted sender) smtp.mailfrom=christian.storm@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=ua0LrvMkY4/6XVqGM6R/uG6wQVN7QU9RcVD1xZbRXpA=; b=neWpmn9r/OJe5nCg5Gs2Zg8WIv7/1HrUMN6tv7h8+ac2k3mSj9rAWEH5443hYtDJyn jwI9UMSGFf9gUEdmWkDmxaTT2q54bTIvR/rv1ZAcGopth9M7Yl5qKjwT4nFWyAuLKdGw 5O8pZPQUKIOjw3wOT6vQnZwhjex+uOAIEwiL78d9Bg+ZrXrGo2tMC1ztE6zjsBYpJVfr xS49ALt5EmJim/rGuWFTlFR9n7YdZJCdZCkiwBXo+QPQ4ncibGmS7yaqs/9zw2ayQ1T8 ubLEtbz1aFTG0P4E2rEIjjdmgUAzCNgVoj+dNufdFtZ92gWzfwlDbi4ASohhK49iv2jS Phfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version: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=ua0LrvMkY4/6XVqGM6R/uG6wQVN7QU9RcVD1xZbRXpA=; b=lkR84j6K7F3K1Szu4kUudH55nJOPgrhhedaazrYnS3ibmibKo6rDOt+YAgb4OXoNDG vc0AqYw3L7iCkhHoPOA6bSH8HWR/1x7t3EVoOw6Rp5Rn/wx3CQ5XO8Tju6cZ0CnxtbOZ 2T0/l8cpFh2pH6R/2XsZPW0tVXsIedJz3KwSMARKkpfYa8RB0hUAGKCuX3oXjivkSLjE iTExwH/6ZRwbc0ja/a8Rpwuwx+j1WSUzeleDkIZfS/8luowdpdbbQ1QkVRD40hQ82k0b pbP7XXnAXNPZBvUuw/5kyjAzpJMbSnqzWgRqjR4W2F2PIKmbVywTncCLw7yYgmtEA6ee 6ACQ== Sender: swupdate@googlegroups.com X-Gm-Message-State: AJIora+bsuX7W+Mv4tRf9bPBiuhG6XTM6PBFXGYB7SRN4+XbkDScLd0V yW7vtMgzVSVoM/ZlwCSLjI8= X-Google-Smtp-Source: AGRyM1veF5gMWB2TzUT7xeHFsZxvNaslNVsFyI+9YS+P54kbvTImP3ynQ19srMn1GrLycAkFoPZYcw== X-Received: by 2002:a05:600c:3acc:b0:39c:7427:d379 with SMTP id d12-20020a05600c3acc00b0039c7427d379mr5824805wms.32.1656509686564; Wed, 29 Jun 2022 06:34:46 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:600c:1c23:b0:3a0:48aa:51f2 with SMTP id j35-20020a05600c1c2300b003a048aa51f2ls1658209wms.0.gmail; Wed, 29 Jun 2022 06:34:45 -0700 (PDT) X-Received: by 2002:a05:600c:4fd1:b0:3a0:5416:2fd0 with SMTP id o17-20020a05600c4fd100b003a054162fd0mr5707693wmq.197.1656509685459; Wed, 29 Jun 2022 06:34:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1656509685; cv=pass; d=google.com; s=arc-20160816; b=YDZGGI2v7gYmXXGUrkvGKhMUiHVimk9KfuR2VPExl6T6C9BOZi2Qub0T8YDnBueQh2 sQlaz7AmZW6zeSIZSXd6yXS+htRr3Qxlj0Sq85LdUdS/NgsNUqmxrS2WHNkxsTtUpJ0n UPx+5S4/i6AfZJJ5NS3Tl3K1LBLLcvWW7pFbJfAlewu2KguRXz9jhsUYmakE7hrS8RlC P6ksnTMlYTWT++xRv2eDbc6lhggty39FUN8CmzbB/HGCJUzKvUnC0vEgbNOIr9LQcX5T wnPHHS+5rObdKdnSMeQCD7BwAcXIUr2l3bbIZfpXgZINZLCeN3T4EoemOPGAgDHDYaCS LM3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=kT+EHrCnkOLrvKK91OwcPPl2IvF0nWyz1aQGNdMWFeQ=; b=oDo6g0GajduUPmY40L3wqDz0ibZ0JGUvxkU1pDJ/rcgHZ4iohtKPRrLD0s21a7yT64 WPN4jUZzacTR26KStGARiW7wvSqy7ZKQ24Rn5v3RrLu83WMrKaWZSc98vrPfLu8sOzCo B8sZELyhZkEdcmiAd7x7h/kOKnc/ZaTSGQB3nvqjzUEArvr58IdUHa/l/MOam5X2zJE1 zKPx0xh/nAnTZQh+E1HzsnVxB6Li/rmBl3rquG3o74nD/0g16b/AmkS48QwA+fyROOj4 5EC6fQo7PbRuZzXrf4z3elFET/gDxef/f/RXqXpSulSjMvIZvh2c1PemHBDCmFc4qip4 mHLA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b="b/YO83Z9"; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of christian.storm@siemens.com designates 40.107.8.80 as permitted sender) smtp.mailfrom=christian.storm@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80080.outbound.protection.outlook.com. [40.107.8.80]) by gmr-mx.google.com with ESMTPS id a8-20020a05600c348800b003a03ade6826si106690wmq.0.2022.06.29.06.34.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Jun 2022 06:34:45 -0700 (PDT) Received-SPF: pass (google.com: domain of christian.storm@siemens.com designates 40.107.8.80 as permitted sender) client-ip=40.107.8.80; ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hghhdr8o21WLyzZQwxkYY9fZoGAMkKR5Z/Gq9nMfULs/+/L7YSpMH9uxh09Y7/Rbgar67re1oZAecqWU4GR3dTRwQUIAAqYkIB4WvxbX6oITXyOHsFcRbxZ28fIlKh2e28nCdoWs5AXF+tgpuXtR8QuHQZYoA8rkskRdUvjA4MReBsio399CD1NRH8XH73CNL/wgHxdb89M1+UL958qAqkTDvCew+qLTpglLCCf3rboA4Bptp714rdo+xs+m4QFDXbDZwq+1s7fCgXCko29b/d4XxNSGST3mjQGEQAsH2PLXG9y4M65gaKRirb7kpfHU46ZPXEMhLlp8kdyTANrEDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kT+EHrCnkOLrvKK91OwcPPl2IvF0nWyz1aQGNdMWFeQ=; b=RkyIrK98BLSj5I10/ivE1nLhWFBaepSCjoPHA1byuhXUGBLyX+VHq/y6/JZs5C3BBW4TLFiX6GcWVnWNZ/WQ+vBwe41IpDyddvt7Uk6q3FzuG6pXcDOR9p9cnDb11ktK1HnrWVrW624Lq49Ub77bvnKyeh0C9la3LLKLMSx5mGK81kGfS1YwOF9snA3CiqhHV1g6q1KiIFXkAFeqxNUkRaEgjT4sYtPlCt7PV2LF4aBccyPdfL+Z1py8D71woYVG47NPur6WOo/ihQ7Fxb7wotiydkKb3hcW1R363CL3sF5yn8ajQWuYOvseFVEOG1nih/YaAFbX+me0HM5quhD+FA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 194.138.21.71) smtp.rcpttodomain=googlegroups.com smtp.mailfrom=siemens.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=siemens.com; dkim=none (message not signed); arc=none Received: from OL1P279CA0049.NORP279.PROD.OUTLOOK.COM (2603:10a6:e10:14::18) by PA4PR10MB4624.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:105::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.14; Wed, 29 Jun 2022 13:34:44 +0000 Received: from HE1EUR01FT034.eop-EUR01.prod.protection.outlook.com (2603:10a6:e10:14:cafe::2b) by OL1P279CA0049.outlook.office365.com (2603:10a6:e10:14::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.14 via Frontend Transport; Wed, 29 Jun 2022 13:34:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 194.138.21.71) smtp.mailfrom=siemens.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=siemens.com; Received-SPF: Pass (protection.outlook.com: domain of siemens.com designates 194.138.21.71 as permitted sender) receiver=protection.outlook.com; client-ip=194.138.21.71; helo=hybrid.siemens.com; pr=C Received: from hybrid.siemens.com (194.138.21.71) by HE1EUR01FT034.mail.protection.outlook.com (10.152.0.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15 via Frontend Transport; Wed, 29 Jun 2022 13:34:42 +0000 Received: from DEMCHDC8A0A.ad011.siemens.net (139.25.226.106) by DEMCHDC9SKA.ad011.siemens.net (194.138.21.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.9; Wed, 29 Jun 2022 15:34:42 +0200 Received: from cosmos.fritz.box.net (139.22.41.144) by DEMCHDC8A0A.ad011.siemens.net (139.25.226.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.9; Wed, 29 Jun 2022 15:34:41 +0200 From: Christian Storm To: CC: Christian Storm Subject: [swupdate] [PATCH 3/3] bindings: Lua IPC interface specification Date: Wed, 29 Jun 2022 15:35:18 +0200 Message-ID: <20220629133518.48057-3-christian.storm@siemens.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220629133518.48057-1-christian.storm@siemens.com> References: <20220629133518.48057-1-christian.storm@siemens.com> MIME-Version: 1.0 X-Originating-IP: [139.22.41.144] X-ClientProxiedBy: DEMCHDC89XA.ad011.siemens.net (139.25.226.103) To DEMCHDC8A0A.ad011.siemens.net (139.25.226.106) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c82458db-ad2f-4410-bf81-08da59d41fdb X-MS-TrafficTypeDiagnostic: PA4PR10MB4624:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ajqwH/53LDmwtm/kLKtmJSngJBMo75R8MuIjhYLglKv1YpijSzNmwSo0u8h51HUdb5DtOzyKxK3sxBLO+aykoKAZU7MZJarI1lESqbCEOJMBN+Lyu8997ncpONwfa1MWbD53FQiqIAhuNS3spVRL0ov7OLpzuUvZ8Kdd2U6tuhVO1VkbSf/htw0iOvrHh1ePI0c7ziQgTu2FXFG/b/7bAGGrY0nLNVw6hRlGNyGbkcldvigtSuvG7qk7wztN+ijUtwnAeI/R8ZOJioF1BCcR44cWT2z+gb1ia//r/YWpIeqNmfjN5f60LNPevZgQPrS6/UN3HrEty3JSRVqcleCFcE2b9icBnS/5aMM7Z8+qmjDfCbndETEweaoBRJdAJ8SUjzMX4/JEzSMvmhtUKx13PFJhisH4a/5r55CYUG+yk7keT4JDTFmoA5WXPQOF3MqQ1leHN+Isqkaqt5xtfJ4eLwOszhfbpn2/GbEwXM2IRcXzb05UTg7oxM0sFGZjZKbJhLPJGIm4DGpxXebKnhg6WnZKL63b3t9lJoWZuo3Xqi5R9ZidDsVT9c1cnmhTmbR5IDGCR/9YZOwuv8ss0LdFJARZoWyuIesYflc6Xe6HmgJOa1zOWotmOOK+FV2+ZpiFEDvcKHVQi0D6C5VLRRRyhGHIiEQx5Jl+YJ3BpVirPWzIh1TGPb5LvqPVR+7HnCJeRry8bYlPjuPOGGBG+poEW9i+65vKtelXnSnQWtwc8JVWna3zCwWo9g8RsURYjdH4CbDMOWnCVPEelG6m1kIg8hn+wnMpCFXqV1sW8q0iXGxei2FqkS00IOwnRscBvtkdCkUvqvyhV9t3nDHX5XtzsQ== X-Forefront-Antispam-Report: CIP:194.138.21.71;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:hybrid.siemens.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230016)(4636009)(396003)(39860400002)(346002)(376002)(136003)(36840700001)(40470700004)(46966006)(81166007)(82740400003)(316002)(82960400001)(82310400005)(356005)(36860700001)(36756003)(40480700001)(70206006)(70586007)(6916009)(8676002)(4326008)(26005)(6666004)(41300700001)(2906002)(107886003)(2616005)(956004)(1076003)(8936002)(40460700003)(478600001)(86362001)(5660300002)(83380400001)(16526019)(186003)(47076005)(336012)(44832011)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2022 13:34:42.7842 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c82458db-ad2f-4410-bf81-08da59d41fdb X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=38ae3bcd-9579-4fd4-adda-b42e1495d55a;Ip=[194.138.21.71];Helo=[hybrid.siemens.com] X-MS-Exchange-CrossTenant-AuthSource: HE1EUR01FT034.eop-EUR01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR10MB4624 X-Original-Sender: christian.storm@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b="b/YO83Z9"; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of christian.storm@siemens.com designates 40.107.8.80 as permitted sender) smtp.mailfrom=christian.storm@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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: , Add the `lua_swupdate` IPC Lua module interface specification. It serves as reference, for mocking purposes, and type checking thanks to the EmmyLua-inspired annotations. Signed-off-by: Christian Storm --- bindings/lua_swupdate.lua | 140 ++++++++++++++++++++++++++++++++++++++ doc/source/bindings.rst | 15 ++-- 2 files changed, 150 insertions(+), 5 deletions(-) create mode 100644 bindings/lua_swupdate.lua diff --git a/bindings/lua_swupdate.lua b/bindings/lua_swupdate.lua new file mode 100644 index 0000000..423ac78 --- /dev/null +++ b/bindings/lua_swupdate.lua @@ -0,0 +1,140 @@ +--[[ + + SWUpdate IPC Lua Module Interface. + + Interface specification for the Lua IPC module. + See: bindings/lua_swupdate.c + + Copyright (C) 2022, Siemens AG + Author: Christian Storm + + SPDX-License-Identifier: GPL-2.0-or-later + +--]] + +---@diagnostic disable: unused-local +-- luacheck: no unused args + + +--- SWUpdate IPC Lua Module. +--- @class lua_swupdate +local lua_swupdate = {} + + +--- Get local IPv4 network interface(s) information. +-- +-- The returned Table contains the network interface names +-- as keys and a space-separated IP address and subnet mask +-- as values, e.g., {['eth0']="192.168.1.1 255.255.255.0"}. +-- +--- @return table +lua_swupdate.ipv4 = function() end + + +--- @class lua_swupdate.RECOVERY_STATUS +--- Lua equivalent of `RECOVERY_STATUS` as in `include/swupdate_status.h`. +--- @type table +lua_swupdate.RECOVERY_STATUS = { + IDLE = 0, + START = 1, + RUN = 2, + SUCCESS = 3, + FAILURE = 4, + DOWNLOAD = 5, + DONE = 6, + SUBPROCESS = 7, + PROGRESS = 8 +} + + +--- @class lua_swupdate.sourcetype +--- Lua equivalent of `sourcetype` as in `include/swupdate_status.h`. +--- @type table +lua_swupdate.sourcetype = { + SOURCE_UNKNOWN = 0, + SOURCE_WEBSERVER = 1, + SOURCE_SURICATTA = 2, + SOURCE_DOWNLOADER = 3, + SOURCE_LOCAL = 4, + SOURCE_CHUNKS_DOWNLOADER = 5 +} + + +--- Lua equivalent of `struct progress_msg` as in `include/progress_ipc.h`. +--- @class progress_msg +--- @field status number Update status, one of `lua_swupdate.RECOVERY_STATUS`'s values +--- @field download number Downloaded data percentage +--- @field source number Interface that triggered the update, one of `lua_swupdate.sourcetype`'s values +--- @field nsteps number Total number of steps +--- @field step number Current step +--- @field percent number Percentage done in current step +--- @field artifact string Name of image to be installed +--- @field handler string Name of running Handler +--- @field info string Additional information about installation + + +--- @class lua_swupdate.progress +--- SWUpdate progress socket binding. +-- +-- The returned Class Table contains methods to +-- interact with SWUpdate's progress socket. +-- +lua_swupdate.progress = function() + return { + --- Connect to SWUpdate's progress socket. + -- + --- @param self lua_swupdate.progress This `lua_swupdate.progress` instance + --- @return number | nil # The connection handle or nil in case of error + --- @return nil | string # nil or an error message in case of error + connect = function(self) end, + + --- Receive data from SWUpdate's progress socket. + -- + --- @param self lua_swupdate.progress This `lua_swupdate.progress` instance + --- @return lua_swupdate.progress | progress_msg # This `lua_swupdate.progress` instance on error or the received progress message + --- @return nil # nil in case of error + receive = function(self) end, + + --- Close connection to SWUpdate's progress socket. + -- + --- @param self lua_swupdate.progress This `lua_swupdate.progress` instance + --- @return lua_swupdate.progress # This `lua_swupdate.progress` instance + close = function(self) end, + } +end + + +--- @class lua_swupdate.control +--- SWUpdate control socket binding. +-- +-- The returned Class Table contains methods to +-- interact with SWUpdate's control socket. +-- +lua_swupdate.control = function() + return { + --- Connect to SWUpdate's control socket. + -- + --- @param self lua_swupdate.control This `lua_swupdate.control` instance + --- @return number | nil # Connection handle or nil in case of error + --- @return nil | string # nil or an error message in case of error + connect = function(self) end, + + --- Write to connected SWUpdate control socket. + -- + --- @param self lua_swupdate.control This `lua_swupdate.control` instance + --- @param data string Chunk data to write to SWUpdate's control socket + --- @return boolean | nil # true or nil in case of error + --- @return nil | string # nil or an error message in case of error + write = function(self, data) end, + + --- Close connection to SWUpdate's control socket. + -- + --- @param self lua_swupdate.control This `lua_swupdate.control` instance + --- @return boolean | nil # true or nil in case of error + --- @return nil | string # nil or an error message in case of error + close = function(self) end, + } +end + + +return lua_swupdate diff --git a/doc/source/bindings.rst b/doc/source/bindings.rst index 9dbe458..ca9e39a 100644 --- a/doc/source/bindings.rst +++ b/doc/source/bindings.rst @@ -20,11 +20,16 @@ currently ``lua_swupdate.so.0.1``, is provided. Lua Language Binding -------------------- -The Lua language binding is realized in terms of the ``swupdate`` module that -defines three bindings, namely for the control interface, the progress +The Lua language binding is realized in terms of the ``lua_swupdate`` module +that defines three bindings, namely for the control interface, the progress interface, and a convenience function yielding a table holding all local network interfaces including their IP addresses and submasks. +The ``lua_swupdate`` Lua module interface specification that details what +functionality is made available by ``bindings/lua_swupdate.c`` is found +in ``bindings/lua_swupdate.lua``. It serves as reference, for mocking +purposes, and type checking thanks to the EmmyLua-inspired annotations. + Note that, depending on the filesystem location of the Lua binding's shared library, Lua's ``package.cpath`` may have to be adapted by setting the environment variable ``LUA_CPATH``, modifying ``package.cpath`` prior to @@ -35,7 +40,7 @@ instead of ``require('lua_swupdate')``. Control Interface ................. -The ``swupdate`` module's control interface binding conveniently makes +The ``lua_swupdate`` module's control interface binding conveniently makes :doc:`SWUpdate's socket-based control API ` available to pure Lua. The binding is captured in the ``swupdate_control`` object that is returned @@ -86,7 +91,7 @@ The following example snippet illustrates how to use the control interface bindi Progress Interface .................. -The ``swupdate`` module's progress interface binding conveniently makes +The ``lua_swupdate`` module's progress interface binding conveniently makes :doc:`SWUpdate's socket-based progress API ` available to pure Lua. The binding is captured in the ``swupdate_progress`` object that is returned @@ -109,6 +114,6 @@ socket. IPv4 Interface .............. -For convenience, the ``swupdate`` module provides the ``ipv4()`` method +For convenience, the ``lua_swupdate`` module provides the ``ipv4()`` method returning a table holding the local network interfaces as the table's keys and their space-separated IP addresses plus subnet masks as respective values.