From patchwork Thu Jul 11 02:40:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honggang LI X-Patchwork-Id: 11039195 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 30517112C for ; Thu, 11 Jul 2019 02:40:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 205222875F for ; Thu, 11 Jul 2019 02:40:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1457B287C9; Thu, 11 Jul 2019 02:40:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5A312875F for ; Thu, 11 Jul 2019 02:40:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727783AbfGKCka (ORCPT ); Wed, 10 Jul 2019 22:40:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35838 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727709AbfGKCk3 (ORCPT ); Wed, 10 Jul 2019 22:40:29 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C30432F8BDC; Thu, 11 Jul 2019 02:40:29 +0000 (UTC) Received: from localhost (ovpn-12-24.pek2.redhat.com [10.72.12.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 25FB352FC9; Thu, 11 Jul 2019 02:40:28 +0000 (UTC) From: Honggang Li To: bvanassche@acm.org Cc: linux-rdma@vger.kernel.org, Honggang Li Subject: [rdma-core patch] srp_daemon: improve the debug message for is_enabled_by_rules_file Date: Wed, 10 Jul 2019 22:40:01 -0400 Message-Id: <20190711024001.14648-1-honli@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 11 Jul 2019 02:40:29 +0000 (UTC) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Honggang Li --- srp_daemon/srp_daemon.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/srp_daemon/srp_daemon.c b/srp_daemon/srp_daemon.c index a004f6a4..f27dd569 100644 --- a/srp_daemon/srp_daemon.c +++ b/srp_daemon/srp_daemon.c @@ -349,10 +349,11 @@ static int is_enabled_by_rules_file(struct target_details *target) int rule; struct config_t *conf = config; - if (NULL == conf->rules) + if (NULL == conf->rules) { + pr_debug("SRP target with id_ext %s allowed by rules file\n", target->id_ext); return 1; + } - pr_debug("Found an SRP target with id_ext %s - check if it allowed by rules file\n", target->id_ext); rule = -1; do { rule++; @@ -392,6 +393,9 @@ static int is_enabled_by_rules_file(struct target_details *target) target->options = conf->rules[rule].options; + pr_debug("SRP target with id_ext %s %s by rules file\n", + target->id_ext, + conf->rules[rule].allow == 1 ? "allowed" : "disallowed"); return conf->rules[rule].allow; } while (1);