Re: Not A System Problem
Posted Mar 29, 2009 10:30 UTC (Sun) by ldo
In reply to: Not A System Problem
Parent article: Wheeler: Fixing Unix/Linux/POSIX Filenames
Um, if you remove the prohibition on nulls, how do you end the filename? This isn't Pascal.
Nothing to do with Pascal. C is perfectly capable of dealing with arbitrary data bytes, otherwise large parts of both kernel and userland code wouldnt work.
And if you remove the prohibition on slashes, how do you distinguish between a file called foo/bar and a file called bar in a subdirectory foo?
Simple. The kernel-level filesystem calls will not take a full pathname. Instead, they will take a parent directory ID and the name of an item within that directory. Other OSes, like VMS and old MacOS, were doing this sort of thing decades ago.
Full pathname parsing becomes a function of the userland runtime. The kernel no longer cares what the pathname separator, or even what the pathname syntax, might be.
to post comments)