On 12/28/2012 03:24:17 PM, Felix Janda wrote:
Hi,

the first patch adds the -L and -P options to pwd as specified by POSIX. The test script again uses stat. This time in order to get inode numbers
of directories.

For future reference adding the test in the same commit as the changes being tested is probably ok.

I've applied this patch, but am going to have to take a closer look at it in the morning. (You added a -L option which... is a NOP? Huh, what posix specifies here is kind of insane, there's no way to get the raw getcwd() output. The -L stuff is all about $PWD, and if that doesn't have a valid value it falls back to -P which does a realpath() on the data to strip symlinks...? I need to read this when I'm more awake, this standard is written for a system that stores state different than linux. The current working directory is a process attribute used directly by the vfs, it's not an environment variable...)

I think the fix is to have -L _not_ be the default, and to have pwd return the raw getcwd() output when neither -L nor -P is specified... but that's a technical violation of posix...

Rob
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to