summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
859e455)
The use of %m was buggy due to the implementation
of 'vverbose': it always returned ENOTTY
Inappropriate ioctl for device
Change-Id: Idedeefa44ec3cf301d75cd542c54c35a208886a1
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
#else
#include <unistd.h>
#else
#include <unistd.h>
static const char *appname;
static const char *appname;
void vverbose(int level, const char *file, int line, const char *function, const char *fmt, va_list args)
{
void vverbose(int level, const char *file, int line, const char *function, const char *fmt, va_list args)
{
int tty = isatty(fileno(stderr));
int tty = isatty(fileno(stderr));
fprintf(stderr, "%s: ", prefixes[LEVEL(level)] + (tty ? 4 : 0));
vfprintf(stderr, fmt, args);
fprintf(stderr, "%s: ", prefixes[LEVEL(level)] + (tty ? 4 : 0));
vfprintf(stderr, fmt, args);