X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tools%2Fncb.c;h=ec8d8a7435208e432b81b8daf29be868ec408921;hb=582d97b6d37ed1bfce575c32d3847a42fc633b8e;hp=30acbead5f3bfb7ec0e27719a388608b0a92e33c;hpb=0a9403c8c753837a27b14ac33bc2b80d362c0e80;p=u-boot diff --git a/tools/ncb.c b/tools/ncb.c index 30acbead5f..ec8d8a7435 100644 --- a/tools/ncb.c +++ b/tools/ncb.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -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;