News for hackers. Stuff that matters.
Re:I couldn't debug the code because of my name by 10000truths on Wednesday October 20, 2021 @07:07PM (#28938033)
One thing I've noticed is that ext, xfs, btrfs and zfs all explicitly store a length field alongside the filename. There's nothing inherent in the disk layout of these filesystems preventing them from supporting filenames with embedded slash and nul characters - those limitations are imposed by the kernel's VFS implementation. It would be nice to have a special version of open, exec etc. where one could specify a filepath as a length-prefixed array of length-prefixed strings.
Re:I couldn't debug the code because of my name by GoblinSlayer on Thursday October 21, 2021 @03:42AM (#28941529)
ODBC (ISO 9075-3) got it right 30 years ago: all strings are accompanied by the length argument, which also accepts the sentinel value NTS, when you mean a null-terminated string.
Re:I couldn't debug the code because of my name by gjvnq on Thursday October 21, 2021 @03:55AM (#28941609)
I once thought about using JSON arrays for filepaths so all possible strings would be valid filenames.