-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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]) || (0 == (dirent->d_type & DT_DIR)))
continue;
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. :-(
cheers,
Chris
- --
Christopher Samuel - Senior Systems Administrator
VLSCI - Victorian Life Sciences Computational Initiative
Email: [email protected] Phone: +61 (0)3 903 55545
http://www.vlsci.unimelb.edu.au/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkzpdEsACgkQO2KABBYQAh/9hwCcDNWfn7cAjpioLdDeQfCG9Nnr
k/8AmwZ9X4nMLZNimH2djc+P19f7M2Ll
=0C8H
-----END PGP SIGNATURE-----