int dm_deptree_node_num_children(struct deptree_node *node, uint32_t inverted);
/*
- * Deactivate a device with its dependencies if the uuid prefix matches
+ * Deactivate a device plus all dependencies.
+ * Ignores devices that don't have a uuid starting with uuid_prefix.
*/
int dm_deptree_deactivate_children(struct deptree_node *dnode,
const char *uuid_prefix,
}
/*
- * Deactivate a device with its dependencies if the uuid prefix matches
+ * Deactivate a device with its dependencies if the uuid prefix matches.
*/
static int _info_by_dev(uint32_t major, uint32_t minor, struct dm_info *info)
{
return r;
}
-int dm_deptree_deactivate_children(struct deptree_node *dnode, const char *uuid_prefix, size_t uuid_prefix_len)
+int dm_deptree_deactivate_children(struct deptree_node *dnode,
+ const char *uuid_prefix,
+ size_t uuid_prefix_len)
{
void *handle = NULL;
struct deptree_node *child = dnode;
}
/* Ignore if it doesn't belong to this VG */
- if (strncmp(uuid, uuid_prefix, uuid_prefix_len))
+ if (uuid_prefix && strncmp(uuid, uuid_prefix, uuid_prefix_len))
continue;
/* Refresh open_count */