diff options
Diffstat (limited to 'runtime/vsprintf.c')
-rw-r--r-- | runtime/vsprintf.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/vsprintf.c b/runtime/vsprintf.c index 831b7a2b..fbd90a83 100644 --- a/runtime/vsprintf.c +++ b/runtime/vsprintf.c @@ -283,6 +283,7 @@ int _stp_vsnprintf(char *buf, size_t size, const char *fmt, va_list args) continue; case 's': + case 'M': case 'm': s = va_arg(args, char *); if ((unsigned long)s < PAGE_SIZE) @@ -303,8 +304,12 @@ int _stp_vsnprintf(char *buf, size_t size, const char *fmt, va_list args) } } for (i = 0; i < len; ++i) { - if (str <= end) + if (str <= end) { + if (*fmt == 'M') + str = number(str, str + 2, (uint64_t)(unsigned char) *s, 16, 2, 2, STP_SPACE); + else *str = *s; + } ++str; ++s; } while (len < field_width--) { |