-----BEGIN PGP SIGNED MESSAGE-----
On 22/11/10 06:12, Brice Goglin wrote:
> You might want to add some printf in hwloc_opendir like I did with
> hwloc_access in my debug patch.
In look_powerpc_device_tree() I did similar and found that it
never proceeds past this loop:
if (('.' == dirent->d_name) || (0 == (dirent->d_type & DT_DIR)))
Adding some debugging to print the name and type and whether
they were used or skipped I see that when it fails the
dirent->d_type is always '0', but when it works it's '4'.
The manual page for readdir(3) says:
# Currently, only some file systems (among them: Btrfs,
# ext2, ext3, and ext4) have full support returning the file
# type in d_type. All applications must properly handle
# a return of DT_UNKNOWN.
So I'm guessing that reiserfs and GPFS (both of which are
available on this PPC64 box) are returning DT_UNKNOWN (0).
So the above loop will need to catch that and, if it is
DT_UNKNOWN, do a stat or lstat on the entry to find out
what it is. :-(
Christopher Samuel - Senior Systems Administrator
VLSCI - Victorian Life Sciences Computational Initiative
Email: samuel_at_[hidden] Phone: +61 (0)3 903 55545
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----