mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-05 08:00:30 +00:00
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:
parent
e419ba879f
commit
08b6360ca3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=185496
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue