mirror of
https://github.com/ipxe/ipxe
synced 2025-12-14 07:50:43 +03:00
[ping] Report timed-out pings via the callback function
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -36,7 +36,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
||||
/**
|
||||
* Display ping result
|
||||
*
|
||||
* @v src Source socket address
|
||||
* @v src Source socket address, or NULL
|
||||
* @v sequence Sequence number
|
||||
* @v len Payload length
|
||||
* @v rc Status code
|
||||
@@ -46,7 +46,7 @@ static void ping_callback ( struct sockaddr *peer, unsigned int sequence,
|
||||
|
||||
/* Display ping response */
|
||||
printf ( "%zd bytes from %s: seq=%d",
|
||||
len, sock_ntoa ( peer ), sequence );
|
||||
len, ( peer ? sock_ntoa ( peer ) : "<none>" ), sequence );
|
||||
if ( rc != 0 )
|
||||
printf ( ": %s", strerror ( rc ) );
|
||||
printf ( "\n" );
|
||||
|
||||
Reference in New Issue
Block a user