Re: [PATCH v2] man/man7/path-format.7: Add file documenting format of pathnames
From: Alejandro Colomar <alx@kernel.org>
Date: 2025-01-15 16:47:49
Hi Jason, On Wed, Jan 15, 2025 at 11:21:02AM -0500, Jason Yundt wrote:
quoted
Makes sense. How about a null-terminated string?The term null-terminated string still has some of the problems that I mentioned earlier. Specifically, people think of null-terminated strings as sequences of characters. It’s easier to understand how the kernel handles paths if you think of paths as sequences of bytes, not as sequences of characters.
Hmmm, okay. Maybe I'm too biased as a C programmer, and this being a generic page for users it makes sense to use other terms.
That being said, I think that you misunderstood my two questions. You told me the current state of things. I’m not asking about the current state of things, I’m asking about a hypothetical future where programs started to “assume the Portable Filename Character Set (or at most some subset of ASCII), and fail hard outside of that”. If we start making that recommendation and programs start following that recommendation, then it sounds like I wouldn’t be able to do anything with a large part of my music collection,
You could rename that music into something usable, and then use it. :)
and it sounds like I wouldn’t be able to use the symbolic links that are in my /dev/disks/by-partlabel directory. Am I understanding your recommendation correctly?
I would be happy in a world where all tools are restricted to the portable filename character set. I once toyed with a patch for enforcing such filenames in the kernel, just for fun. On the other hand, I see the usefulness for others in programs trying to work with other stuff. So the manual page makes sense, and I'll swallow my disagreement. :-) Have a lovely day! Alex -- <https://www.alejandro-colomar.es/>
Attachments
- signature.asc [application/pgp-signature] 833 bytes