aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--networking/tftp.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/networking/tftp.c b/networking/tftp.c
index 07d672dcb..eb39e9c54 100644
--- a/networking/tftp.c
+++ b/networking/tftp.c
@@ -653,8 +653,15 @@ int tftpd_main(int argc UNUSED_PARAM, char **argv)
653 INIT_G(); 653 INIT_G();
654 654
655 our_lsa = get_sock_lsa(STDIN_FILENO); 655 our_lsa = get_sock_lsa(STDIN_FILENO);
656 if (!our_lsa) 656 if (!our_lsa) {
657 bb_perror_msg_and_die("stdin is not a socket"); 657 /* This is confusing:
658 *bb_error_msg_and_die("stdin is not a socket");
659 * Better: */
660 bb_show_usage();
661 /* Help text says that tftpd must be used as inetd service,
662 * which is by far the most usual cause of get_sock_lsa
663 * failure */
664 }
658 peer_lsa = xzalloc(LSA_LEN_SIZE + our_lsa->len); 665 peer_lsa = xzalloc(LSA_LEN_SIZE + our_lsa->len);
659 peer_lsa->len = our_lsa->len; 666 peer_lsa->len = our_lsa->len;
660 667