4 ms·
Linus is right because these are actually well known and easy to parse. However, if instead of S_IRUSR|S_IWUSR (which I'd have to lookup up to parse correctly)
by cm3 10y ago
Linus is right because these are actually well known and easy to parse.
However, if instead of S_IRUSR|S_IWUSR (which I'd have to lookup up to parse correctly), it were possible to write "a-rwx"|"u+rw", it would be even easier to parse, without the need to memorize common octal numbers. In C, this could be achieved with the preprocessor, I believe, if you create a sufficiently smart CPP macro, especially since Linux is no stranger to heavy preprocessor use.