From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18852C742BD for ; Fri, 12 Jul 2019 14:32:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EB75A206B8 for ; Fri, 12 Jul 2019 14:32:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726939AbfGLOcC (ORCPT ); Fri, 12 Jul 2019 10:32:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10982 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726266AbfGLOcC (ORCPT ); Fri, 12 Jul 2019 10:32:02 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F0BEC31628E5; Fri, 12 Jul 2019 14:32:01 +0000 (UTC) Received: from localhost (ovpn-12-25.pek2.redhat.com [10.72.12.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 010091001B3C; Fri, 12 Jul 2019 14:31:59 +0000 (UTC) From: Honggang Li To: bvanassche@acm.org Cc: linux-rdma@vger.kernel.org, Honggang Li Subject: [rdma-core patch v2] srp_daemon: improve the debug message for is_enabled_by_rules_file Date: Fri, 12 Jul 2019 10:31:47 -0400 Message-Id: <20190712143147.10414-1-honli@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Fri, 12 Jul 2019 14:32:02 +0000 (UTC) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org 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..e85b9668 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("Allowing SRP target with id_ext %s because not using a 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 ? "allowed" : "disallowed"); return conf->rules[rule].allow; } while (1); -- 2.20.1