Skip to content

Commit 7552750

Browse files
osctobesnitm
authored andcommitted
dm table: log table creation error code
Help debugging table creation errors by adding the error name in the log. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
1 parent c7c879e commit 7552750

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/md/dm-table.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ int dm_table_add_target(struct dm_table *t, const char *type,
706706

707707
r = dm_split_args(&argc, &argv, params);
708708
if (r) {
709-
tgt->error = "couldn't split parameters (insufficient memory)";
709+
tgt->error = "couldn't split parameters";
710710
goto bad;
711711
}
712712

@@ -724,7 +724,7 @@ int dm_table_add_target(struct dm_table *t, const char *type,
724724
return 0;
725725

726726
bad:
727-
DMERR("%s: %s: %s", dm_device_name(t->md), type, tgt->error);
727+
DMERR("%s: %s: %s (%pe)", dm_device_name(t->md), type, tgt->error, ERR_PTR(r));
728728
dm_put_target_type(tgt->type);
729729
return r;
730730
}

0 commit comments

Comments
 (0)