On Wednesday 19 June 2013 12:52:51 Thomas De Schampheleire wrote: > lsof: correct check for symbolic link > > Busybox lsof used the d_type field of a 'struct dirent' to verify whether > the entry is a symbolic link. This field, however, is not portable. On at > least one board [1] I have seen, that field is 0, and the check fails even > though the entry is a link.
most likely your C library needs updating > This patch replaces the check on d_type with a call to lstat and a > subsequent check S_ISLNK. This should work in all cases, at the cost of > the extra lstat call. NAK: at the very least, check to see if it's DT_UNKNOWN before falling back to using lstat(). no need to penalize people with up-to-date systems. not sure if trying to define a build-time knob to control it would work out well since a number of factors come into play here ... -mike
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
