rtld: add rtld_fdprintfx()

It is same as rtld_fdprintf() without enforcement of the format string
to be a literal.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2021-11-13 03:49:22 +02:00
parent c5658876b4
commit 77c088ab21
2 changed files with 13 additions and 0 deletions

View File

@ -489,6 +489,18 @@ rtld_fdprintf(int fd, const char *fmt, ...)
return (retval);
}
int
rtld_fdprintfx(int fd, const char *fmt, ...)
{
va_list ap;
int retval;
va_start(ap, fmt);
retval = rtld_vfdprintf(fd, fmt, ap);
va_end(ap);
return (retval);
}
void
rtld_fdputstr(int fd, const char *str)
{

View File

@ -39,6 +39,7 @@ int rtld_snprintf(char *buf, size_t bufsize, const char *fmt, ...)
int rtld_vsnprintf(char *buf, size_t bufsize, const char *fmt, va_list ap);
int rtld_vfdprintf(int fd, const char *fmt, va_list ap);
int rtld_fdprintf(int fd, const char *fmt, ...) __printflike(2, 3);
int rtld_fdprintfx(int fd, const char *fmt, ...);
void rtld_fdputstr(int fd, const char *str);
void rtld_fdputchar(int fd, int c);