-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Liyang HU on 1/13/2007 4:48 PM: > On Fri, Jan 12, 2007 at 08:30:24AM -0700, Eric Blake wrote: >> why should you expect sane behavior from tools that assume POSIX? > > If xreadlink() assumed POSIX, it would allocate a fixed buffer of 256 bytes.
Wrong. POSIX guarantees that you will have AT LEAST 256, but allows you to allocate much more (and some systems, such as GNU Hurd, have the goal of allowing as much as you would like). > I'm not even sure my toy FS violates POSIX. st_size contains the /on-disk/ > size of the symlink, not the length of the symlink in bytes. http://www.opengroup.org/onlinepubs/009695399/functions/lstat.html "For symbolic links, ... the st_size member shall contain the length of the pathname contained in the symbolic link." Your FS flat out violates this rule. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFqX/z84KuGfSFAYARAtuSAKCdmK3VgWQC4oC7ijix9wFOk9YRLwCgttgu GDH5TWuNkoYeF8jXw9gER38= =Znhy -----END PGP SIGNATURE-----