From patchwork Wed Jul 3 13:08:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1956228 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20230601 header.b=VV16Ryde; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::538; helo=mail-ed1-x538.google.com; envelope-from=swupdate+bncbd2zdgn6sekrbpm2sw2amgqe3ejf7yy@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-ed1-x538.google.com (mail-ed1-x538.google.com [IPv6:2a00:1450:4864:20::538]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WDg7n6Cwgz1xqb for ; Wed, 3 Jul 2024 23:08:20 +1000 (AEST) Received: by mail-ed1-x538.google.com with SMTP id 4fb4d7f45d1cf-58c38bcd765sf1107531a12.1 for ; Wed, 03 Jul 2024 06:08:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1720012095; cv=pass; d=google.com; s=arc-20160816; b=boebt9AvYguUTyi9T7JOHWD4CjU9LyBFqIHa0CFnYqzDshV8MMKmq2m49C9uMQRhpw KwYwdVSzas8F2XtCW/wgp5bzMzIBNyHr6pXLlQtqTYNeAJkr5X1ZJeXtLWCq9lrAzKsi mTi3598Ro8w9SiBHyJctwQMP3RdDhX48iXeWEG/pi5hRhaHeat3iVMzSeG7oSQbaLfMv HcKEKWmD8o17+H73mmetzB7ohLLoA8apyH3BGMPsacjiL/+2/9aIES8hX4hs+fHfQZbN zf1XsPrBMuoLiKZAh56oFbX0VGFSXF4ReELudheHES18xhDffpDQCMa/xIbVn9U3TLif SwUg== 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:ui-outboundreport:mime-version :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=hyvGSAziZ2IxgfSrVHTdsAAiycOUwlxTE681oWuJ4+U=; fh=NMQamLAwn7U0mXR0Mba41T0N4/dSjeYpkigvqPlYS7Q=; b=VgAYtZnqLgXuBZtdkQ5ICCCb8hWVi1UF2Vr9qBVcQilOCvMaYf6sWC+hmu5y7yY4sf 766zzshiMV/ztXa5o0Y2sDorCwyHJdSuCW3zca6nw2FnvDlf2w7wOTjt4rqQryGouCQO ACYkyZbODTYUAZJgwLIqbJBGEk+xPB/V+M+Y3Wc0LsvIOHvNfDpzFP1tRQ9ktnVh100u 5TEup4jjJWJomkmKIbHkIjXze45ANShhwKHOGDhpzh+qvnv8yw8m7PF5TzMGbt4nCwgf bmiZ0jkWVQ2YLtYDKjo1eqBNAvKKpO1Js0r+GB+lA0mN4wb+YMslCiwPlhnAc1TulwBw +y9w==; darn=patchwork.ozlabs.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@swupdate.org header.s=s1-ionos header.b=b0GTX3nQ; spf=pass (google.com: domain of stefano.babic@swupdate.org designates 212.227.126.134 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1720012095; x=1720616895; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:ui-outboundreport:mime-version:message-id:date :subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=hyvGSAziZ2IxgfSrVHTdsAAiycOUwlxTE681oWuJ4+U=; b=VV16RydeC8PBno1eH5R2bVunWbYM2KsY0Z/qF3dlrzjJoYkxvjWOeZ1M7XpLUwvFNB UdMBPwkfgffAw8hCJVU/1KjrHXsKZ06I0MzyiUwuA4VRIOYqtJ18/SYDB9M+fLXmBrKG 7winFl1H1gXlfCLuAz51aTn3hTuJ3/VkU0rFqQ9GVJUIip/Usum6FrY34lov6rhDlYit FxMtla7igD5WncW+EkHlXrSUw7EX5+IasD10nHzpazRSL4PGczcPUv7he+W10ax6Di4c TSPSoifXrK6dsIQ73wPc4H0pzBs+2T2w+IOL/o1FIRAeciReBIz0ewOsWu5ePy+XFckA Z1Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720012095; x=1720616895; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender :ui-outboundreport:mime-version:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=hyvGSAziZ2IxgfSrVHTdsAAiycOUwlxTE681oWuJ4+U=; b=rEyhln7Ri+reN0AJwL3g/tGpresqX1jpFwiS05CAD9TktQop7DgIx2nYyowAgUsbxr VZiZPlIdOmgvLWpOm+EngJbj/QK/SV1MMfTv6E2E3EJcfl/9veeB4nyLla+PqnTeWoNn biqUTJAF1Kht/KpV9Qn/PJIBAoDpsuymA+EKYwADBH80IhcsBz44ax4SR46q+MoLNB7R S1CNAnrptHEkBGpUSQiZ3PH8IrKuUZplZ1/Bspf5FkquJmK1peysnXsR3kZ/yAzQzVNl 3jgoVGDSv2c9lH/xd4FbDQ9cEHaNKU9YXQ08xC/NjI3fYKXI/RnBHdFgnG0aQ2PI6wpv CtXA== Sender: swupdate@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCUMbuahz+XSNIAotHzmE4PY2Q/4c1buTVl4sQUXWcPRhroxVyisHCPbLVCpshq3hsPBul3etmchGz6Zp0Ugy0XGk4WNF/JsSY/l5BiXRw== X-Gm-Message-State: AOJu0YyP8ZIUZfEZgp/PdeZWklN+mXrqjFKTWwECFT27RZnV3tMJCMiw IsNSBQvuT9qUSwde/IQZaEXIRLbGT6DmGGpAZth5OuszBpJKF2Mi X-Google-Smtp-Source: AGHT+IF71C9d7TTy6SY3vFDWRWJl/HEN5NjjDRyQ+ca58b2aLJCgjwGZ17tYa3xGLSw77TY7dLuCdA== X-Received: by 2002:a05:6402:1ecc:b0:58a:d4f4:e8e7 with SMTP id 4fb4d7f45d1cf-58ad4f4eabemr4565633a12.1.1720012094291; Wed, 03 Jul 2024 06:08:14 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:aa7:d6c6:0:b0:58b:ea63:24e5 with SMTP id 4fb4d7f45d1cf-58bea6327a5ls977210a12.1.-pod-prod-02-eu; Wed, 03 Jul 2024 06:08:11 -0700 (PDT) X-Received: by 2002:a05:6402:40cc:b0:58d:318a:508f with SMTP id 4fb4d7f45d1cf-58d318a530dmr990001a12.30.1720012091286; Wed, 03 Jul 2024 06:08:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720012091; cv=none; d=google.com; s=arc-20160816; b=jDB+67eU+iDvaC1lE2o9q8tbHJ5OOBg9oNA16QKN2tFKQ2c8njOgih5IpMkId3MYet dL8AHJgBazV4u8shioKXrErQCUsspBD7v4xtajGKD7SveOPGnIjPgS7Mbn+kDNPVdi74 BaLcVMig3eeIy9a45E0pZKfG7F1clPyIYPJZQJ9zs3RCB/Qm5VopWNGkgragYZ1vKtNN BMiUyNXJunZuSdQCgeRSb8aQPumfco9d2M6zsi2EqqToZCFoefji7340Jscm7qPBDVXg JCdSJFVureHkHWdaBThDHYi49yNc0qi0uBxWMHYkPCVVGz+u56Cpf51tu83Or9elvJLx voUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:mime-version:message-id :date:subject:cc:to:from:dkim-signature; bh=We/5alTmlVMrlM/9GakqkgaGOTUo+QVo+kM9IaxsrMk=; fh=TiEWcqMcKpHk5s7uErzpntoONrNfOXwKpI5P8bIlggk=; b=1IMHCHcFiwcfUv2JCpCSXcd61DU1G2pVOtGwrZ0nu5UxkkBwdJo9Auj60aPrpty9Lr jAeORk3QwXVUoDmiu+vYOF3uzXQqB8sg/03/hPcY53XfkLJv7PKyh6hbftQP1m3v9OFE 9qc+JgBrqJBlN6Yn+x9vqtorHRVlzpTLM8/QSfDYxjpdNSiY6ji+Bcsm6cOP0BJzVQCI 9m4ygRKYqqHWYibAsPYm38oL72+FUGMMU+vJrwYNZ74fC1XYXy9eyVweNxBf/yMXnj+M An9kN4W/8LC88QiQSgJjlGq2t8sZg5cbGZYMtcZd3SACjNpTkOYvVZzGjJNudqLaw2w0 5HuQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@swupdate.org header.s=s1-ionos header.b=b0GTX3nQ; spf=pass (google.com: domain of stefano.babic@swupdate.org designates 212.227.126.134 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org Received: from mout.kundenserver.de (mout.kundenserver.de. [212.227.126.134]) by gmr-mx.google.com with ESMTPS id 4fb4d7f45d1cf-58bff04c6e7si69429a12.3.2024.07.03.06.08.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 06:08:11 -0700 (PDT) Received-SPF: pass (google.com: domain of stefano.babic@swupdate.org designates 212.227.126.134 as permitted sender) client-ip=212.227.126.134; X-UI-Sender-Class: 55c96926-9e95-11ee-ae09-1f7a4046a0f6 Received: from paperino.fritz.box ([88.217.136.221]) by mrelayeu.kundenserver.de (mreue010 [213.165.67.97]) with ESMTPSA (Nemesis) id 1MUpCz-1sp5Ap2vAX-00Lgs8; Wed, 03 Jul 2024 15:08:10 +0200 From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH] BUG: bootenv functions not available Date: Wed, 3 Jul 2024 15:08:07 +0200 Message-Id: <20240703130807.433489-1-stefano.babic@swupdate.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:D5CaxANUvW2NpyXFOcYrpnCGJ9Q3o94ylHdsNtNPHS8vn26Lmvz odKG76zgLxyWIljtflwxO8RhdqqgokcfSbN3EqdEzb6PYe8WuDSVz2B30DrLCSk74V3iwaK F9YlXlSBxq0MgiOtUXKe8k2v1WjEpM78sGXC3zVeM8rbhOLY7TC6OeLeOFyJH2tNJqokcWo Zcc/mgogk8l298KZTt39A== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:26j3lHidbXE=;yfjagqwiyTtAPz1rR7s2Z2a7yaD mb/B41iN379uxAIdnpmOsLY9MlJDhd6t4EpxYK9xRQUOkeihelkOck0d5AYCb+f5k6C+hwlH/ NucpI84ccZ8zpM+/Ub0kuWz3jhVB9AGF8Cj7VQeN2Iqsezln3M67qNTepFqHKb6XwjCm+mGK0 JpscPsn3C5pAEqJuMqpyprh8HQvuck10+KQ2yrFRm8VZG8PqrGLufIhsmzjfs6Bm5RPIxhlh7 lZKnCL4uh2i7cXuZZMdsHidZhkOH0SLXbO0cJuVV04qflsHGQH7hYov9qahQ/eX9pYz1sBIwI iQF9DSgw/SXZP6kS+ki+4Tza767eIcG5nkWZlDt1fLcd64J/ZXue8ipdKN3QPhswxSxbtqg8I LTsaS6+Zss1sMi/Y4eIEe9TtWfKX0ldRZdkIvT9KeEyVKmxw5Boqubo2iV/auvV2pUbiSDupn GYObKOSgkY9z8AvrX8wX0ANMRoWrFKD9YXs/+RtZfr0y28MDp25DJ++dhrtfAzdmiCR8I3iIb geAStrz3+JUsWeY413BvtTQBtGo3zfKumyK5E3vXZfKqR//5ueNe6yH9jfNuP8JgaStwKUieg H08H15iE69qX+AtMfZlZuozmfma10rkemL+cv31DqadqqNwwyeBtvb6zAD0N9yTnNQ30dGARU D/8FAwahrxXLviTBTbScDtrSxHEnjHMOW+gLBQ34ilQo2VC1FV+FJt8hhJGRVc8wWNiM4CcN5 d7ZLsaqA60+5L2USN2VRVLZlDc0HOjwENouGS+XWO+Bw6unVa2AZ04= X-Original-Sender: stefano.babic@swupdate.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@swupdate.org header.s=s1-ionos header.b=b0GTX3nQ; spf=pass (google.com: domain of stefano.babic@swupdate.org designates 212.227.126.134 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org 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: , commit f8153 introduced a regression bug. The bootenv functions are not registered anymore and they cannot be called from scripts. They were handled separately, but after switching to a Lua Session State, there is no need for this and the function can be added together with the rest of the interface. Signed-off-by: Stefano Babic --- corelib/lua_interface.c | 6 ------ 1 file changed, 6 deletions(-) -- 2.34.1 diff --git a/corelib/lua_interface.c b/corelib/lua_interface.c index 74590ab6..86c2112d 100644 --- a/corelib/lua_interface.c +++ b/corelib/lua_interface.c @@ -1195,10 +1195,6 @@ static const luaL_Reg l_swupdate[] = { { "getversion", lua_get_swupdate_version }, { "progress", lua_notify_progress }, { "emmcbootpart", l_get_emmc_bootpart }, - { NULL, NULL } -}; - -static const luaL_Reg l_swupdate_bootenv[] = { { "get_bootenv", l_get_bootenv }, { "set_bootenv", l_set_bootenv }, { "get_selection", l_get_selection }, @@ -1319,7 +1315,6 @@ static int l_handler_wrapper(struct img_type *img, void *data, } struct dict **udbootenv = lua_newuserdata(L, sizeof(struct dict*)); *udbootenv = img->bootloader; - luaL_setfuncs(L, l_swupdate_bootenv, 1); lua_pop(L, 1); } @@ -1549,7 +1544,6 @@ lua_State *lua_session_init(struct dict *bootenv) luaL_requiref(L, "swupdate", luaopen_swupdate, 1 ); struct dict **udbootenv = lua_newuserdata(L, sizeof(struct dict*)); *udbootenv = bootenv; - luaL_setfuncs(L, l_swupdate_bootenv, 1); lua_pop(L, 1); /* remove unused copy left on stack */ lua_handlers_init(L);