X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tools%2Fncb.c;h=ec8d8a7435208e432b81b8daf29be868ec408921;hb=258fb0e677b63e5b92413eae1f05f82213d9e43a;hp=7e123f163dbf99c9135ac46a46de41560ec34ad6;hpb=ef29884b2708a6cce3b77f4ccaeea193d4e02c22;p=u-boot diff --git a/tools/ncb.c b/tools/ncb.c index 7e123f163d..ec8d8a7435 100644 --- a/tools/ncb.c +++ b/tools/ncb.c @@ -1,7 +1,8 @@ +#include #include #include #include -#include +#include int main (int argc, char *argv[]) { @@ -29,7 +30,8 @@ int main (int argc, char *argv[]) len = recvfrom (s, buf, sizeof buf, 0, (struct sockaddr *) &addr, &addr_len); if (len < 0) break; - write (1, buf, len); + if (write (1, buf, len) != len) + fprintf(stderr, "WARNING: serial characters dropped\n"); } return 0;