tty.c (294598) | tty.c (294732) |
---|---|
1/*- 2 * Copyright (c) 2008 Ed Schouten <ed@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Portions of this software were developed under sponsorship from Snow 6 * B.V., the Netherlands. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2008 Ed Schouten <ed@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Portions of this software were developed under sponsorship from Snow 6 * B.V., the Netherlands. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/kern/tty.c 294598 2016-01-22 20:38:46Z kib $"); | 31__FBSDID("$FreeBSD: head/sys/kern/tty.c 294732 2016-01-25 15:37:01Z kib $"); |
32 33#include "opt_capsicum.h" 34#include "opt_compat.h" 35 36#include <sys/param.h> 37#include <sys/capsicum.h> 38#include <sys/conf.h> 39#include <sys/cons.h> --- 2064 unchanged lines hidden (view full) --- 2104 { TF_BUSY, 'b' }, 2105 { TF_BUSY_IN, 'i' }, 2106 { TF_BUSY_OUT, 'o' }, 2107 2108 { 0, '\0'}, 2109}; 2110 2111#define TTY_FLAG_BITS \ | 32 33#include "opt_capsicum.h" 34#include "opt_compat.h" 35 36#include <sys/param.h> 37#include <sys/capsicum.h> 38#include <sys/conf.h> 39#include <sys/cons.h> --- 2064 unchanged lines hidden (view full) --- 2104 { TF_BUSY, 'b' }, 2105 { TF_BUSY_IN, 'i' }, 2106 { TF_BUSY_OUT, 'o' }, 2107 2108 { 0, '\0'}, 2109}; 2110 2111#define TTY_FLAG_BITS \ |
2112 "\20\1NOPREFIX\2INITLOCK\3CALLOUT\4OPENED_IN\5OPENED_OUT\6GONE" \ 2113 "\7OPENCLOSE\10ASYNC\11LITERAL\12HIWAT_IN\13HIWAT_OUT\14STOPPED" \ 2114 "\15EXCLUDE\16BYPASS\17ZOMBIE\20HOOK" | 2112 "\20\1NOPREFIX\2INITLOCK\3CALLOUT\4OPENED_IN" \ 2113 "\5OPENED_OUT\6OPENED_CONS\7GONE\10OPENCLOSE" \ 2114 "\11ASYNC\12LITERAL\13HIWAT_IN\14HIWAT_OUT" \ 2115 "\15STOPPED\16EXCLUDE\17BYPASS\20ZOMBIE" \ 2116 "\21HOOK\22BUSY_IN\23BUSY_OUT" |
2115 2116#define DB_PRINTSYM(name, addr) \ 2117 db_printf("%s " #name ": ", sep); \ 2118 db_printsym((db_addr_t) addr, DB_STGY_ANY); \ 2119 db_printf("\n"); 2120 2121static void 2122_db_show_devsw(const char *sep, const struct ttydevsw *tsw) --- 46 unchanged lines hidden (view full) --- 2169 struct tty *tp; 2170 2171 if (!have_addr) { 2172 db_printf("usage: show tty <addr>\n"); 2173 return; 2174 } 2175 tp = (struct tty *)addr; 2176 | 2117 2118#define DB_PRINTSYM(name, addr) \ 2119 db_printf("%s " #name ": ", sep); \ 2120 db_printsym((db_addr_t) addr, DB_STGY_ANY); \ 2121 db_printf("\n"); 2122 2123static void 2124_db_show_devsw(const char *sep, const struct ttydevsw *tsw) --- 46 unchanged lines hidden (view full) --- 2171 struct tty *tp; 2172 2173 if (!have_addr) { 2174 db_printf("usage: show tty <addr>\n"); 2175 return; 2176 } 2177 tp = (struct tty *)addr; 2178 |
2177 db_printf("0x%p: %s\n", tp, tty_devname(tp)); | 2179 db_printf("%p: %s\n", tp, tty_devname(tp)); |
2178 db_printf("\tmtx: %p\n", tp->t_mtx); | 2180 db_printf("\tmtx: %p\n", tp->t_mtx); |
2179 db_printf("\tflags: %b\n", tp->t_flags, TTY_FLAG_BITS); | 2181 db_printf("\tflags: 0x%b\n", tp->t_flags, TTY_FLAG_BITS); |
2180 db_printf("\trevokecnt: %u\n", tp->t_revokecnt); 2181 2182 /* Buffering mechanisms. */ 2183 db_printf("\tinq: %p begin %u linestart %u reprint %u end %u " 2184 "nblocks %u quota %u\n", &tp->t_inq, tp->t_inq.ti_begin, 2185 tp->t_inq.ti_linestart, tp->t_inq.ti_reprint, tp->t_inq.ti_end, 2186 tp->t_inq.ti_nblocks, tp->t_inq.ti_quota); 2187 db_printf("\toutq: %p begin %u end %u nblocks %u quota %u\n", --- 84 unchanged lines hidden --- | 2182 db_printf("\trevokecnt: %u\n", tp->t_revokecnt); 2183 2184 /* Buffering mechanisms. */ 2185 db_printf("\tinq: %p begin %u linestart %u reprint %u end %u " 2186 "nblocks %u quota %u\n", &tp->t_inq, tp->t_inq.ti_begin, 2187 tp->t_inq.ti_linestart, tp->t_inq.ti_reprint, tp->t_inq.ti_end, 2188 tp->t_inq.ti_nblocks, tp->t_inq.ti_quota); 2189 db_printf("\toutq: %p begin %u end %u nblocks %u quota %u\n", --- 84 unchanged lines hidden --- |