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 /super-gpt.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 'super-gpt.c')
-rw-r--r-- | super-gpt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/super-gpt.c b/super-gpt.c index 75269bf1..9360aead 100644 --- a/super-gpt.c +++ b/super-gpt.c @@ -77,7 +77,7 @@ static int load_gpt(struct supertype *st, int fd, char *devname) free_gpt(st); if (posix_memalign((void**)&super, 4096, 32*512) != 0) { - fprintf(stderr, Name ": %s could not allocate superblock\n", + pr_err("%s could not allocate superblock\n", __func__); return 1; } @@ -88,7 +88,7 @@ static int load_gpt(struct supertype *st, int fd, char *devname) if (read(fd, super, sizeof(*super)) != sizeof(*super)) { no_read: if (devname) - fprintf(stderr, Name ": Cannot read partition table on %s\n", + pr_err("Cannot read partition table on %s\n", devname); free(super); return 1; @@ -98,7 +98,7 @@ static int load_gpt(struct supertype *st, int fd, char *devname) super->parts[0].part_type != MBR_GPT_PARTITION_TYPE) { not_found: if (devname) - fprintf(stderr, Name ": No partition table found on %s\n", + pr_err("No partition table found on %s\n", devname); free(super); return 1; @@ -199,7 +199,7 @@ static int validate_geometry(struct supertype *st, int level, char *subdev, unsigned long long *freesize, int verbose) { - fprintf(stderr, Name ": gpt metadata cannot be used this way\n"); + pr_err("gpt metadata cannot be used this way\n"); return 0; } #endif |