diff options
author | NeilBrown <neilb@suse.de> | 2015-02-12 03:46:53 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2015-02-12 03:46:53 +0100 |
commit | 7a862a020f04b10f17f6dcae23bf60c52cbe190b (patch) | |
tree | 8134a9a06b1aaaa1ee640b20f3b00e95755d4f49 /mdopen.c | |
parent | Consistently print program Name and __func__ in debug messages. (diff) | |
download | mdadm-7a862a020f04b10f17f6dcae23bf60c52cbe190b.tar.xz mdadm-7a862a020f04b10f17f6dcae23bf60c52cbe190b.zip |
Don't break long strings onto multiple lines.
It is best to keep strings all together so that they
are easier to search for in the source code.
If a string is so long that it looks ugly one line,
them maybe it should be broken into multiple lines
for display too.
Only strings which contain a newline can be broken
into multiple lines:
"It is OK to\n"
"break this string\n"
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdopen.c')
-rw-r--r-- | mdopen.c | 15 |
1 files changed, 5 insertions, 10 deletions
@@ -173,8 +173,7 @@ int create_mddev(char *dev, char *name, int autof, int trustworthy, /* name *must* be mdXX or md_dXX in this context */ if (num < 0 || (strcmp(cname, "md") != 0 && strcmp(cname, "md_d") != 0)) { - pr_err("%s is an invalid name " - "for an md device. Try /dev/md/%s\n", + pr_err("%s is an invalid name for an md device. Try /dev/md/%s\n", dev, dev+5); return -1; } @@ -191,13 +190,11 @@ int create_mddev(char *dev, char *name, int autof, int trustworthy, * empty. */ if (strchr(cname, '/') != NULL) { - pr_err("%s is an invalid name " - "for an md device.\n", dev); + pr_err("%s is an invalid name for an md device.\n", dev); return -1; } if (cname[0] == 0) { - pr_err("%s is an invalid name " - "for an md device (empty!).", dev); + pr_err("%s is an invalid name for an md device (empty!).", dev); return -1; } if (num < 0) { @@ -226,8 +223,7 @@ int create_mddev(char *dev, char *name, int autof, int trustworthy, if (name && name[0] == 0) name = NULL; if (name && trustworthy == METADATA && use_mdp == 1) { - pr_err("%s is not allowed for a %s container. " - "Consider /dev/md%d.\n", dev, name, num); + pr_err("%s is not allowed for a %s container. Consider /dev/md%d.\n", dev, name, num); return -1; } if (name && trustworthy == METADATA) @@ -432,8 +428,7 @@ int open_mddev(char *dev, int report_errors) if (md_get_version(mdfd) <= 0) { close(mdfd); if (report_errors) - pr_err("%s does not appear to be " - "an md device\n", dev); + pr_err("%s does not appear to be an md device\n", dev); return -2; } return mdfd; |