svn commit: trunk/busybox: include libbb

aldot at busybox.net aldot at busybox.net
Sat Jan 20 13:33:51 PST 2007


Author: aldot
Date: 2007-01-20 13:33:50 -0800 (Sat, 20 Jan 2007)
New Revision: 17421

Log:
- get_terminal_width_height does not and should never write to fd. Cosmetic Precaution


Modified:
   trunk/busybox/include/libbb.h
   trunk/busybox/libbb/xfuncs.c


Changeset:
Modified: trunk/busybox/include/libbb.h
===================================================================
--- trunk/busybox/include/libbb.h	2007-01-20 21:32:38 UTC (rev 17420)
+++ trunk/busybox/include/libbb.h	2007-01-20 21:33:50 UTC (rev 17421)
@@ -570,7 +570,7 @@
 extern void vfork_daemon_rexec(int nochdir, int noclose,
 		int argc, char **argv, char *foreground_opt);
 #endif
-extern int get_terminal_width_height(int fd, int *width, int *height);
+extern int get_terminal_width_height(const int fd, int *width, int *height);
 
 int is_in_ino_dev_hashtable(const struct stat *statbuf, char **name);
 void add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name);

Modified: trunk/busybox/libbb/xfuncs.c
===================================================================
--- trunk/busybox/libbb/xfuncs.c	2007-01-20 21:32:38 UTC (rev 17420)
+++ trunk/busybox/libbb/xfuncs.c	2007-01-20 21:33:50 UTC (rev 17421)
@@ -572,7 +572,7 @@
 
 /* It is perfectly ok to pass in a NULL for either width or for
  * height, in which case that value will not be set.  */
-int get_terminal_width_height(int fd, int *width, int *height)
+int get_terminal_width_height(const int fd, int *width, int *height)
 {
 	struct winsize win = { 0, 0, 0, 0 };
 	int ret = ioctl(fd, TIOCGWINSZ, &win);



More information about the busybox-cvs mailing list