diff options
author | Alasdair G Kergon <agk@redhat.com> | 2006-06-26 09:27:35 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 18:58:36 +0200 |
commit | 72d9486169a2a8353e022813185ba2f32d7dde69 (patch) | |
tree | 2fe6c382feb3f21d829abf543c54be486007557c /drivers/md/dm.c | |
parent | [PATCH] dm: prevent removal if open (diff) | |
download | linux-72d9486169a2a8353e022813185ba2f32d7dde69.tar.xz linux-72d9486169a2a8353e022813185ba2f32d7dde69.zip |
[PATCH] dm: improve error message consistency
Tidy device-mapper error messages to include context information
automatically.
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r-- | drivers/md/dm.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 6982f86db6dc..3ed2e53b9eb6 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -21,6 +21,8 @@ #include <linux/hdreg.h> #include <linux/blktrace_api.h> +#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; |