Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F112003304
D10624.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
D10624.diff
View Options
Index: head/usr.bin/resizewin/resizewin.c
===================================================================
--- head/usr.bin/resizewin/resizewin.c
+++ head/usr.bin/resizewin/resizewin.c
@@ -31,6 +31,7 @@
__FBSDID("$FreeBSD$");
#include <sys/ioctl.h>
#include <sys/time.h>
+#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
@@ -87,8 +88,7 @@
gettimeofday(&now, NULL);
timersub(&now, &then, &now);
if (now.tv_sec >= 2) {
- fprintf(stderr, "\n\n\nTimeout reading from terminal\n");
- fprintf(stderr, "Read %d bytes, %s\n", cnt, data);
+ warnx("timeout reading from terminal");
err = 1;
goto out;
}
@@ -104,7 +104,7 @@
cnt++;
if (cnt == sizeof(data) - 2) {
- fprintf(stderr, "Response too long\n");
+ warnx("response too long");
err = 1;
goto out;
}
@@ -113,7 +113,7 @@
/* Parse */
if (sscanf(data, "\033[%hu;%huR", &w.ws_row, &w.ws_col) != 2) {
err = 1;
- fprintf(stderr, "Unable to parse response\n");
+ warnx("unable to parse response");
goto out;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 12, 10:41 AM (6 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17118064
Default Alt Text
D10624.diff (1 KB)
Attached To
Mode
D10624: Improve resizewin(1).
Attached
Detach File
Event Timeline
Log In to Comment