Re: [rdma-core patch] srp_daemon: improve the debug message for is_enabled_by_rules_file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/10/19 7:40 PM, Honggang Li wrote:
> Signed-off-by: Honggang Li <honli@xxxxxxxxxx>
> ---
>  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;
> +	}

How about changing that message into e.g. "Allowing SRP target with
id_ext %s because not using a rules file"?

> +		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;

Is the "== 1" part necessary?

Otherwise this patch looks good to me.

Thanks,

Bart.




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux