Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp713644pxb; Thu, 30 Sep 2021 15:49:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfoamNIs8J7wSOuGe61QvnQtMF0QIPEVQy9Q5EIwdlOLuwZsvoBoOeI/+qi0MlRGd8Mg3m X-Received: by 2002:a63:b007:: with SMTP id h7mr6767490pgf.443.1633042187307; Thu, 30 Sep 2021 15:49:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633042187; cv=none; d=google.com; s=arc-20160816; b=OVLYYm0p/9lRBjHQ0rD1e6aPHUBbVfK5YRSLyjhBW8l6XECy6Xqa3vc274jo608PO3 Np43mE56MT0AbPJuCyFHA8VBX7VCEtEEYTU15eVXGJBGwL8TmInt2rvepEI/pKHHogSs +kjiPpYisHCcPlu9dCdacMKi9viZ7/AJ7Jbx9IajRFHcKXjtDvDUiEZg6Cs4ecmO++i8 +db3Hw0upZARyzah2A7pvqMcea4saFkkQdu+oXG4dvYP2OPHzPnYcA8aAZWTb49atXGv o97ShezLM/oAP6y8wWemjc+HoAUSQUbfPB5u+sup0t+2a9t7zLc6gaB48UMWRrgjmb1Q MsZA== 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:cc:to:from :dkim-signature; bh=rjn9c0A5xnGmuwQVHBsbF23LWzIh1tZ303XgwzxsFVo=; b=p+UexeUTsA2FxDgUzBVAGI5YyUr6ozOX7/nz6Dfn+N7m7edxjKt/92XbFziTIjbfXf NHH4XCwiNwTDhl4XyLUyRlnoWKUqXdO6jFQqYJp7BY046OJptC/+LvCL4JRwsfmOtscZ NFJRFemwBhDAr+DvbAaAiGmpHoqo2ym/JjV4PlZqLbBeJponr3dFfhw2c4Jm7ul8IMV6 qUu4I0h5/o+UuC48hgwR+rQrdDFoYb/I1hj/516tiHZ9eVHFnVeR1QgNN8ggyXMw7HOs ywbYcy14BjGSIE/vBxY+l9PnCYSt2xJhgRBMkjDRSl+spSdXduhn216fJx5Gkg2dAWoe b4tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=k6dI6bo1; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s3si4504321pls.433.2021.09.30.15.49.33; Thu, 30 Sep 2021 15:49:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=k6dI6bo1; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346149AbhI3WmC (ORCPT + 99 others); Thu, 30 Sep 2021 18:42:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344223AbhI3WmC (ORCPT ); Thu, 30 Sep 2021 18:42:02 -0400 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38404C06176A for ; Thu, 30 Sep 2021 15:40:19 -0700 (PDT) Received: by mail-pj1-x1033.google.com with SMTP id d13-20020a17090ad3cd00b0019e746f7bd4so7879997pjw.0 for ; Thu, 30 Sep 2021 15:40:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rjn9c0A5xnGmuwQVHBsbF23LWzIh1tZ303XgwzxsFVo=; b=k6dI6bo1ZhPKLy3t7nJcqP/fPMjhac+aeEcFAw1zIcuXvPrjqfv3pJKXDMXvuzzN5b o8GvaaEalL2RHMrjlYZ+DLTjmwFNUhRxscy5GHv+tQVYhYzUnLfriy9BfN1QZruS1kfA 1YFarVxEIAPmxujSmoe6WLbPlT8GnJ0i/vZrs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rjn9c0A5xnGmuwQVHBsbF23LWzIh1tZ303XgwzxsFVo=; b=6ecXmO0Nu2VmekMaFHxyvB90/Pe7ojjb9VKhYZrzX8fI8hWGdg6q014M0bCUdEdkNa aS3QVRAW1xyD6FrnqsxNcrWe7T6EvArZKgvyTIPyDPOEpHi4ThwvtwLA79eq1bUNdbsU 7oFaT22slE/Gu2y4JwCX7fKF0DF63f18q6zRZjELhdo+RxAdIbit260MPQ341HZ998G3 WTp6dHov2qPE3L1mQdHe5tS3ar3XbFxnqWjcp5a5pNJ7L2G0QE6uAZ6areMS2/RtYt+S 9ICBi/1WVGcMyYZxIr9FdJ/3fVYshFS3ar6Awebkql6mwwQReNprp6MQnFAiI5JbHYhR uBtg== X-Gm-Message-State: AOAM533JoS8AVbuJfXat1I5ThlmbSfPueMlbqS/Y+sLf2cCRrzHCIB93 5LbkqTj4tzfpkweSRIvmlc2nQIjyeKb7Ag== X-Received: by 2002:a17:90a:de83:: with SMTP id n3mr12361821pjv.29.1633041618438; Thu, 30 Sep 2021 15:40:18 -0700 (PDT) Received: from localhost ([2620:15c:202:201:eb71:bb5c:56a6:693f]) by smtp.gmail.com with UTF8SMTPSA id 26sm4541206pgx.72.2021.09.30.15.40.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Sep 2021 15:40:17 -0700 (PDT) From: Miao-chen Chou To: Bluetooth Kernel Mailing List Cc: Luiz Augusto von Dentz , Howard Chung , Alain Michaud , Marcel Holtmann , Miao-chen Chou Subject: [BlueZ PATCH v7 4/4] client: Print error code for connect methods Date: Thu, 30 Sep 2021 15:37:30 -0700 Message-Id: <20210930153703.BlueZ.v7.4.I226fdcdd12b13e4875c8cd03b42fc52283920cc4@changeid> X-Mailer: git-send-email 2.33.0.800.g4c38ced690-goog In-Reply-To: <20210930223726.2886139-1-mcchou@chromium.org> References: <20210930223726.2886139-1-mcchou@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org The following steps were performed. - Issuing repeated commands to connect the same BLE device. - Verifying the print in bluetoothctl console Reviewed-by: Alain Michaud Reviewed-by: Howard Chung --- Changes in v7: - Fix nits Changes in v6: - Rephrase error string Changes in v5: - Replace error code with error string Changes in v4: - Address make errors. Changes in v3: - Correct error-codes.txt. Changes in v2: - Add documentation for error codes client/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/main.c b/client/main.c index c1a62edb7..61650c289 100644 --- a/client/main.c +++ b/client/main.c @@ -1966,7 +1966,8 @@ static void connect_reply(DBusMessage *message, void *user_data) dbus_error_init(&error); if (dbus_set_error_from_message(&error, message) == TRUE) { - bt_shell_printf("Failed to connect: %s\n", error.name); + bt_shell_printf("Failed to connect: %s %s\n", error.name, + error.message); dbus_error_free(&error); return bt_shell_noninteractive_quit(EXIT_FAILURE); } -- 2.33.0.800.g4c38ced690-goog