diff options
author | NeilBrown <neilb@suse.de> | 2012-07-09 09:14:16 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-07-09 09:14:16 +0200 |
commit | e7b84f9d5029338980d99d04b479ce814d4c4fcb (patch) | |
tree | bdaf73fa67253446dc0c5faef9256971d35e4955 /Examine.c | |
parent | Help: use an array to choose which help matches which mode. (diff) | |
download | mdadm-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 'Examine.c')
-rw-r--r-- | Examine.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -69,8 +69,8 @@ int Examine(struct mddev_dev *devlist, int brief, int export, int scan, fd = dev_open(devlist->devname, O_RDONLY); if (fd < 0) { if (!scan) { - fprintf(stderr,Name ": cannot open %s: %s\n", - devlist->devname, strerror(errno)); + pr_err("cannot open %s: %s\n", + devlist->devname, strerror(errno)); rv = 1; } err = 1; @@ -102,7 +102,7 @@ int Examine(struct mddev_dev *devlist, int brief, int export, int scan, st->ignore_hw_compat = 0; } else { if (!brief) { - fprintf(stderr, Name ": No md superblock detected on %s.\n", devlist->devname); + pr_err("No md superblock detected on %s.\n", devlist->devname); rv = 1; } err = 1; @@ -119,7 +119,7 @@ int Examine(struct mddev_dev *devlist, int brief, int export, int scan, if (brief && st->ss->brief_examine_super == NULL) { if (!scan) - fprintf(stderr, Name ": No brief listing for %s on %s\n", + pr_err("No brief listing for %s on %s\n", st->ss->name, devlist->devname); } else if (brief) { struct array *ap; |