Message ID | 20180821104306.29364-2-marcus.comstedt@qamcom.se |
---|---|
State | Accepted |
Delegated to: | John Crispin |
Headers | show
Return-Path: <openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=qamcom.se Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jjCkbkta"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=qamcom.se header.i=@qamcom.se header.b="mJGaqFYT"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41vnN62k44z9rvt for <incoming@patchwork.ozlabs.org>; Tue, 21 Aug 2018 20:43:49 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RMYZLHR7J++AyVr2zv6VNG9/77WADReMIXEqhaKd/tE=; b=jjCkbktaIkBW55 nPbMlb+VuT88WvtWzv5696HRMWeJxMZQoz1jVJTwLh54fjf0bS9s8vEa215HEb6DdnVd3JVooH/9c 5e4nAI/f2dly65eg4oBfhLWMk36ubAtkmnD8mMjzOKVWnkgHqtmncWSq9LjQwZT5m+LDLQgW5hxCr jelUS1PAYmlD1qVgHUNlfLxXMePG3okGxXlewNzFZKEFINvMOES+L9/wYRoJiB7ZJiOWnTvM3p07B fIXkxp++nwA2Ej0G6K1ZSvR7enoOO5kNx1NPNILdPKwiHSpcljgNf0RDqtFPrbFD2Cp+o5zXC/YVY Xk5ylXzFODYxQTr8YQwA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fs48S-0008KQ-JT; Tue, 21 Aug 2018 10:43:40 +0000 Received: from mail-db5eur01on0707.outbound.protection.outlook.com ([2a01:111:f400:fe02::707] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fs48I-0008Bg-A5 for openwrt-devel@lists.openwrt.org; Tue, 21 Aug 2018 10:43:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qamcom.se; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DSNsb+sXRQ/1D9MjKF7JnPK8bW0eQpeZD7Kys/qwQfE=; b=mJGaqFYTmFZ5ykOChO/iFax9mwwGH+scAwgLVSbpQg6ROYKZwTtfpzerWQVkuchXs6ajhIVFCJCIxjIJQQlnTnntRAHAMB9I+wk/32ghZQ6o2jfOqqFqRIV4JJ4zXfFHQAAH5W+ww9SS2PSURSZt+s3RK2yLF0NEfSlAI2r31Vw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=marcus.comstedt@qamcom.se; Received: from kobold.localdomain (83.209.8.201) by VI1PR06MB1599.eurprd06.prod.outlook.com (2a01:111:e400:5970::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1059.23; Tue, 21 Aug 2018 10:43:13 +0000 Received: by kobold.localdomain (Postfix, from userid 1000) id BAAEC300B16; Tue, 21 Aug 2018 12:43:08 +0200 (CEST) From: marcus.comstedt@qamcom.se To: openwrt-devel@lists.openwrt.org Date: Tue, 21 Aug 2018 12:43:06 +0200 Message-Id: <20180821104306.29364-2-marcus.comstedt@qamcom.se> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180821104306.29364-1-marcus.comstedt@qamcom.se> References: <20180821104306.29364-1-marcus.comstedt@qamcom.se> MIME-Version: 1.0 X-Originating-IP: [83.209.8.201] X-ClientProxiedBy: VI1PR0701CA0070.eurprd07.prod.outlook.com (2603:10a6:800:5f::32) To VI1PR06MB1599.eurprd06.prod.outlook.com (2a01:111:e400:5970::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7196e720-fa6d-48d2-5f54-08d60752e539 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:VI1PR06MB1599; X-Microsoft-Exchange-Diagnostics: 1; VI1PR06MB1599; 3:Yh4iMxc5ecOIwht/Z5fat6lLVJMWGj0lv3lMNMWsuLPPr2Kzmq6IWRolthMbLwuswjxHwsr61t5rq4YlPVD6IZL+mMQgSC1mukYOyq1MSCcnyd8Q3WutEmbym2+hr+bT2XdKduocGCHlgWW/22NESmb2dxDhCJx9emlOLlt1Gz93A4z4VYfFYQdGdy7FDFOnk6hyzIRI9rDgsm/JgJUOwg70P8oVvRaoIGSEN3WTZYX7RBeCYqPvdWDkdMk/B4l3; 25:C365ueo+43teMY2ZK6yQ457psZii0tgJVC+F23tOTT8ipx1Tu6pIijUBZEakD0VJzSrQMc3xS4q580PYouHslA+NaMKB9zXE8JLH7MGudNjp/9BHxbmo55aCnTF4t8VLCJ+6e3eV4npLbultTqKz2vtRNwgUjqn3DkJtWgB7eFXD77zI+vqTwX+pJ3FckL7onMkNV86vKFKF6AI0PmaF+OlDJOjWgM+w/czC4ZqCLNSiG7l5ViQ9M93BvA89AvlZhOhQvYm9jX7QlfVJRnejuww385ONNG1g8bO4Jce5l4U0/R4EsdT7vwNCRgUWLSQgQIQYHnasrGmKpa7r24nWmxL1DBz2638B02YReVRGbTg=; 31:CxwC1nZFyaFEJ6mpjD30wGlXNsnKAwu/pMPuFXIWH5k36so4TJWvf8CU2TtLbfMofp4d/LxcA8I/wQpvKMO4KnLHTszEoU1+O4naE4gwUnM734k3LFYohQaOFnM3OrPlAe3qaAOQz34vWul/1zoX2U9L5Wl+fQQRxFK0SFiIdoXK+3HmyEGMEUpYG3B73jHed879y2gYWjeUJsuTDOPrg/1IzlWnuqNUuTojGi9gEx4= X-MS-TrafficTypeDiagnostic: VI1PR06MB1599: X-Microsoft-Antispam-PRVS: <VI1PR06MB15998165293D282591BF6BD1F8310@VI1PR06MB1599.eurprd06.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(10201501046)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699016); SRVR:VI1PR06MB1599; BCL:0; PCL:0; RULEID:; SRVR:VI1PR06MB1599; X-Microsoft-Exchange-Diagnostics: 1; VI1PR06MB1599; 4:WaSle5PfgntPhwSqxpA9u15wdSmt3NNv3BfSz0uHbrlY9uRnjpteTkbw4ehOkiacx07diTYmAkEIjAXx1/dpvFchn6wBkVuUVpBHwXyV9Gzil/nlC/7LfFHgH+GGDJDfAIVi+ySAqfvpuXg6c2X7I3m8rET0ZroJLet3NMC2ZHVefX+zQa9KCbGrSGlMsEZk7zRNrR7ymGbCXVo+bWgyinDxvuq75dJUHihBCGdLxjCApDWBbYLRyj3ZZr3qOBBHw1rdEsPZ2LcfX+dPBOwYdw== X-Forefront-PRVS: 0771670921 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(136003)(396003)(346002)(376002)(39840400004)(366004)(189003)(199004)(50466002)(6116002)(53936002)(68736007)(9686003)(48376002)(386003)(8676002)(476003)(81166006)(1076002)(81156014)(42186006)(50226002)(446003)(16586007)(11346002)(3846002)(2616005)(316002)(26005)(97736004)(478600001)(5660300001)(8936002)(36756003)(186003)(6916009)(90966002)(86362001)(486006)(305945005)(85782001)(2906002)(33896004)(52956003)(47776003)(122856001)(66066001)(6266002)(52116002)(2351001)(106356001)(4326008)(7736002)(76176011)(105586002)(2361001)(51416003)(85772001); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR06MB1599; H:kobold.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: qamcom.se does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR06MB1599; 23:c7jYMNhsnhupZiQq/dqakqmLsoesWOKbqBtTYwoXY?= 6aoCMj9q0MNiptZRiahyFZgJMCfhwQiXjHWgHJxvhvvJG8Ogu/DGQ+ttLaeG1GnDhga47Dfi6fmKy1kIe7npVxNNfNHQOHfdYlstT1llG+q57UATPNlw5IkuRph3FNuYO7d4SjrK8kz5+5YkO5r0qP8J3yHD4UTrMUr36RWCygDyI4rYYF5Ylq4LOxN8oZbJQEDSwiHnc8X9Tg3wD73amUIKv8m97OwbdgN2d9u0GV0N/X8xlTIFm9m2Prkcku0uiTdWbEqfahjNjK9S0Ox/XnpMFIyHNH1SzObJDreWp5dQ3CAsAE3GmtN6ckQiAOGMX44bZHFvIpRck8sX6u7sVU7OZiF5X7Dz/5yys0ztymu4kdONaA5EO4plxZ/lcr5+WCVQ8vIBWA126oThJnEvsjlIJVGHmyQPBj5tOlrTmbZvCLV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osticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: qamcom.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Aug 2018 10:43:13.3518 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7196e720-fa6d-48d2-5f54-08d60752e539 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0fd26bbd-77a0-4af5-9f14-b5bc840146bd X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR06MB1599 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180821_034330_809890_C60B21F9 X-CRM114-Status: UNSURE ( 6.94 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a01:111:f400:fe02:0:0:0:707 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH 1/1] ubus/lua: add support for BLOBMSG_TYPE_DOUBLE X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <openwrt-devel.lists.openwrt.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/openwrt-devel/> List-Post: <mailto:openwrt-devel@lists.openwrt.org> List-Help: <mailto:openwrt-devel-request@lists.openwrt.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=subscribe> Cc: Marcus Comstedt <marcus@mc.pp.se> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "openwrt-devel" <openwrt-devel-bounces@lists.openwrt.org> Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org |
Series |
ubus/lua: add support for BLOBMSG_TYPE_DOUBLE
|
expand
|
diff --git a/lua/ubus.c b/lua/ubus.c index 00d9e00..4da3c80 100644 --- a/lua/ubus.c +++ b/lua/ubus.c @@ -111,6 +111,17 @@ ubus_lua_parse_blob(lua_State *L, struct blob_attr *attr, bool table) lua_pushnumber(L, (double) be64_to_cpu(*(uint64_t *)data)); break; + case BLOBMSG_TYPE_DOUBLE: + { + union { + double d; + uint64_t u64; + } v; + v.u64 = be64_to_cpu(*(uint64_t *)data); + lua_pushnumber(L, v.d); + } + break; + case BLOBMSG_TYPE_STRING: lua_pushstring(L, data); break; @@ -982,6 +993,8 @@ luaopen_ubus(lua_State *L) lua_setfield(L, -2, "INT16"); lua_pushinteger(L, BLOBMSG_TYPE_INT8); lua_setfield(L, -2, "INT8"); + lua_pushinteger(L, BLOBMSG_TYPE_DOUBLE); + lua_setfield(L, -2, "DOUBLE"); lua_pushinteger(L, BLOBMSG_TYPE_BOOL); lua_setfield(L, -2, "BOOLEAN");