Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160352220
D17877.id50086.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D17877.id50086.diff
View Options
Index: sys/kern/tty.c
===================================================================
--- sys/kern/tty.c
+++ sys/kern/tty.c
@@ -33,6 +33,7 @@
__FBSDID("$FreeBSD$");
#include "opt_capsicum.h"
+#include "opt_printf.h"
#include <sys/param.h>
#include <sys/capsicum.h>
@@ -1051,7 +1052,8 @@
PATCH_FUNC(busy);
#undef PATCH_FUNC
- tp = malloc(sizeof(struct tty), M_TTY, M_WAITOK|M_ZERO);
+ tp = malloc(sizeof(struct tty) + TTY_PRINTF_SIZE, M_TTY,
+ M_WAITOK | M_ZERO);
tp->t_devsw = tsw;
tp->t_devswsoftc = sc;
tp->t_flags = tsw->tsw_flags;
Index: sys/kern/tty_info.c
===================================================================
--- sys/kern/tty_info.c
+++ sys/kern/tty_info.c
@@ -45,6 +45,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "opt_printf.h"
+
#include <sys/param.h>
#include <sys/cons.h>
#include <sys/kdb.h>
@@ -269,7 +271,7 @@
if (tty_checkoutq(tp) == 0)
return;
- (void)sbuf_new(&sb, tp->t_prbuf, sizeof(tp->t_prbuf), SBUF_FIXEDLEN);
+ (void)sbuf_new(&sb, tp->t_prbuf, TTY_PRINTF_SIZE, SBUF_FIXEDLEN);
sbuf_set_drain(&sb, sbuf_tty_drain, tp);
/* Print load average. */
Index: sys/sys/tty.h
===================================================================
--- sys/sys/tty.h
+++ sys/sys/tty.h
@@ -133,12 +133,8 @@
void *t_hooksoftc; /* (t) Soft config, for hooks. */
struct cdev *t_dev; /* (c) Primary character device. */
-#ifndef PRINTF_BUFR_SIZE
-#define TTY_PRINTF_SIZE 256
-#else
-#define TTY_PRINTF_SIZE PRINTF_BUFR_SIZE
-#endif
- char t_prbuf[TTY_PRINTF_SIZE]; /* (t) */
+#define TTY_PRINTF_SIZE PRINTF_BUFR_SIZE
+ char t_prbuf[0]; /* (t) SIGINFO buffer. */
};
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jun 24, 2:31 PM (19 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34257485
Default Alt Text
D17877.id50086.diff (1 KB)
Attached To
Mode
D17877: Avoid conditional references of PRINTF_BUFR_SIZE in headers.
Attached
Detach File
Event Timeline
Log In to Comment