exterror: add support for the format specifiers in the extended error msg
Note that we trust kernel code to only request the printout of integer types, and use the 'j' modifier always. Reviewed by: emaste, mckusick Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D54380
This commit is contained in:
@@ -29,7 +29,8 @@ __uexterr_format(const struct uexterror *ue, char *buf, size_t bufsz)
|
||||
ue->error, ue->cat, ue->src_line,
|
||||
(uintmax_t)ue->p1, (uintmax_t)ue->p2);
|
||||
} else {
|
||||
strlcpy(buf, ue->msg, bufsz);
|
||||
snprintf(buf, bufsz, ue->msg, (uintmax_t)ue->p1,
|
||||
(uintmax_t)ue->p2);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user