Print error messages as-is, when they don't conform to

<errno> [<parameter> 'value']
These are error messages from (lib)geom itself.
This commit is contained in:
Marcel Moolenaar 2008-11-30 23:46:31 +00:00
parent e419ba879f
commit 08b6360ca3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=185496

View File

@ -525,12 +525,15 @@ gpart_issue(struct gctl_req *req, unsigned int fl __unused)
}
error = strtol(errstr, &errmsg, 0);
while (errmsg[0] == ' ')
errmsg++;
if (errmsg[0] != '\0')
warnc(error, "%s", errmsg);
else
warnc(error, NULL);
if (errmsg != errstr) {
while (errmsg[0] == ' ')
errmsg++;
if (errmsg[0] != '\0')
warnc(error, "%s", errmsg);
else
warnc(error, NULL);
} else
warnx("%s", errmsg);
status = EXIT_FAILURE;