Merge branch 'linux-topology' into refs/top-bases/linux-zfs-branch

This commit is contained in:
Brian Behlendorf 2010-06-16 09:57:10 -07:00
commit 2cda60c980
3 changed files with 22 additions and 0 deletions

View File

@ -37,7 +37,9 @@
#include <libzfs.h> #include <libzfs.h>
#include <libshare.h> #include <libshare.h>
#if defined(HAVE_LIBTOPO)
#include <fm/libtopo.h> #include <fm/libtopo.h>
#endif /* HAVE_LIBTOPO */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -74,9 +76,11 @@ struct libzfs_handle {
boolean_t libzfs_mnttab_enable; boolean_t libzfs_mnttab_enable;
avl_tree_t libzfs_mnttab_cache; avl_tree_t libzfs_mnttab_cache;
int libzfs_pool_iter; int libzfs_pool_iter;
#if defined(HAVE_LIBTOPO)
topo_hdl_t *libzfs_topo_hdl; topo_hdl_t *libzfs_topo_hdl;
libzfs_fru_t **libzfs_fru_hash; libzfs_fru_t **libzfs_fru_hash;
libzfs_fru_t *libzfs_fru_list; libzfs_fru_t *libzfs_fru_list;
#endif /* HAVE_LIBTOPO */
char libzfs_chassis_id[256]; char libzfs_chassis_id[256];
}; };

View File

@ -26,6 +26,7 @@
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
#include <label.h>
#include <libintl.h> #include <libintl.h>
#include <math.h> #include <math.h>
#include <stdio.h> #include <stdio.h>

View File

@ -34,6 +34,8 @@
#include <libzfs.h> #include <libzfs.h>
#if defined(HAVE_LIBTOPO)
#include <fm/libtopo.h> #include <fm/libtopo.h>
#include <sys/fm/protocol.h> #include <sys/fm/protocol.h>
#include <sys/systeminfo.h> #include <sys/systeminfo.h>
@ -450,3 +452,18 @@ libzfs_fru_clear(libzfs_handle_t *hdl, boolean_t final)
ZFS_FRU_HASH_SIZE * sizeof (void *)); ZFS_FRU_HASH_SIZE * sizeof (void *));
} }
} }
#else /* HAVE_LIBTOPO */
/*
* Clear memory associated with the FRU hash.
*/
void
libzfs_fru_clear(libzfs_handle_t *hdl, boolean_t final)
{
return;
}
#endif /* HAVE_LIBTOPO */