Fixed kernel format checking:

- plain %r and %z were disallowed.  The hard NULs in the warnings were
  hopefully caused by disallowing of plain formats being nonsense.
- new formats for shortening to a byte were allowed, but even the libc
  printf doesn't support them.
- old %hr and %hz formats were allowed, but the kernel printf doesn't
  support them.  The kernel doesn't support %hd either, but this is
  harder to fix.

Submitted by:	bde
This commit is contained in:
obrien 1999-08-27 10:02:56 +00:00
parent 5854a5ede5
commit 3528dc25c8

View File

@ -1027,9 +1027,9 @@ typedef struct {
static format_char_info print_char_table[] = {
/* FreeBSD kernel extensions. */
{ "D", 1, T_C, T_C, NULL, NULL, NULL, NULL, NULL, "-wp" },
{ "b", 1, T_C, T_C, NULL, NULL, NULL, NULL, NULL, "-wp" },
{ "rz", 0, NULL, T_I, T_I, T_L, NULL, NULL, NULL, "-wp0 +#" },
{ "D", 1, T_C, NULL, NULL, NULL, NULL, NULL, NULL, "-wp" },
{ "b", 1, T_C, NULL, NULL, NULL, NULL, NULL, NULL, "-wp" },
{ "rz", 0, T_I, NULL, NULL, T_L, NULL, NULL, NULL, "-wp0 +#" },
#define unextended_print_char_table (print_char_table + 3)
{ "di", 0, T_I, T_I, T_I, T_L, T_LL, T_LL, T_ST, "-wp0 +" },
{ "oxX", 0, T_UI, T_UI, T_UI, T_UL, T_ULL, T_ULL, T_ST, "-wp0#" },