From 72d9486169a2a8353e022813185ba2f32d7dde69 Mon Sep 17 00:00:00 2001 From: Alasdair G Kergon Date: Mon, 26 Jun 2006 00:27:35 -0700 Subject: [PATCH] dm: improve error message consistency Tidy device-mapper error messages to include context information automatically. Signed-off-by: Alasdair G Kergon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/md/dm.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/md/dm.c') diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 6982f86db6d..3ed2e53b9eb 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -21,6 +21,8 @@ #include #include +#define DM_MSG_PREFIX "core" + static const char *_name = DM_NAME; static unsigned int major = 0; @@ -1108,6 +1110,12 @@ void dm_get(struct mapped_device *md) atomic_inc(&md->holders); } +const char *dm_device_name(struct mapped_device *md) +{ + return md->name; +} +EXPORT_SYMBOL_GPL(dm_device_name); + void dm_put(struct mapped_device *md) { struct dm_table *map; -- cgit v1.2.3