On 02/17/2012 03:35 AM, Jim Meyering wrote: > Instead, I've realized that I can eliminate the need for the wc post- > processing by using the fact that our contrived output file is seekable: > rather than simply writing to fd, first seek to position 0 each time, > and write the count:
> > # Finally, to test it, do this: > eval "LD_PRELOAD=$PWD/k.so ls --color=always -l . $fd>x" || exit 1 > > Hmm... that means the case of no getxattr calls would still > require a little special handling to map "empty file" to "0". No. Just add 'echo 0 >x' prior to the actual test, so that x is never empty. -- Eric Blake [email protected] +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
