Fix the %b flags string for ddb. All bits above the 5th
(TF_OPENED_CONS) were broken in r188147 by adding TF_OPENED_CONS without updating the string. It was especially confusing to display OPENED_CONS as GONE and BYPASS as ZOMBIE. 2 flags at the end were not updated in r188487. Don't print an extra 0x prefix for %p in a ddb command. In the rest of the kernel there are more than 6000 lines with %p and only about 40 with this bug. Print a non-extra 0x prefix for %b in a ddb command. In the rest of the kernel, there are approx. 180 lines with %b and 2/3 of them have this bug. Submitted by: bde MFC after: 2 weeks
This commit is contained in:
parent
004ae5cbbd
commit
3593a18a91
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=294732
@ -2109,9 +2109,11 @@ static struct {
|
||||
};
|
||||
|
||||
#define TTY_FLAG_BITS \
|
||||
"\20\1NOPREFIX\2INITLOCK\3CALLOUT\4OPENED_IN\5OPENED_OUT\6GONE" \
|
||||
"\7OPENCLOSE\10ASYNC\11LITERAL\12HIWAT_IN\13HIWAT_OUT\14STOPPED" \
|
||||
"\15EXCLUDE\16BYPASS\17ZOMBIE\20HOOK"
|
||||
"\20\1NOPREFIX\2INITLOCK\3CALLOUT\4OPENED_IN" \
|
||||
"\5OPENED_OUT\6OPENED_CONS\7GONE\10OPENCLOSE" \
|
||||
"\11ASYNC\12LITERAL\13HIWAT_IN\14HIWAT_OUT" \
|
||||
"\15STOPPED\16EXCLUDE\17BYPASS\20ZOMBIE" \
|
||||
"\21HOOK\22BUSY_IN\23BUSY_OUT"
|
||||
|
||||
#define DB_PRINTSYM(name, addr) \
|
||||
db_printf("%s " #name ": ", sep); \
|
||||
@ -2174,9 +2176,9 @@ DB_SHOW_COMMAND(tty, db_show_tty)
|
||||
}
|
||||
tp = (struct tty *)addr;
|
||||
|
||||
db_printf("0x%p: %s\n", tp, tty_devname(tp));
|
||||
db_printf("%p: %s\n", tp, tty_devname(tp));
|
||||
db_printf("\tmtx: %p\n", tp->t_mtx);
|
||||
db_printf("\tflags: %b\n", tp->t_flags, TTY_FLAG_BITS);
|
||||
db_printf("\tflags: 0x%b\n", tp->t_flags, TTY_FLAG_BITS);
|
||||
db_printf("\trevokecnt: %u\n", tp->t_revokecnt);
|
||||
|
||||
/* Buffering mechanisms. */
|
||||
|
Loading…
Reference in New Issue
Block a user