Re: [PATCH 5/5] scsi: target: Export fabric driver direct submit settings

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

 



On Mon, Jul 10, 2023 at 04:44:42PM -0500, Mike Christie wrote:
> +static ssize_t
> +target_fabric_wwn_default_to_direct_submit_show(struct config_item *item,
> +                                               char *page)
> +{
> +       struct se_wwn *wwn = container_of(to_config_group(item), struct se_wwn,
> +                                         param_group);
> +       return sprintf(page, "%u\n", wwn->wwn_tf->tf_ops->default_direct_submit);

I belive we should do the right thing and use sysfs_emit() here. We
already have a bunch of issues with bad sprintf() usage and I think it
would be wise to promote safer interfaces.

> +static ssize_t
> +target_fabric_wwn_direct_submit_supported_show(struct config_item *item,
> +                                              char *page)
> +{
> +       struct se_wwn *wwn = container_of(to_config_group(item), struct se_wwn,
> +                                         param_group);
> +       return sprintf(page, "%u\n", wwn->wwn_tf->tf_ops->direct_submit_supp);

Same.



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux