From patchwork Tue Feb 16 05:35:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Sangorrin X-Patchwork-Id: 1440836 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::73f; helo=mail-qk1-x73f.google.com; envelope-from=swupdate+bncbdajjlub7agbbjftvwaqmgqe67yco7q@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20161025 header.b=NAqHdGmT; dkim-atps=neutral Received: from mail-qk1-x73f.google.com (mail-qk1-x73f.google.com [IPv6:2607:f8b0:4864:20::73f]) (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) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DfqST2Q0lz9sVJ for ; Tue, 16 Feb 2021 16:35:36 +1100 (AEDT) Received: by mail-qk1-x73f.google.com with SMTP id b27sf7342128qkl.11 for ; Mon, 15 Feb 2021 21:35:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1613453732; cv=pass; d=google.com; s=arc-20160816; b=l1XndZGwSLhLX7HEhNyVQUZvPc4jxBOizB9rIgnwmOmDFT686nXe+DXqPNOoe/Wsq/ qaqkHTtzZ1iUxgB3N5KNNtpoSlOH8+QSHG1f7P03L7BxBfoRW4eM8Pt4JBQ2u3smjNWJ ZzWEgLf3vPX1/1ILJ4l/hoATF/Uk0Eoij2/NOpn1uGEfcuKsFO6A34IPDxJTiOus4SGZ yQxWwqfv7UCE7sf3CIS9gLC2hQh8eOmDlXoArTDv9iDg3mCDx/HvD8r/l0ytZifnNQsz UhBHsr8+puLvfqEm94iaWg6lhx7gaEB2LS5qXVsjjZOXwfnErhv0dTD67VRNuKxo2ttx MeiQ== 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:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=nbFRIja10vLl7lN0VQ0Gph3gbw1TDz4TWLKPy5/bMdE=; b=QxfYzzF6OjMMksxPHXek7UIiN2qOTVv4uxl/BgyGDg2c3RGlx7zvphc/NWFH1l+wnM jZxp66iCjvV+YHs1xlPPpMO7WPjxxnEbnm/cz+Uv0Bhzue+HcqoWDbP0HEe68NBKoj0T glinG4MVbS4OcyyCMJYYVyrQBoWYCmmzbr8vSFLixvsS2omkMxphyfsTHJ58psUmRxhC FhsXnTZ9tUJczjzClDwDAsvy99tSf0I0OtWPVewwHROIiWqQEo4R9zjjqK+2ZBwEnsGY 2IMRn2jmkBrW49A+596+5VGveKZ/QlocGusV/ZTs2WQug7pcJBlKUNySqg0vdaB83tf9 O+lg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of daniel.sangorrin@toshiba.co.jp designates 210.130.202.155 as permitted sender) smtp.mailfrom=daniel.sangorrin@toshiba.co.jp; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=toshiba.co.jp DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; 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=nbFRIja10vLl7lN0VQ0Gph3gbw1TDz4TWLKPy5/bMdE=; b=NAqHdGmTJ/F3ytdfzBc7dY7VyvDkkWR8jXcUsv4AH8qsCeqnksB8Sy1l93yEvP/vTG fzQNj06m1ROUsqEp2oKvzeRQsON4mYFm+PRrWWr8eqyd6rK7JibxaywhKQaF+g0me1O0 ECgXVWC89pFFl4aQgZfQAp5j6KV+Tmjvb/n8NO91TDE56FdrUCDS1wWVSNMmH1vSUAF7 uyqlgoGB36cM/dPj+a0SWI+aLPI7wysWf+xS57KrphhRfEWgHsKw14HL7OrdkRBj1lRi n8rYZGlrhWpwFc+s33dlSGH/lxjV/RJGfoLjbwu5QL38Z/nkgQtWHGW4U1uTRTMEyI1F PgYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=nbFRIja10vLl7lN0VQ0Gph3gbw1TDz4TWLKPy5/bMdE=; b=OV1keEEnqynfSP2S6UC/rEK57RtI0oy50JBIbBzQq2YAqxO6/72ablyiamkcS3/eu8 3EJPnWe7ErZxs4Be0Y/WimTknXAXPKJG8Xz75V2U732ojn9WNFpxEYLY64oz1JVgfhvs ANKA1PCrbdDmrPuohH1uYI6yzqHgFamQHabnVrJ3XCyvHFBJY6rnm55rx2w6Lu9pOzc+ IfKZX0YdOq+ei/+yULhYrwLdCAzPQmVXPzw+Un+jZuRTXCYfxnkXqbIFfNczx7AYQqTw WYC5ImiORD4hItaS6xmj0M2lF++Bx8sZQV8f9tHiRdzdJXm6MzwU4h07G9wtKf4CtaYL o7lw== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM533wJSe+OfoW/wlyBP60KdiCZZxpERQZQ/uGxcCxVYVtLp6GOTvf ZBizHAb6a0u+1qUW4/gPT/M= X-Google-Smtp-Source: ABdhPJwxB7oEfIyfnfLuQlwsd8cnDU5QQQ2YFA0a9WOo12/XXIBvVyZCnuLFu91KjYJhHYKMymt1PA== X-Received: by 2002:ac8:70d7:: with SMTP id g23mr17318023qtp.25.1613453732466; Mon, 15 Feb 2021 21:35:32 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a37:6fc6:: with SMTP id k189ls9454250qkc.1.gmail; Mon, 15 Feb 2021 21:35:32 -0800 (PST) X-Received: by 2002:a37:a395:: with SMTP id m143mr4330432qke.439.1613453731974; Mon, 15 Feb 2021 21:35:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613453731; cv=none; d=google.com; s=arc-20160816; b=flK9MEOgtRdRk9+mfqS1naAYoZjxYZcy50KM7yiNG73B7HN62BaK+Dkke8i9yFGS6q fyscjiqYIb333de+lHi1g3Exfv3ox1PDGrPgj5pRvLikmZT1aGonEm7sjBzKq/F0dkLa OpzcckJzzvMSiSh6qgf3rBCcgjTKa8BA7xScmbfhAaTrAXkunAMs9cdWYAycQLOKMnDF Le557JND0vxrIJC6BOmzi8Nf6jefGhRldmA7sH4l+h8cni2rkLIFs9bhrkaTRnBgudgx 8WSg46eP6t9pE4TJyuQvEaMngoeBX46dzIpYialBtY0IQUfPD/MNKTCAFJ7aKZhCt04/ 926Q== ARC-Message-Signature: i=1; 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; bh=p447kQrGQaWgRpGTmQWdFh4dN4lWecNU42NJZ6Gjf7A=; b=puO4yp149zyNHXwD2bAXWDGbxi0P9Qi6k2Hsv6M4ZmEfj9aNXuSipvkyDJSKnC1y6R A21Y98qv/rXKb1WMNpQfTK63USjUnMRq4cOIJDS3thTJCEam08+yfxZgHhWbApNud+wD ju1aDhPxsqu60mMhtMbGE5hPEhp05Up3b2Z2NJq7X2o3o5xfqQxQwBioBpNYg1FLOBnV +6TRQgRsoD4KNqoFqgqygORdgB/V8eajRxwjodbFSNGM2cbDJmJXfgh5iidPMHKhwA+e USYJDEIJ7MwYfNpiTjHAZqg6W6ysvybT7vjz0uTk/VfXMCErxqvix9klG5Uz1QDjKMR2 0G3Q== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of daniel.sangorrin@toshiba.co.jp designates 210.130.202.155 as permitted sender) smtp.mailfrom=daniel.sangorrin@toshiba.co.jp; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=toshiba.co.jp Received: from mo-csw.securemx.jp (mo-csw1516.securemx.jp. [210.130.202.155]) by gmr-mx.google.com with ESMTPS id x65si1066434qkb.2.2021.02.15.21.35.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Feb 2021 21:35:30 -0800 (PST) Received-SPF: pass (google.com: domain of daniel.sangorrin@toshiba.co.jp designates 210.130.202.155 as permitted sender) client-ip=210.130.202.155; Received: by mo-csw.securemx.jp (mx-mo-csw1516) id 11G5ZSdI024528; Tue, 16 Feb 2021 14:35:28 +0900 X-Iguazu-Qid: 34tKARBBiNmkvOJ6Zd X-Iguazu-QSIG: v=2; s=0; t=1613453728; q=34tKARBBiNmkvOJ6Zd; m=tXgXpUD5qtfebbE+Vi39+DkEQgFY2z8MaE/jED/TzSc= Received: from imx2.toshiba.co.jp (imx2.toshiba.co.jp [106.186.93.51]) by relay.securemx.jp (mx-mr1513) id 11G5ZREj038704; Tue, 16 Feb 2021 14:35:27 +0900 Received: from enc01.toshiba.co.jp ([106.186.93.100]) by imx2.toshiba.co.jp with ESMTP id 11G5ZRgs009711; Tue, 16 Feb 2021 14:35:27 +0900 (JST) Received: from hop001.toshiba.co.jp ([133.199.164.63]) by enc01.toshiba.co.jp with ESMTP id 11G5ZRLr023768; Tue, 16 Feb 2021 14:35:27 +0900 From: Daniel Sangorrin To: swupdate@googlegroups.com Cc: christian.storm@siemens.com Subject: [swupdate] [PATCH] Lua: export preserve-attributes property Date: Tue, 16 Feb 2021 14:35:24 +0900 X-TSB-HOP: ON Message-Id: <20210216053524.417044-2-daniel.sangorrin@toshiba.co.jp> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210216053524.417044-1-daniel.sangorrin@toshiba.co.jp> References: <20210216053524.417044-1-daniel.sangorrin@toshiba.co.jp> MIME-Version: 1.0 X-Original-Sender: daniel.sangorrin@toshiba.co.jp X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of daniel.sangorrin@toshiba.co.jp designates 210.130.202.155 as permitted sender) smtp.mailfrom=daniel.sangorrin@toshiba.co.jp; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=toshiba.co.jp 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: , When using the handler "archive" from Lua, preserve-attributes was being ignored. Add the variable to lua_interface.c Signed-off-by: Daniel Sangorrin --- corelib/lua_interface.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/corelib/lua_interface.c b/corelib/lua_interface.c index a19e9ef..f9900e4 100644 --- a/corelib/lua_interface.c +++ b/corelib/lua_interface.c @@ -328,6 +328,8 @@ static void lua_bool_to_img(struct img_type *img, const char *key, img->is_partitioner = (bool)val; if (!strcmp(key, "script")) img->is_script = (bool)val; + if (!strcmp(key, "preserve_attributes")) + img->preserve_attributes = (bool)val; } static void lua_number_to_img(struct img_type *img, const char *key, @@ -493,6 +495,7 @@ static void update_table(lua_State* L, struct img_type *img) LUA_PUSH_IMG_BOOL(img, "encrypted", is_encrypted); LUA_PUSH_IMG_BOOL(img, "partition", is_partitioner); LUA_PUSH_IMG_BOOL(img, "script", is_script); + LUA_PUSH_IMG_BOOL(img, "preserve_attributes", preserve_attributes); LUA_PUSH_IMG_NUMBER(img, "offset", seek); LUA_PUSH_IMG_NUMBER(img, "size", size);