Changeset b5e68c8 in mainline for uspace/app/ping/ping.c
- Timestamp:
- 2011-05-12T16:49:44Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f36787d7
- Parents:
- e80329d6 (diff), 750636a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
uspace/app/ping/ping.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/ping/ping.c
re80329d6 rb5e68c8 35 35 */ 36 36 37 #include <async.h> 37 38 #include <stdio.h> 38 39 #include <str.h> 39 40 #include <task.h> 40 41 #include <time.h> 41 #include <ipc/ipc.h>42 42 #include <ipc/services.h> 43 43 #include <str_error.h> … … 337 337 } 338 338 339 printf("PING %s (%s) % u(%u) bytes of data\n", config.dest_addr,339 printf("PING %s (%s) %zu(%zu) bytes of data\n", config.dest_addr, 340 340 config.dest_str, config.size, config.size); 341 341 342 int icmp_phone = icmp_connect_module( SERVICE_ICMP,ICMP_CONNECT_TIMEOUT);342 int icmp_phone = icmp_connect_module(ICMP_CONNECT_TIMEOUT); 343 343 if (icmp_phone < 0) { 344 344 fprintf(stderr, "%s: Unable to connect to ICMP service (%s)\n", NAME, … … 355 355 str_error(ret)); 356 356 357 ipc_hangup(icmp_phone);357 async_hangup(icmp_phone); 358 358 return ret; 359 359 } … … 370 370 str_error(ret)); 371 371 372 ipc_hangup(icmp_phone);372 async_hangup(icmp_phone); 373 373 return ret; 374 374 } … … 378 378 switch (result) { 379 379 case ICMP_ECHO: 380 printf("% u bytes from ? (?): icmp_seq=%u ttl=? time=%u.%04u\n",380 printf("%zu bytes from ? (?): icmp_seq=%u ttl=? time=%ld.%04ld\n", 381 381 config.size, seq, elapsed / 1000, elapsed % 1000); 382 382 break; 383 383 case ETIMEOUT: 384 printf("% u bytes from ? (?): icmp_seq=%u Timed out\n",384 printf("%zu bytes from ? (?): icmp_seq=%u Timed out\n", 385 385 config.size, seq); 386 386 break; … … 390 390 } 391 391 392 ipc_hangup(icmp_phone);392 async_hangup(icmp_phone); 393 393 394 394 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.
