Skip to content
Snippets Groups Projects

Add executable that identifies the ABI of libraries

Merged Ludovico de Nittis requested to merge wip/denittis/t28814 into master
Files
2
+ 23
1
@@ -216,9 +216,31 @@ run (int argc,
}
else if (opt_directory != NULL)
{
g_autofree gchar *real_directory = NULL;
nftw_libraries = g_ptr_array_new_full (512, g_free);
if (nftw (opt_directory, list_libraries_helper, 10, FTW_DEPTH|FTW_MOUNT|FTW_PHYS) < 0)
if (g_file_test (opt_directory, G_FILE_TEST_IS_SYMLINK))
{
g_autofree gchar *dir_link = NULL;
dir_link = g_file_read_link (opt_directory, error);
if (dir_link == NULL)
return FALSE;
if (dir_link[0] != '/')
{
g_autofree gchar *dirname = g_path_get_dirname (opt_directory);
real_directory = g_build_filename (dirname, dir_link, NULL);
}
else
{
real_directory = g_steal_pointer (&dir_link);
}
}
else
{
real_directory = g_strdup (opt_directory);
}
if (nftw (real_directory, list_libraries_helper, 10, FTW_DEPTH|FTW_MOUNT|FTW_PHYS) < 0)
{
g_ptr_array_free (nftw_libraries, TRUE);
return glnx_throw_errno_prefix (error, "Unable to iterate through \"%s\"", opt_directory);
Loading