summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
941eb7e)
The use of %m was buggy due to the implementation
of 'vverbose': it always returned ENOTTY
Inappropriate ioctl for device
Change-Id: I0b7dd4c2f4ce5a45611042a8b9ba3e6db0e60803
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
void vverbose(int level, const char *file, int line, const char *fmt, va_list args)
{
void vverbose(int level, const char *file, int line, 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);