mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-15 01:55:41 +08:00
kvprintf: Add support for %m
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include <syslog.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -138,6 +139,11 @@ test_main(void)
|
||||
printf("out: %4D", "AAAA", ":");
|
||||
check(ctx, "out: 41:41:41:41");
|
||||
|
||||
errno = ENOMSG;
|
||||
reset(ctx, LOG_PRINTF);
|
||||
printf("%m");
|
||||
check(ctx, "No message of desired type");
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user