Not logged in
Log in now
Create an account
Subscribe to LWN
An "enum" for Python 3
An unexpected perf feature
LWN.net Weekly Edition for May 16, 2013
A look at the PyPy 2.0 release
PostgreSQL 9.3 beta: Federated databases and more
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?
These limitations are there because the semantics of the filesystem itself
depends on them.
Re: Not A System Problem
Posted Mar 29, 2009 10:30 UTC (Sun) by ldo (subscriber, #40946)
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.
Posted Mar 29, 2009 13:54 UTC (Sun) by nix (subscriber, #2304)
I'm sure users would love not being able to type in pathnames anymore,
Good luck getting anyone to do it.
Posted Mar 29, 2009 19:47 UTC (Sun) by ldo (subscriber, #40946)
What you're describing is not POSIX anymore.
Nothing to do with POSIX. POSIX is a userland API, it doesnt dictate how the kernel should work.
Posted Mar 29, 2009 22:32 UTC (Sun) by nix (subscriber, #2304)
So whatever you're describing, userspace cannot any longer use standard
POSIX calls: in fact, it can't any longer use ANSI C calls! I suspect that
such a system would be almost unusable with C, simply because you couldn't
use C string literals for anything.
If you want VMS, you know where to find it.
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds