summaryrefslogtreecommitdiffstats
path: root/sysfs.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-07-09 09:14:16 +0200
committerNeilBrown <neilb@suse.de>2012-07-09 09:14:16 +0200
commite7b84f9d5029338980d99d04b479ce814d4c4fcb (patch)
treebdaf73fa67253446dc0c5faef9256971d35e4955 /sysfs.c
parentHelp: use an array to choose which help matches which mode. (diff)
downloadmdadm-e7b84f9d5029338980d99d04b479ce814d4c4fcb.tar.xz
mdadm-e7b84f9d5029338980d99d04b479ce814d4c4fcb.zip
Introduce pr_err for printing error messages.
'pr_err("' is a lot shorter than 'fprintf(stderr, Name ": ' cont_err() is also available. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'sysfs.c')
-rw-r--r--sysfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysfs.c b/sysfs.c
index 8e9d0c5a..036a4ffc 100644
--- a/sysfs.c
+++ b/sysfs.c
@@ -580,7 +580,7 @@ int sysfs_set_array(struct mdinfo *info, int vers)
if ((vers % 100) < 2 ||
sysfs_set_str(info, NULL, "metadata_version",
ver) < 0) {
- fprintf(stderr, Name ": This kernel does not "
+ pr_err("This kernel does not "
"support external metadata.\n");
return 1;
}
@@ -601,7 +601,7 @@ int sysfs_set_array(struct mdinfo *info, int vers)
rc = sysfs_set_num(info, NULL, "array_size",
info->custom_array_size/2);
if (rc && errno == ENOENT) {
- fprintf(stderr, Name ": This kernel does not "
+ pr_err("This kernel does not "
"have the md/array_size attribute, "
"the array may be larger than expected\n");
rc = 0;