Message ID | 20181218041953.8960-6-sam@mendozajonas.com |
---|---|
State | New |
Headers | show
Return-Path: <petitboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43JlFx2JWPz9sBZ for <incoming@patchwork.ozlabs.org>; Tue, 18 Dec 2018 15:21:25 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mendozajonas.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mendozajonas.com header.i=@mendozajonas.com header.b="HTAyA85p"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="buD5ZVar"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 43JlFw5951zDq5Z for <incoming@patchwork.ozlabs.org>; Tue, 18 Dec 2018 15:21:24 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=mendozajonas.com Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mendozajonas.com header.i=@mendozajonas.com header.b="HTAyA85p"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="buD5ZVar"; dkim-atps=neutral X-Original-To: petitboot@lists.ozlabs.org Delivered-To: petitboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=mendozajonas.com (client-ip=66.111.4.25; helo=out1-smtp.messagingengine.com; envelope-from=sam@mendozajonas.com; receiver=<UNKNOWN>) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=mendozajonas.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=mendozajonas.com header.i=@mendozajonas.com header.b="HTAyA85p"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="buD5ZVar"; dkim-atps=neutral Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 43JlDZ53GHzDqWn for <petitboot@lists.ozlabs.org>; Tue, 18 Dec 2018 15:20:14 +1100 (AEDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 7B0312246E; Mon, 17 Dec 2018 23:20:11 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 17 Dec 2018 23:20:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= mendozajonas.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=fm1; bh=qCUWKU50ZDh4HPexy4uYvgzn7yTqzl7COUMVvF2Nx4k=; b=HTAyA 85p8mwrENFba5vIetfo4TsTsQdLvLOFjMpExALN9lYyxMTk24SXFY1+LuZDAoemi 9YLAdJu3M03WmcENMselegvxAQ2CDT4ccrbmF2H3ErNlrSDuKdVBQYPez28Q1e6P gp04iN5tob/uwKEpNSoo6vgEFVGkg61TVUhdJZuPZSQ+f/UFzQ+QaNHpKjpr8mk3 1hSRBUZrJjJRZjqoea1cHHwuXm7ax4LU3w/HVy68hfvLm6Sjl3ausLXPs+YwZQD+ wXvOME/7tR2zM8WqMt9cj9NtYXji3PLPM2R5Fy+vmKAMLkkOVUD9xfhQZfLiBqXJ mqw9vRy9Dmxv/vFVQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=qCUWKU50ZDh4HPexy4uYvgzn7yTqzl7COUMVvF2Nx4k=; b=buD5ZVar Jz4JIUE1eFdv0lvw6w3pmwUh/I0MvR0JtWCNoKXWQKEVERoDPjycECHYJ5suBkW1 BYYeL+UcKWvyidyfrlA/N+NQhEbD2Gg5u4EsjyaWn2I4fV8/yNJTuGd99DkU7ZSl /jzAtYGkUtl9cUno6zFS/WOULDk3ErzJWdHHFgVCfzhWLDQGArWUC8RlKlYpExgr EyIC6otiBvewDpEeY75wqeSdWl4YEGYE9L8IxG6pxyZDs1xXj7kSrV1dUyadPtqC cXwwl03ypi2UmVlVoUSItSa2gbvvVA6gmJUzBCQnpUU7K9hOrCO3N5p6rn1aQwqM NLlLzYMa47yl/g== X-ME-Sender: <xms:e3UYXGX5oBSSwJ1nEgtGF8A2TyPmJxUBsLcWPHYGk6URurQsA6C6qg> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtkedrudeigedgjeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpe furghmuhgvlhcuofgvnhguohiirgdqlfhonhgrshcuoehsrghmsehmvghnughoiigrjhho nhgrshdrtghomheqnecukfhppeduvddvrdelledrkedvrddutdenucfrrghrrghmpehmrg hilhhfrhhomhepshgrmhesmhgvnhguohiirghjohhnrghsrdgtohhmnecuvehluhhsthgv rhfuihiivgeptd X-ME-Proxy: <xmx:e3UYXCzk_xsgaiUon7jCFXpSOlp41ZNcsCOWZY8LVC0DauJiy1V9rQ> <xmx:e3UYXMP3XXsv6Oi1WbWhuMYX2ZYigCRYTA7i3nfnoWemJyJEcPtE_A> <xmx:e3UYXL4tJl8-qB41UmFAPof_XF7P-nwTWX3N3NIlxbTdJgN6LnEkmg> <xmx:e3UYXLTnKeFKBpoSUxvQ6i4Ik5lCMyGgA0WVUfotsTMEh0owwTB4Xw> Received: from v4.ozlabs.ibm.com (unknown [122.99.82.10]) by mail.messagingengine.com (Postfix) with ESMTPA id 0CC8E10084; Mon, 17 Dec 2018 23:20:09 -0500 (EST) From: Samuel Mendoza-Jonas <sam@mendozajonas.com> To: petitboot@lists.ozlabs.org Subject: [RFC PATCH 5/8] discover/device-handler: Read command files if present Date: Tue, 18 Dec 2018 15:19:50 +1100 Message-Id: <20181218041953.8960-6-sam@mendozajonas.com> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181218041953.8960-1-sam@mendozajonas.com> References: <20181218041953.8960-1-sam@mendozajonas.com> MIME-Version: 1.0 X-BeenThere: petitboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Petitboot bootloader development <petitboot.lists.ozlabs.org> List-Unsubscribe: <https://lists.ozlabs.org/options/petitboot>, <mailto:petitboot-request@lists.ozlabs.org?subject=unsubscribe> List-Archive: <http://lists.ozlabs.org/pipermail/petitboot/> List-Post: <mailto:petitboot@lists.ozlabs.org> List-Help: <mailto:petitboot-request@lists.ozlabs.org?subject=help> List-Subscribe: <https://lists.ozlabs.org/listinfo/petitboot>, <mailto:petitboot-request@lists.ozlabs.org?subject=subscribe> Cc: Samuel Mendoza-Jonas <sam@mendozajonas.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: petitboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Petitboot" <petitboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> |
Series |
Introduce pb-plugin 'commands' & Rust PoC
|
expand
|
diff --git a/discover/device-handler.c b/discover/device-handler.c index e75f4123..05d8df11 100644 --- a/discover/device-handler.c +++ b/discover/device-handler.c @@ -20,6 +20,7 @@ #include <url/url.h> #include <i18n/i18n.h> #include <pb-config/pb-config.h> +#include <rust/rustlibs.h> #include <sys/sysmacros.h> #include <sys/types.h> @@ -1845,6 +1846,13 @@ void device_handler_add_plugin_option(struct device_handler *handler, } } + if (opt->command_file) { + opt->n_commands = parse_command_file(opt, opt->command_file, + &opt->commands); + pb_log("Plugin %s included %d command definitions\n", + opt->name, opt->n_commands); + } + handler->plugins = talloc_realloc(handler, handler->plugins, struct plugin_option *, handler->n_plugins + 1); if (!handler->plugins) {
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> --- discover/device-handler.c | 8 ++++++++ 1 file changed, 8 insertions(+)