From patchwork Tue Nov 17 09:41:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1401432 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=2a00:1450:4864:20::337; helo=mail-wm1-x337.google.com; envelope-from=swupdate+bncbcxploxj6ikrbr5vz36qkgqetg34kxq@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de 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=EeYUz6ac; dkim-atps=neutral Received: from mail-wm1-x337.google.com (mail-wm1-x337.google.com [IPv6:2a00:1450:4864:20::337]) (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 4Cb1DD1TWSz9sRK for ; Tue, 17 Nov 2020 20:41:31 +1100 (AEDT) Received: by mail-wm1-x337.google.com with SMTP id j62sf1458289wma.4 for ; Tue, 17 Nov 2020 01:41:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1605606088; cv=pass; d=google.com; s=arc-20160816; b=lnt/j5pM3yVWq4Zio8+Kvvz/XXRdubaA5+ZId+E8w99hsWzAxNvE38bvILSB5aoa5h 0vIZmd4p+panjVscGm5wjH7S9WtGyC/aw4Q7Wr8h1MA0mPwOz4CdKG+Ic3itD2mp57mr CJwlhjW3ONR9fSNk0Af+IRJVghUkRC/4txRYQXVsq8+Z2jKn4JQvrXC4nNVNOcQPeg2D q4ruvHYJyeFU3zyFTuaowfHpqXp22+hSZuS4oV/V5nRt+cCzh2gTVTb2hHiyXN0GickD Tv7C/HiFKlM0wrF7n/lkpWeJBPw6jHAMrVYOszn4eh+miF38JxKy2dCI8Yu7zEnRR2LH GSDQ== 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:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=wZ7XdRsxU1P1z3ZaJf4uAzYdVZg9y/OZ/Sj6+o1W8ZM=; b=Cg8SQqzDXBX38ETlnZMz4iAk5cuILEzYCFLukBa1YHzNw+MS7Wvux2stc2B6yb9rtO VfGw1+7H6tP6nGKWzRF7nLaYqNT8+wDy/m8/Dbm9Vbq6THLmsZZ4o/RLhdbmGA4t45N+ An+VXFDhRIqtNWVZPFUpJyemxeM9BVVHyjoPb5LtepDx1b59Dydhh80ZxJV+AFmGAw9t Wx3xqj1LXAa8/U2fBYJzQ13P9qfzFXjAbiKYHgZN0aVPTDVgGh9vPQMH+3Y7qZXRN2xt J+o9xov2We8uRxaFXVCiveXOsvEe/9boss1+TjjIkLuyMF3KiKrKxUeH1btpuB3dkrOM nWAw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; 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=wZ7XdRsxU1P1z3ZaJf4uAzYdVZg9y/OZ/Sj6+o1W8ZM=; b=EeYUz6acgzSSUMJle4uvcdmSPK5R36QaGzSeDaPMHh5x2Dlb/+kDv+cP/YkcjL1uLg r+ZjvU4PZfWktXQvCUCI2jCVzWQq6VrrrXI7QYg5UX3xbuWptNs7G9r58NQ7vaKEu0p3 4wbVKpuldBN4c7H82vHREc/2W8x1/W6dW/xlqVI2nw4Wsv7xwMVwvXbd5JDJIeDmTuAI 5RvOdzCOIU9qjcFPlMnr/EU7ey/RhriNm0vno5u4my0vWbYsZ5w6OcZgG16prL/ImHpL DFbgFJFvRlUtgbllfWrZRxpxoTQVhydqOo1IjwfjnYvYHm3Drjzg91Z8ZVvQPwnoi2XZ /mxg== 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 :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=wZ7XdRsxU1P1z3ZaJf4uAzYdVZg9y/OZ/Sj6+o1W8ZM=; b=gM1YBYT8djciKCyaGigj+eXiRReHdrkwoVda67+H1Rds8ffiutIbcI5RtWe6Jx3UkX Ugv4tqWj1xDFde+8A9nGK3IA+rWKpVkodoTRuZqFIh88PbpFeb2Tk73Z0LJM5cuOp4ou E5wI1HDLKzpwiQ8kFreaxiU54plWOqwHbcdM0FxC/2Rh+Uzg8CNpz2o3I32RnHmUtAqW mVXzVa1qwCcBW9RNlzbEryDody+X3A5HHAvRq71XVeEexeh4TMBdSSSZQy9dosCWWVsQ 9xVhBd/bBG4BdiG/HQiRUgLZKzZoUkmt3yEjm1hE+sJM8EwG8mvRwT5zYvBURKlnoVc3 kDhg== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM532a/tf2dP4pUdLmNdNYWuZjCi70MLT/ty7wFPxBcoGbbmCETLXG kKrZHlQbZ1qPo5Fxv2dVLqs= X-Google-Smtp-Source: ABdhPJwEXP73rzmlpTNugww6HFEduVuM+8a3EoW/Tmndu4uvmVMZNmsziRKnr98K55JulT4hO2IADA== X-Received: by 2002:adf:de12:: with SMTP id b18mr24743480wrm.187.1605606088172; Tue, 17 Nov 2020 01:41:28 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:adf:f70d:: with SMTP id r13ls1976102wrp.1.gmail; Tue, 17 Nov 2020 01:41:27 -0800 (PST) X-Received: by 2002:a5d:4d4d:: with SMTP id a13mr7942742wru.152.1605606087173; Tue, 17 Nov 2020 01:41:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605606087; cv=none; d=google.com; s=arc-20160816; b=QA6HEdwOlQ4cQEBLSm3ddrc4rpLzBLpFYszbGU4h/t3Hzo37/JTsn4tP05y+hDpoJz IzqIClC1Enl1V3L87fTZgxrew5nQfoZO8UkTok42QT9p8KktMmbrCXtFqN+cT5MvAbHr db0qo5JXe3G4VOgxvP9/k1glax7+CuH9mF4G4VnyPgKaPdF46FFjl/0O3QTHX7+c8NGI E5Bx9xY+H6/hngtItbICJRmw2ueiL+IWk0VmA2YLx+dyqutcyRnDwC+pzewx5nl3S/5G yzLZDRnnG6BQUdsovUUcMrDsA83QcNLMMA/gKiy6BxjiToyTqrAQNMbxn7HRvhzjVQqH +Zow== ARC-Message-Signature: i=1; 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; bh=sdeeX39IP2ctoRxhHmmChw+lJxVTXjMDU9Zzfa5fG/s=; b=JgNWUrOgK6p4q0DxD+PELTr4EnHdszio8VaKjY19gTKzpDIiS1gG01dcScEq3IHcsA sirv9LhNt91yyNnH7GjkOODf2dPEJyrnJyi7NH/OolbG6WOCtk73BiWr4V2k8ibW/gb+ 5aJQgxmbqkuwGPccU0y7AQCwzLZaMXqHXVb7nZrZIKFlg1HGwzN2ajigZU3huyUrkAWS guO83dtX8ysp9Z06bOieEyCLWt+RcduTk3wjUwJRjfhf0axfNUrY60JN1lfIHpFAHcZs 8xIelMmMPggtmK5qFZi+D0nzpuyYOkEsvflUVoTNw8M4ffqi7ErRkdbK4PXtPupPoJDM Q6FA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id i1si72490wml.2.2020.11.17.01.41.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Nov 2020 01:41:27 -0800 (PST) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=212.18.0.9; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4Cb1D672cDz1qt4C; Tue, 17 Nov 2020 10:41:26 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4Cb1D66nYZz1rYFK; Tue, 17 Nov 2020 10:41:26 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id wZWhMlIZzHpk; Tue, 17 Nov 2020 10:41:26 +0100 (CET) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Tue, 17 Nov 2020 10:41:26 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 08E4C4540A7E; Tue, 17 Nov 2020 10:41:26 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([IPv6:::1]) by localhost (mail.babic.homelinux.org [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 5HPyUcS38xKM; Tue, 17 Nov 2020 10:41:23 +0100 (CET) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.64]) by babic.homelinux.org (Postfix) with ESMTP id 721AE4540191; Tue, 17 Nov 2020 10:41:23 +0100 (CET) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH 1/3] Connect the internal data tree to the shared data structure Date: Tue, 17 Nov 2020 10:41:20 +0100 Message-Id: <20201117094122.2153374-1-sbabic@denx.de> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de 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: , The parser generates an internal representation how the update should run and store it into a struct swupdate_cfg. This connects the shared object "installer" to the internal database to retrieve information about the update via IPC. It is thought that the database is for IPC just read-only and no direct access is allowed. Signed-off-by: Stefano Babic --- core/stream_interface.c | 1 + include/installer_priv.h | 1 + 2 files changed, 2 insertions(+) diff --git a/core/stream_interface.c b/core/stream_interface.c index 89ae52e..7df33ec 100644 --- a/core/stream_interface.c +++ b/core/stream_interface.c @@ -482,6 +482,7 @@ void *network_initializer(void *data) memset(&inst, 0, sizeof(inst)); inst.fd = -1; inst.status = IDLE; + inst.software = software; /* fork off the local dialogs and network service */ network_thread_id = start_thread(network_thread, &inst); diff --git a/include/installer_priv.h b/include/installer_priv.h index 1a7013a..d406f27 100644 --- a/include/installer_priv.h +++ b/include/installer_priv.h @@ -18,6 +18,7 @@ struct installer { int last_error; /* error code if installation failed */ char errormsg[64]; /* error message if installation failed */ struct swupdate_request req; + struct swupdate_cfg const *software; }; #endif