diff options
author | Alasdair G Kergon <agk@redhat.com> | 2006-06-26 03:27:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 12:58:36 -0400 |
commit | 72d9486169a2a8353e022813185ba2f32d7dde69 (patch) | |
tree | 2fe6c382feb3f21d829abf543c54be486007557c /drivers/md/dm-linear.c | |
parent | 5c6bd75d06db512515a3781aa97e42df2faf0815 (diff) |
[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-linear.c')
-rw-r--r-- | drivers/md/dm-linear.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c index daf586c0898d..47b3c62bbdb8 100644 --- a/drivers/md/dm-linear.c +++ b/drivers/md/dm-linear.c | |||
@@ -12,6 +12,8 @@ | |||
12 | #include <linux/bio.h> | 12 | #include <linux/bio.h> |
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | 14 | ||
15 | #define DM_MSG_PREFIX "linear" | ||
16 | |||
15 | /* | 17 | /* |
16 | * Linear: maps a linear range of a device. | 18 | * Linear: maps a linear range of a device. |
17 | */ | 19 | */ |
@@ -29,7 +31,7 @@ static int linear_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
29 | unsigned long long tmp; | 31 | unsigned long long tmp; |
30 | 32 | ||
31 | if (argc != 2) { | 33 | if (argc != 2) { |
32 | ti->error = "dm-linear: Invalid argument count"; | 34 | ti->error = "Invalid argument count"; |
33 | return -EINVAL; | 35 | return -EINVAL; |
34 | } | 36 | } |
35 | 37 | ||
@@ -111,7 +113,7 @@ int __init dm_linear_init(void) | |||
111 | int r = dm_register_target(&linear_target); | 113 | int r = dm_register_target(&linear_target); |
112 | 114 | ||
113 | if (r < 0) | 115 | if (r < 0) |
114 | DMERR("linear: register failed %d", r); | 116 | DMERR("register failed %d", r); |
115 | 117 | ||
116 | return r; | 118 | return r; |
117 | } | 119 | } |
@@ -121,5 +123,5 @@ void dm_linear_exit(void) | |||
121 | int r = dm_unregister_target(&linear_target); | 123 | int r = dm_unregister_target(&linear_target); |
122 | 124 | ||
123 | if (r < 0) | 125 | if (r < 0) |
124 | DMERR("linear: unregister failed %d", r); | 126 | DMERR("unregister failed %d", r); |
125 | } | 127 | } |