X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tools%2Fncb.c;h=ec8d8a7435208e432b81b8daf29be868ec408921;hb=760b7170c5e44c771397eaf57b7197b621373809;hp=7e123f163dbf99c9135ac46a46de41560ec34ad6;hpb=be4880ebe4355e8782be4af4b337a1b98dffcbe3;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;