diff options
author | Stefan Haberland <stefan.haberland@de.ibm.com> | 2009-03-26 10:23:49 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-03-26 10:24:05 -0400 |
commit | fc19f381b3828aa4f8a3417dbefc3418ec6bbe10 (patch) | |
tree | 521d7537e5929de141ba4b616ccc2ab191d4b9fe /drivers/s390/block/dasd_proc.c | |
parent | f3eb5384cf0325c02e306b1d81e70f81a03d7432 (diff) |
[S390] dasd: message cleanup
Moved some Messages into s390 debug feature and changed remaining
messages to use the dev_xxx and pr_xxx macros.
Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block/dasd_proc.c')
-rw-r--r-- | drivers/s390/block/dasd_proc.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/s390/block/dasd_proc.c b/drivers/s390/block/dasd_proc.c index 0aa569419d57..2080ba6a69b0 100644 --- a/drivers/s390/block/dasd_proc.c +++ b/drivers/s390/block/dasd_proc.c | |||
@@ -11,6 +11,8 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #define KMSG_COMPONENT "dasd" | ||
15 | |||
14 | #include <linux/ctype.h> | 16 | #include <linux/ctype.h> |
15 | #include <linux/seq_file.h> | 17 | #include <linux/seq_file.h> |
16 | #include <linux/vmalloc.h> | 18 | #include <linux/vmalloc.h> |
@@ -267,7 +269,7 @@ dasd_statistics_write(struct file *file, const char __user *user_buf, | |||
267 | buffer = dasd_get_user_string(user_buf, user_len); | 269 | buffer = dasd_get_user_string(user_buf, user_len); |
268 | if (IS_ERR(buffer)) | 270 | if (IS_ERR(buffer)) |
269 | return PTR_ERR(buffer); | 271 | return PTR_ERR(buffer); |
270 | MESSAGE_LOG(KERN_INFO, "/proc/dasd/statictics: '%s'", buffer); | 272 | DBF_EVENT(DBF_DEBUG, "/proc/dasd/statictics: '%s'\n", buffer); |
271 | 273 | ||
272 | /* check for valid verbs */ | 274 | /* check for valid verbs */ |
273 | for (str = buffer; isspace(*str); str++); | 275 | for (str = buffer; isspace(*str); str++); |
@@ -277,33 +279,33 @@ dasd_statistics_write(struct file *file, const char __user *user_buf, | |||
277 | if (strcmp(str, "on") == 0) { | 279 | if (strcmp(str, "on") == 0) { |
278 | /* switch on statistics profiling */ | 280 | /* switch on statistics profiling */ |
279 | dasd_profile_level = DASD_PROFILE_ON; | 281 | dasd_profile_level = DASD_PROFILE_ON; |
280 | MESSAGE(KERN_INFO, "%s", "Statistics switched on"); | 282 | pr_info("The statistics feature has been switched " |
283 | "on\n"); | ||
281 | } else if (strcmp(str, "off") == 0) { | 284 | } else if (strcmp(str, "off") == 0) { |
282 | /* switch off and reset statistics profiling */ | 285 | /* switch off and reset statistics profiling */ |
283 | memset(&dasd_global_profile, | 286 | memset(&dasd_global_profile, |
284 | 0, sizeof (struct dasd_profile_info_t)); | 287 | 0, sizeof (struct dasd_profile_info_t)); |
285 | dasd_profile_level = DASD_PROFILE_OFF; | 288 | dasd_profile_level = DASD_PROFILE_OFF; |
286 | MESSAGE(KERN_INFO, "%s", "Statistics switched off"); | 289 | pr_info("The statistics feature has been switched " |
290 | "off\n"); | ||
287 | } else | 291 | } else |
288 | goto out_error; | 292 | goto out_error; |
289 | } else if (strncmp(str, "reset", 5) == 0) { | 293 | } else if (strncmp(str, "reset", 5) == 0) { |
290 | /* reset the statistics */ | 294 | /* reset the statistics */ |
291 | memset(&dasd_global_profile, 0, | 295 | memset(&dasd_global_profile, 0, |
292 | sizeof (struct dasd_profile_info_t)); | 296 | sizeof (struct dasd_profile_info_t)); |
293 | MESSAGE(KERN_INFO, "%s", "Statistics reset"); | 297 | pr_info("The statistics have been reset\n"); |
294 | } else | 298 | } else |
295 | goto out_error; | 299 | goto out_error; |
296 | kfree(buffer); | 300 | kfree(buffer); |
297 | return user_len; | 301 | return user_len; |
298 | out_error: | 302 | out_error: |
299 | MESSAGE(KERN_WARNING, "%s", | 303 | pr_warning("%s is not a supported value for /proc/dasd/statistics\n", |
300 | "/proc/dasd/statistics: only 'set on', 'set off' " | 304 | str); |
301 | "and 'reset' are supported verbs"); | ||
302 | kfree(buffer); | 305 | kfree(buffer); |
303 | return -EINVAL; | 306 | return -EINVAL; |
304 | #else | 307 | #else |
305 | MESSAGE(KERN_WARNING, "%s", | 308 | pr_warning("/proc/dasd/statistics: is not activated in this kernel\n"); |
306 | "/proc/dasd/statistics: is not activated in this kernel"); | ||
307 | return user_len; | 309 | return user_len; |
308 | #endif /* CONFIG_DASD_PROFILE */ | 310 | #endif /* CONFIG_DASD_PROFILE */ |
309 | } | 311 | } |