Changeset 904b1bc in mainline for uspace/lib/drv/generic/logbuf.c
- Timestamp:
- 2018-05-22T10:36:58Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a4eb3ba2
- Parents:
- 4f8772d4
- git-author:
- Jiri Svoboda <jiri@…> (2018-05-21 17:36:30)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-05-22 10:36:58)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/logbuf.c
r4f8772d4 r904b1bc 40 40 #define REMAINDER_STR_FMT " (%zu)..." 41 41 /** Expected max size of the remainder string. 42 * String + terminator + number width (enough for 4GB).*/ 42 * String + terminator + number width (enough for 4GB). 43 */ 43 44 #define REMAINDER_STR_LEN (5 + 1 + 10) 44 45 … … 50 51 /** Space between two groups. */ 51 52 #define SPACE_GROUP " " 53 54 /** Formats the dump with space before, takes care of type casting (ugly). */ 55 #define _FORMAT(digits, bits) \ 56 snprintf(dump, dump_size, "%s%0" #digits PRIx##bits, \ 57 space_before, ((uint##bits##_t *)buf)[0]); 52 58 53 59 /** Dump one item into given buffer. … … 77 83 buf += index * item_size; 78 84 79 /* Formats the dump with space before, takes care of type casting (ugly). */80 #define _FORMAT(digits, bits) \81 snprintf(dump, dump_size, "%s%0" #digits PRIx##bits, \82 space_before, ((uint##bits##_t *)buf)[0]);83 84 85 switch (item_size) { 85 86 case 4: … … 90 91 return _FORMAT(2, 8); 91 92 } 92 #undef _FORMAT93 93 } 94 94
Note:
See TracChangeset
for help on using the changeset viewer.