- oi->oi_bi.bi_tool_entry_open = glue_tool_entry_open;
- oi->oi_bi.bi_tool_entry_close = glue_tool_entry_close;
- oi->oi_bi.bi_tool_entry_first = glue_tool_entry_first;
- oi->oi_bi.bi_tool_entry_next = glue_tool_entry_next;
- oi->oi_bi.bi_tool_entry_get = glue_tool_entry_get;
- oi->oi_bi.bi_tool_entry_put = glue_tool_entry_put;
- oi->oi_bi.bi_tool_entry_reindex = glue_tool_entry_reindex;
- oi->oi_bi.bi_tool_sync = glue_tool_sync;
+ /* Only advertise these if the root DB supports them */
+ if ( bi->bi_tool_entry_open )
+ oi->oi_bi.bi_tool_entry_open = glue_tool_entry_open;
+ if ( bi->bi_tool_entry_close )
+ oi->oi_bi.bi_tool_entry_close = glue_tool_entry_close;
+ if ( bi->bi_tool_entry_first )
+ oi->oi_bi.bi_tool_entry_first = glue_tool_entry_first;
+ if ( bi->bi_tool_entry_next )
+ oi->oi_bi.bi_tool_entry_next = glue_tool_entry_next;
+ if ( bi->bi_tool_entry_get )
+ oi->oi_bi.bi_tool_entry_get = glue_tool_entry_get;
+ if ( bi->bi_tool_entry_put )
+ oi->oi_bi.bi_tool_entry_put = glue_tool_entry_put;
+ if ( bi->bi_tool_entry_reindex )
+ oi->oi_bi.bi_tool_entry_reindex = glue_tool_entry_reindex;
+ if ( bi->bi_tool_sync )
+ oi->oi_bi.bi_tool_sync = glue_tool_sync;