void-packages/srcpkgs/iputils/patches/iputils-20071127-warnings.patch

126 lines
3.8 KiB
Diff

diff -up iputils-s20071127/ping_common.c.warnings iputils-s20071127/ping_common.c
--- iputils-s20071127/ping_common.c.warnings 2008-06-02 13:29:27.000000000 +0200
+++ iputils-s20071127/ping_common.c 2008-06-02 13:29:27.000000000 +0200
@@ -338,7 +338,7 @@ resend:
* high preload or pipe size is very confusing. */
if ((preload < screen_width && pipesize < screen_width) ||
in_flight() < screen_width)
- write(STDOUT_FILENO, ".", 1);
+ printf(".");
}
return interval - tokens;
}
@@ -391,7 +391,7 @@ resend:
if (i == 0 && !(options & F_QUIET)) {
if (options & F_FLOOD)
- write(STDOUT_FILENO, "E", 1);
+ printf("E");
else
perror("ping: sendmsg");
}
@@ -717,9 +717,9 @@ restamp:
if (options & F_FLOOD) {
if (!csfailed)
- write(STDOUT_FILENO, "\b \b", 3);
+ printf("\b \b");
else
- write(STDOUT_FILENO, "\bC", 1);
+ printf("\bC");
} else {
int i;
__u8 *cp, *dp;
diff -up iputils-s20071127/clockdiff.c.warnings iputils-s20071127/clockdiff.c
--- iputils-s20071127/clockdiff.c.warnings 2007-11-27 01:57:27.000000000 +0100
+++ iputils-s20071127/clockdiff.c 2008-06-02 13:29:27.000000000 +0200
@@ -628,8 +628,6 @@ main(int argc, char *argv[])
}
}
- nice(-16);
-
if ((measure_status = (ip_opt_len ? measure_opt : measure)(&server)) < 0) {
if (errno)
perror("measure");
diff -up iputils-s20071127/ping6.c.warnings iputils-s20071127/ping6.c
--- iputils-s20071127/ping6.c.warnings 2008-06-02 13:30:06.000000000 +0200
+++ iputils-s20071127/ping6.c 2008-06-02 13:31:14.000000000 +0200
@@ -1037,7 +1037,7 @@ int receive_error_msg()
if (options & F_QUIET)
goto out;
if (options & F_FLOOD)
- write(STDOUT_FILENO, "E", 1);
+ printf("E");
else if (e->ee_errno != EMSGSIZE)
fprintf(stderr, "ping: local error: %s\n", strerror(e->ee_errno));
else
@@ -1060,7 +1060,7 @@ int receive_error_msg()
if (options & F_QUIET)
goto out;
if (options & F_FLOOD) {
- write(STDOUT_FILENO, "\bE", 2);
+ printf("\bE");
} else {
print_timestamp();
printf("From %s icmp_seq=%u ", pr_addr(&sin6->sin6_addr), ntohs(icmph.icmp6_seq));
@@ -1400,7 +1400,7 @@ parse_reply(struct msghdr *msg, int cc,
return 0;
nerrors++;
if (options & F_FLOOD) {
- write(STDOUT_FILENO, "\bE", 2);
+ printf("\bE");
return 0;
}
print_timestamp();
diff -up iputils-s20071127/ping.c.warnings iputils-s20071127/ping.c
--- iputils-s20071127/ping.c.warnings 2008-06-02 13:29:27.000000000 +0200
+++ iputils-s20071127/ping.c 2008-06-02 13:29:27.000000000 +0200
@@ -367,7 +367,7 @@ main(int argc, char **argv)
}
source.sin_port = 0;
close(probe_fd);
- } while (0);
+ }
if (whereto.sin_addr.s_addr == 0)
whereto.sin_addr.s_addr = source.sin_addr.s_addr;
@@ -594,7 +594,7 @@ int receive_error_msg()
if (options & F_QUIET)
goto out;
if (options & F_FLOOD)
- write(STDOUT_FILENO, "E", 1);
+ printf("E");
else if (e->ee_errno != EMSGSIZE)
fprintf(stderr, "ping: local error: %s\n", strerror(e->ee_errno));
else
@@ -630,7 +630,7 @@ int receive_error_msg()
if (options & F_QUIET)
goto out;
if (options & F_FLOOD) {
- write(STDOUT_FILENO, "\bE", 2);
+ printf("\bE");
} else {
print_timestamp();
printf("From %s icmp_seq=%u ", pr_addr(sin->sin_addr.s_addr), ntohs(icmph.un.echo.sequence));
@@ -795,7 +795,7 @@ parse_reply(struct msghdr *msg, int cc,
return !error_pkt;
if (options & F_FLOOD) {
if (error_pkt)
- write(STDOUT_FILENO, "\bE", 2);
+ printf("\bE");
return !error_pkt;
}
print_timestamp();
@@ -812,9 +812,9 @@ parse_reply(struct msghdr *msg, int cc,
}
if ((options & F_FLOOD) && !(options & (F_VERBOSE|F_QUIET))) {
if (!csfailed)
- write(STDOUT_FILENO, "!E", 2);
+ printf("!E");
else
- write(STDOUT_FILENO, "!EC", 3);
+ printf("!EC");
return 0;
}
if (!(options & F_VERBOSE) || uid)