summaryrefslogtreecommitdiff
path: root/lib/error
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2006-10-03 17:55:20 +0000
committerAlasdair Kergon <agk@redhat.com>2006-10-03 17:55:20 +0000
commit6c81ed26f0621c8ea8da4d0712a7a7883023fcb2 (patch)
tree51245d30bc544abf73996ad825dc1b75cd5a4b4b /lib/error
parent1baed0e1aef0e62af6437fe2ba040ff28a836988 (diff)
downloadlvm2-6c81ed26f0621c8ea8da4d0712a7a7883023fcb2.tar.gz
Add LV column to reports listing kernel modules needed for activation.
Diffstat (limited to 'lib/error')
-rw-r--r--lib/error/errseg.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/error/errseg.c b/lib/error/errseg.c
index cef9d7f79..00e938947 100644
--- a/lib/error/errseg.c
+++ b/lib/error/errseg.c
@@ -23,6 +23,7 @@
#include "targets.h"
#include "lvm-string.h"
#include "activate.h"
+#include "str_list.h"
static const char *_errseg_name(const struct lv_segment *seg)
{
@@ -64,6 +65,18 @@ static int _errseg_target_present(void)
}
#endif
+static int _errseg_modules_needed(struct dm_pool *mem,
+ const struct lv_segment *seg,
+ struct list *modules)
+{
+ if (!str_list_add(mem, modules, "error")) {
+ log_error("error module string list allocation failed");
+ return 0;
+ }
+
+ return 1;
+}
+
static void _errseg_destroy(const struct segment_type *segtype)
{
dm_free((void *)segtype);
@@ -76,6 +89,7 @@ static struct segtype_handler _error_ops = {
.add_target_line = _errseg_add_target_line,
.target_present = _errseg_target_present,
#endif
+ .modules_needed = _errseg_modules_needed,
.destroy = _errseg_destroy,
};