lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2cae6633-ee5c-48f1-a546-8b334a3e8f39@linux.dev>
Date: Tue, 3 Sep 2024 12:06:37 +0100
From: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
To: Paolo Abeni <pabeni@...hat.com>, Jakub Kicinski <kuba@...nel.org>,
 Jonathan Lemon <jonathan.lemon@...il.com>, Jiri Slaby
 <jirislaby@...nel.org>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net v7 2/3] ptp: ocp: adjust sysfs entries to expose tty
 information

On 03/09/2024 11:35, Paolo Abeni wrote:
> 
> 
> On 8/29/24 20:36, Vadim Fedorenko wrote:
>> diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
>> index 46369de8e30b..e7479b9b90cb 100644
>> --- a/drivers/ptp/ptp_ocp.c
>> +++ b/drivers/ptp/ptp_ocp.c
>> @@ -3361,6 +3361,54 @@ static EXT_ATTR_RO(freq, frequency, 1);
>>   static EXT_ATTR_RO(freq, frequency, 2);
>>   static EXT_ATTR_RO(freq, frequency, 3);
>> +static ssize_t
>> +ptp_ocp_tty_show(struct device *dev, struct device_attribute *attr, 
>> char *buf)
>> +{
>> +    struct dev_ext_attribute *ea = to_ext_attr(attr);
>> +    struct ptp_ocp *bp = dev_get_drvdata(dev);
>> +
>> +    return sysfs_emit(buf, "ttyS%d", bp->port[(uintptr_t)ea->var].line);
> 
> Out of sheer ignorance on my side, why a trailing '\n' is not needed 
> here? do we need to copy the format string from the old link verbatim?
> 

Hi Paolo!

Yes, I would like to preserve the format used with old symlink option.

Thanks,
Vadim

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ