From patchwork Thu Jul 14 08:14:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Dedecker X-Patchwork-Id: 648264 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (caladan.dune.hu [78.24.191.180]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rqpRd3dKdz9s9W for ; Thu, 14 Jul 2016 18:15:41 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=cLDhlj7M; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 2CF06B807B3; Thu, 14 Jul 2016 10:14:58 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Thu, 14 Jul 2016 10:14:58 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id C606DB80791 for ; Thu, 14 Jul 2016 10:14:54 +0200 (CEST) X-policyd-weight: using cached result; rate: -7 Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Thu, 14 Jul 2016 10:14:54 +0200 (CEST) Received: by mail-wm0-f68.google.com with SMTP id x83so8536135wma.3 for ; Thu, 14 Jul 2016 01:14:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=xaBWPfSOT/NvmrR4ZMJXBiySM6u7VpyA5xJExHkIR3I=; b=cLDhlj7Mo+Ay1HwCaw3jJBZYKtX2XqMfzx9ILlL54IQ+emCLpJLjtqPBxNN15Rle4+ 0H6vJPKYihOgCpfz+fi6E/B9rHQKd/yYvfX/6vy79K/L/qOkOT8uNb6ik65Drz3cbzl8 VIhU1MSvY89akqpFpM1PSNQ4UBzs77kr4gANgxqv+3UrN+TijPO3BmLaiA9nQ9gq2VTf owRiA/DcRO4x6q8VsuyJ7MlByY9x4Tr8tgZjjqyGJJu6FL1vO2my97D46I9Jp7Eibgfs OrJbutiOHC6yBtE6FOVUJ9lNOhVA1cjwDH8wDhjuyD18t67ZcHJ24tidAxuY5nRYW5Pr x5lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xaBWPfSOT/NvmrR4ZMJXBiySM6u7VpyA5xJExHkIR3I=; b=gW/pMNFp7MDcdwL4obAzgMermVzxv+u4l9QMaljYEH7mg71LrT8/Pm2EzMJRyiD4G0 8sPT8CBVJ0YSf5LwtOhfGrQJPTV2MkroQmKv0zJ95H4tqu0yLzlclJibcVKa8QE83XXs rXQ4CiJJt61FlPTRE2SK0Z5yhcyixCT3A/N+DdLZDdOVocwjDp8esCMnQ3SUotYC7bPI G3uPj/8gu82YviXl/FcJ3an3hRsSFD3laucchVALTh3Sxgw9HeoVH6mLH+gzHARibU8K JiUqS2OEwJAgsePhsZdCUBi74ncQ1UeIH8hIEj7ZtStUcDcik+ti8Zs9Pg8yX/PI6r2S MYjg== X-Gm-Message-State: ALyK8tLnxywgHx98t/7XCUFEoQXOl4klDDuyLOSmZ3gSSxZsAc2uCbSSTztxRxZLYbjz5g== X-Received: by 10.194.93.102 with SMTP id ct6mr4681262wjb.60.1468484093989; Thu, 14 Jul 2016 01:14:53 -0700 (PDT) Received: from cplx43.eu.thmulti.com ([141.11.62.7]) by smtp.gmail.com with ESMTPSA id ju2sm1164384wjc.14.2016.07.14.01.14.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 14 Jul 2016 01:14:53 -0700 (PDT) From: Hans Dedecker To: openwrt-devel@lists.openwrt.org, lede-dev@lists.infradead.org Date: Thu, 14 Jul 2016 10:14:15 +0200 Message-Id: <1468484055-27341-3-git-send-email-dedeckeh@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1468484055-27341-1-git-send-email-dedeckeh@gmail.com> References: <1468484055-27341-1-git-send-email-dedeckeh@gmail.com> Subject: [OpenWrt-Devel] [PATCH netifd 3/3] proto: Display proto flags when dumping the protocol handlers in ubus X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hans Dedecker , steven@midlink.org MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Signed-off-by: Hans Dedecker --- proto.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/proto.c b/proto.c index 45eeb4b..4cbf3f4 100644 --- a/proto.c +++ b/proto.c @@ -567,7 +567,13 @@ proto_dump_handlers(struct blob_buf *b) blobmsg_add_string(b, p->config_params->params[i].name, uci_get_validate_string(p->config_params, i)); blobmsg_close_table(b, v); } + blobmsg_add_u8(b, "immediate", !!(p->flags & PROTO_FLAG_IMMEDIATE)); blobmsg_add_u8(b, "no_device", !!(p->flags & PROTO_FLAG_NODEV)); + blobmsg_add_u8(b, "init_available", !!(p->flags & PROTO_FLAG_INIT_AVAILABLE)); + blobmsg_add_u8(b, "renew_available", !!(p->flags & PROTO_FLAG_RENEW_AVAILABLE)); + blobmsg_add_u8(b, "force_link_default", !!(p->flags & PROTO_FLAG_FORCE_LINK_DEFAULT)); + blobmsg_add_u8(b, "last_error", !!(p->flags & PROTO_FLAG_LASTERROR)); + blobmsg_add_u8(b, "no_task", !!(p->flags & PROTO_FLAG_NO_TASK)); blobmsg_close_table(b, c); } }