summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-zero.c
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2006-06-26 00:27:35 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 09:58:36 -0700
commit72d9486169a2a8353e022813185ba2f32d7dde69 (patch)
tree2fe6c382feb3f21d829abf543c54be486007557c /drivers/md/dm-zero.c
parent5c6bd75d06db512515a3781aa97e42df2faf0815 (diff)
downloadlinux-72d9486169a2a8353e022813185ba2f32d7dde69.tar.gz
linux-72d9486169a2a8353e022813185ba2f32d7dde69.tar.bz2
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-zero.c')
-rw-r--r--drivers/md/dm-zero.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/md/dm-zero.c b/drivers/md/dm-zero.c
index 51c0639b2487..ea569f7348d2 100644
--- a/drivers/md/dm-zero.c
+++ b/drivers/md/dm-zero.c
@@ -10,13 +10,15 @@
#include <linux/init.h>
#include <linux/bio.h>
+#define DM_MSG_PREFIX "zero"
+
/*
* Construct a dummy mapping that only returns zeros
*/
static int zero_ctr(struct dm_target *ti, unsigned int argc, char **argv)
{
if (argc != 0) {
- ti->error = "dm-zero: No arguments required";
+ ti->error = "No arguments required";
return -EINVAL;
}
@@ -60,7 +62,7 @@ static int __init dm_zero_init(void)
int r = dm_register_target(&zero_target);
if (r < 0)
- DMERR("zero: register failed %d", r);
+ DMERR("register failed %d", r);
return r;
}
@@ -70,7 +72,7 @@ static void __exit dm_zero_exit(void)
int r = dm_unregister_target(&zero_target);
if (r < 0)
- DMERR("zero: unregister failed %d", r);
+ DMERR("unregister failed %d", r);
}
module_init(dm_zero_init)