Changeset 3d31af5 in mainline
- Timestamp:
- 2011-02-04T14:02:42Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a2be824
- Parents:
- 38648f0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/src/debug.c
r38648f0 r3d31af5 206 206 void usb_log_printf(usb_log_level_t level, const char *format, ...) 207 207 { 208 FILE *s tream = NULL;208 FILE *screen_stream = NULL; 209 209 switch (level) { 210 210 case USB_LOG_LEVEL_FATAL: 211 211 case USB_LOG_LEVEL_ERROR: 212 s tream = stderr;212 screen_stream = stderr; 213 213 break; 214 214 default: 215 s tream = stdout;215 screen_stream = stdout; 216 216 break; 217 217 } 218 assert(s tream != NULL);218 assert(screen_stream != NULL); 219 219 220 220 va_list args; … … 233 233 fprintf(log_stream, "[%s]%s: ", log_prefix, level_name); 234 234 vfprintf(log_stream, format, args); 235 fflush(log_stream); 235 236 } 236 237 237 238 if (level <= log_level) { 238 fprintf(stream, "[%s]%s: ", log_prefix, level_name); 239 vfprintf(stream, format, args); 239 fprintf(screen_stream, "[%s]%s: ", log_prefix, level_name); 240 vfprintf(screen_stream, format, args); 241 fflush(screen_stream); 240 242 } 241 243
Note:
See TracChangeset
for help on using the changeset viewer.