Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6856395rwd; Mon, 19 Jun 2023 13:39:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5rbP7ynzMhK5uPI6i5ejaIgonOImIKun0y7Gri/B/0/wamQZczPD8SC1vmnyGte4i/P7Kc X-Received: by 2002:a05:6a20:9144:b0:119:be71:1596 with SMTP id x4-20020a056a20914400b00119be711596mr15224558pzc.13.1687207163137; Mon, 19 Jun 2023 13:39:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687207163; cv=none; d=google.com; s=arc-20160816; b=s0nUhDGvb+2QG+n7/Gxmf/iWjHaoXmdzbsHLttLCUiMmrsvG0QRnGBsT6TJgbT3UQk Y4qJOqbj/WRmt1cptuSkoNMXwP4Jx9skJSxfy9oAQQji6geZiYGNuqBy+iunblTYqUbH CNiIr+0F9XcdOCtWTKGpuHxrj6xreXX1KdqUTBvbsru2IklGeStF2oCXhoDphF/yIMRu /MkhEZnYmQfbPrpR+XYTkKC+9RzNOoASrF1o1urnOHs9KKbYYMzLdyGekd5RWXNk99im xSum2zgRA1jTwDVgBppKlZFT/C2C9Kxi9cI++hE4rErgNjFmUXoGf/4rfM3WZKMoqSFq c/oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=T4/mMmUNrSITP62UEH321ZzDfclxkl4F6Eyk2fR6Nzw=; b=DpAC6dbtKkuezyD3gGiEkX9Yn2h3CSrDYnsD1ys8twuNjzCE1V/+Zri1w0fd058UFr xRko1ZLg1t+Xi7mtANkac80DfXClT9UTLajMmXiZtUJ1avmuZ/IZR3dyJdxJGgJZq95e JNE6B64LvngmMkGf5DBTlz3OEmZwT4xKF1n4AOfjArkn9bCZ23Te53b/Hywq5f+oL2kV NPSIBOkx8YESP0CwQ+ywhcAE76DbJ2BcVZZpBDnpgkP0DVc2YQnTBMVVNwh96IcGMKgx 8JElPlrZdv8v+Yr5yyfPoWWZmtigBlWlHc/d5ctvz9gOdGvV5TTuDQIdxcVX/Neb0bcE xyYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=M2k9io6V; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x15-20020aa7940f000000b006630be2db05si198322pfo.182.2023.06.19.13.39.10; Mon, 19 Jun 2023 13:39:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=M2k9io6V; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229883AbjFSUai (ORCPT + 99 others); Mon, 19 Jun 2023 16:30:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229839AbjFSUai (ORCPT ); Mon, 19 Jun 2023 16:30:38 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62783A3 for ; Mon, 19 Jun 2023 13:30:37 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1b5422163f4so23512545ad.2 for ; Mon, 19 Jun 2023 13:30:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687206636; x=1689798636; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=T4/mMmUNrSITP62UEH321ZzDfclxkl4F6Eyk2fR6Nzw=; b=M2k9io6Vvf+ajtrw3/ddkQpgJ2mrVel9MYhs5/WPF1kkJueHJ+MYC2YLrj/TN1x2zR iiMR2d8wH/U9ElrRk1HnRWqLF5kKbcUd6Nh4k0TwdEi3ZmmmUG3WoewEOtbt8PhU6/Cb 0mVzhf+a10lhvvuBpZp6fjv+Xntl5U5AIxuvMOgWq89S+T9EG+pEeUnFJ8dYez9S1EUM W7ATgcTLqzAV+U4i6xfbp1wJtmEU7L4lvlwDEA62VfQg+7p6BJD3m/zjXcKVs3yq7nIU bIuQESMni5xGypLBGlEldFyZ+qwH405v8K2sqbgZ7JrIOOXvDWKgoZzS5FihT74liS/l mkeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687206636; x=1689798636; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=T4/mMmUNrSITP62UEH321ZzDfclxkl4F6Eyk2fR6Nzw=; b=ZdND5gOJ00aBDLhQxHskiTMgBdCaCth2UEqINIhYHj0A+bA0KIoJBvONOhncHMN8Un 9u2Zymuu31jIXi/Nv8GzB92KLvekT9lXhC611taZmBUankuUU09BBCsm+nRYkvY596hx 2En2Oe1p7g8bu1UydMWX7Ydf30CbDbk+sMvXcCMcDnc6bErD6TCpMfl2xaeFs++2cz9f tZ9HFDVvmpxbGYsm7ftwPTxrb2PZi1diLwPKGmhljQMhH4FV9PXqdx5radCaqelxBrfP icBLBxn3Zg7HBOEzvMB4J06tF9qYZa0Kt0+PKMwOaNp/FUpOkGKiBU/B2ZocSJi2Cu7/ 27XA== X-Gm-Message-State: AC+VfDx8U4+zpUVF10aMUs9kIVLpCYs1He5tHFDEtdLyWnuOVKsV5tfP p8F1r5uu0T4aOUhvxgGsiSwe8NbFuXJDAQ== X-Received: by 2002:a17:902:c40c:b0:1b5:3aed:b078 with SMTP id k12-20020a170902c40c00b001b53aedb078mr12753380plk.53.1687206636055; Mon, 19 Jun 2023 13:30:36 -0700 (PDT) Received: from lvondent-mobl3.. (c-71-59-129-171.hsd1.or.comcast.net. [71.59.129.171]) by smtp.gmail.com with ESMTPSA id ju18-20020a170903429200b001b045c9ababsm202714plb.264.2023.06.19.13.30.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jun 2023 13:30:34 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ 2/5] client: Print integers decimal value Date: Mon, 19 Jun 2023 13:30:29 -0700 Message-Id: <20230619203032.6812-2-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230619203032.6812-1-luiz.dentz@gmail.com> References: <20230619203032.6812-1-luiz.dentz@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Luiz Augusto von Dentz This make the code print D-Bus integer iterators also in decimal format in addition to hexadecimal. --- client/print.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/client/print.c b/client/print.c index 798d22c7e..66439e541 100644 --- a/client/print.c +++ b/client/print.c @@ -127,15 +127,18 @@ void print_iter(const char *label, const char *name, DBusMessageIter *iter) break; case DBUS_TYPE_UINT32: dbus_message_iter_get_basic(iter, &valu32); - bt_shell_printf("%s%s: 0x%08x\n", label, name, valu32); + bt_shell_printf("%s%s: 0x%08x (%d)\n", label, name, valu32, + valu32); break; case DBUS_TYPE_UINT16: dbus_message_iter_get_basic(iter, &valu16); - bt_shell_printf("%s%s: 0x%04x\n", label, name, valu16); + bt_shell_printf("%s%s: 0x%04x (%d)\n", label, name, valu16, + valu16); break; case DBUS_TYPE_INT16: dbus_message_iter_get_basic(iter, &vals16); - bt_shell_printf("%s%s: %d\n", label, name, vals16); + bt_shell_printf("%s%s: 0x%04x (%d)\n", label, name, vals16, + vals16); break; case DBUS_TYPE_BYTE: dbus_message_iter_get_basic(iter, &byte); -- 2.40.1