* Max lengths of device names?
@ 2020-04-16 23:52 Getz, Robin
2020-04-17 6:03 ` Lars-Peter Clausen
0 siblings, 1 reply; 2+ messages in thread
From: Getz, Robin @ 2020-04-16 23:52 UTC (permalink / raw)
To: linux-iio
I was looking at trying to make some userspace code a little more robust, and needed to understand the potential size of things behind sysfs.
For example, I would think that would be a "max length of the string that represents the device name".
But I couldn't find anything...
I understand that some of the names are encoded in the sysfs file name, and therefor are NAME_MAX worse case, but things like device name have no such limit. It's not practical/useful that they are PAGE_SIZE (does anyone need a 4k name?) but right now - I think that might be the limit (unless I'm missing something).
Any pointers?
Thanks
Robin
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Max lengths of device names?
2020-04-16 23:52 Max lengths of device names? Getz, Robin
@ 2020-04-17 6:03 ` Lars-Peter Clausen
0 siblings, 0 replies; 2+ messages in thread
From: Lars-Peter Clausen @ 2020-04-17 6:03 UTC (permalink / raw)
To: Getz, Robin, linux-iio
On 4/17/20 1:52 AM, Getz, Robin wrote:
> I was looking at trying to make some userspace code a little more robust, and needed to understand the potential size of things behind sysfs.
>
> For example, I would think that would be a "max length of the string that represents the device name".
>
> But I couldn't find anything...
>
> I understand that some of the names are encoded in the sysfs file name, and therefor are NAME_MAX worse case, but things like device name have no such limit. It's not practical/useful that they are PAGE_SIZE (does anyone need a 4k name?) but right now - I think that might be the limit (unless I'm missing something).
Yes, PAGE_SIZE. Although that is an implementation detail on the kernel
side, best is to assume any size is possible.
- Lars
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-17 6:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-16 23:52 Max lengths of device names? Getz, Robin
2020-04-17 6:03 ` Lars-Peter Clausen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).