svn commit: trunk/busybox: applets libbb networking
vda at busybox.net
vda at busybox.net
Fri Nov 10 23:25:53 UTC 2006
Author: vda
Date: 2006-11-10 15:25:53 -0800 (Fri, 10 Nov 2006)
New Revision: 16528
Log:
wget: fix error message.
Bad:
wget http://127.0.0.1:81/fgdg/Makefile
Connecting to 127.0.0.1[127.0.0.1]:81
: HTTP/1.0 404 Not Foundror 404 Not Found
Good:
wget http://127.0.0.1:81/fgdg/Makefile
Connecting to 127.0.0.1[127.0.0.1]:81
get: server returned error: HTTP/1.0 404 Not Found
nslookup: fix my mistake
applets: make Bernhard Fischer <rep.nop at aon.at> happy :)
Modified:
trunk/busybox/applets/applets.c
trunk/busybox/libbb/chomp.c
trunk/busybox/networking/nslookup.c
trunk/busybox/networking/wget.c
Changeset:
Modified: trunk/busybox/applets/applets.c
===================================================================
--- trunk/busybox/applets/applets.c 2006-11-10 20:41:49 UTC (rev 16527)
+++ trunk/busybox/applets/applets.c 2006-11-10 23:25:53 UTC (rev 16528)
@@ -20,7 +20,7 @@
/* Apparently uclibc defines __GLIBC__ (compat trick?). Oh well. */
#if ENABLE_STATIC && defined(__GLIBC__) && !defined(__UCLIBC__)
#warning Static linking against glibc produces buggy executables
-#warning (glibc doesn't cope well with ld --gc-sections).
+#warning (glibc does not cope well with ld --gc-sections).
#warning See sources.redhat.com/bugzilla/show_bug.cgi?id=3400
#warning Note that glibc is utterly unsuitable for static linking anyway.
#endif
Modified: trunk/busybox/libbb/chomp.c
===================================================================
--- trunk/busybox/libbb/chomp.c 2006-11-10 20:41:49 UTC (rev 16527)
+++ trunk/busybox/libbb/chomp.c 2006-11-10 23:25:53 UTC (rev 16528)
@@ -8,15 +8,12 @@
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/
-#include <stdio.h>
-#include <string.h>
#include "libbb.h"
-
void chomp(char *s)
{
char *lc = last_char_is(s, '\n');
- if(lc)
+ if (lc)
*lc = 0;
}
Modified: trunk/busybox/networking/nslookup.c
===================================================================
--- trunk/busybox/networking/nslookup.c 2006-11-10 20:41:49 UTC (rev 16527)
+++ trunk/busybox/networking/nslookup.c 2006-11-10 23:25:53 UTC (rev 16528)
@@ -82,7 +82,7 @@
while (cur) {
sockaddr_to_dotted(cur->ai_addr, str, sizeof(str));
printf("%s %s\nAddress: %s", header, hostname, str);
- s[0] = ' ';
+ str[0] = ' ';
if (getnameinfo(cur->ai_addr, cur->ai_addrlen, str+1, sizeof(str)-1, NULL, 0, NI_NAMEREQD))
str[0] = '\0';
puts(str);
Modified: trunk/busybox/networking/wget.c
===================================================================
--- trunk/busybox/networking/wget.c 2006-11-10 20:41:49 UTC (rev 16527)
+++ trunk/busybox/networking/wget.c 2006-11-10 23:25:53 UTC (rev 16528)
@@ -324,8 +324,9 @@
break;
/*FALLTHRU*/
default:
- chomp(buf);
- bb_error_msg_and_die("server returned error %s: %s", s, buf);
+ /* Show first line only and kill any ESC tricks */
+ buf[strcspn(buf, "\n\r\x1b")] = '\0';
+ bb_error_msg_and_die("server returned error: %s", buf);
}
/*
@@ -585,6 +586,8 @@
{
FILE *fp;
+ /* glibc 2.4 seems to try seeking on it - ??! */
+ /* hopefully it understands what ESPIPE means... */
fp = fdopen(xconnect_tcp_v4(s_in), "r+");
if (fp == NULL)
bb_perror_msg_and_die("fdopen");
More information about the busybox-cvs
mailing list