Bug#230857: Preinst should rename old devpts.sh to mountkernfs
On Mon, 2004-03-15 at 22:43, Thomas Hood wrote:
> The readlink program doesn't use the C Library realpath().
> Check it out -- it uses its own xreadlink() and readlink()
> functions.
On checking the code myself I see that it actually uses
canonicalize_file_name(). This function is defined in
coreutils-5.0.91/lib/canonicalize.c but /bin/readlink as
built in Debian actually uses the libc function of the same
name. So you were right.
> realpath() is also described as tolerating a missing final component.
> We should test it to see if it works.
I just tested it and it doesn't work. Specifically,
realpath("/tmp/foo",NULL) returns NULL if /tmp/foo is a symlink
to /tmp/bar. So there is indeed a bug either in the implementation
or the documenation of realpath().
--
Thomas Hood <jdthood@yahoo.co.uk>
Reply to: