diff options
author | kib <kib@FreeBSD.org> | 2016-01-25 15:37:01 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2016-01-25 15:37:01 +0000 |
commit | 265360f6c0f93c95a859342680eef55baa4e950b (patch) | |
tree | 9e5718dc171a677419edc36992826f2417950f25 /sys/kern | |
parent | 8333b5220711342f1e18a0b59c1bf2b7ca60640b (diff) | |
download | FreeBSD-src-265360f6c0f93c95a859342680eef55baa4e950b.zip FreeBSD-src-265360f6c0f93c95a859342680eef55baa4e950b.tar.gz |
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
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/tty.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c index e28b303..168157b 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -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. */ |