diff options
author | Brian Behlendorf <[email protected]> | 2010-08-26 11:55:19 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2010-08-31 13:42:00 -0700 |
commit | 6b003d7cda153c58bb5faab62c5e5a7aab780715 (patch) | |
tree | 23632b6c3694aa9c0b6862f9c6a05a622b3e3c1e /lib/libzfs | |
parent | 054bc00b4c0c257f6baf6d7145b270c7283fe51e (diff) |
Add linux topology support
Solaris recently introduced the idea of drive topology because
where a drive is located does matter. I have already handled
this with udev/blkid integration under Linux so I'm hopeful
this case can simply be removed but for now I've just stubbed
out what is needed in libspl and commented out the rest here.
Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'lib/libzfs')
-rw-r--r-- | lib/libzfs/include/libzfs_impl.h | 4 | ||||
-rw-r--r-- | lib/libzfs/libzfs_fru.c | 17 |
2 files changed, 21 insertions, 0 deletions
diff --git a/lib/libzfs/include/libzfs_impl.h b/lib/libzfs/include/libzfs_impl.h index c9b09a205..3d001df07 100644 --- a/lib/libzfs/include/libzfs_impl.h +++ b/lib/libzfs/include/libzfs_impl.h @@ -36,7 +36,9 @@ #include <libzfs.h> #include <libshare.h> +#if defined(HAVE_LIBTOPO) #include <fm/libtopo.h> +#endif /* HAVE_LIBTOPO */ #ifdef __cplusplus extern "C" { @@ -74,9 +76,11 @@ struct libzfs_handle { boolean_t libzfs_mnttab_enable; avl_tree_t libzfs_mnttab_cache; int libzfs_pool_iter; +#if defined(HAVE_LIBTOPO) topo_hdl_t *libzfs_topo_hdl; libzfs_fru_t **libzfs_fru_hash; libzfs_fru_t *libzfs_fru_list; +#endif /* HAVE_LIBTOPO */ char libzfs_chassis_id[256]; }; diff --git a/lib/libzfs/libzfs_fru.c b/lib/libzfs/libzfs_fru.c index 788fa2cfb..78f2f9c37 100644 --- a/lib/libzfs/libzfs_fru.c +++ b/lib/libzfs/libzfs_fru.c @@ -34,6 +34,8 @@ #include <libzfs.h> +#if defined(HAVE_LIBTOPO) + #include <fm/libtopo.h> #include <sys/fm/protocol.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 *)); } } + +#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 */ + + |