mirror of
https://github.com/xcat2/xNBA.git
synced 2024-12-14 07:11:32 +00:00
Kill off unused request() method in data-xfer interface.
This commit is contained in:
parent
e5d8ede978
commit
ca4c6f9eee
@ -227,7 +227,6 @@ static void downloader_xfer_close ( struct xfer_interface *xfer, int rc ) {
|
||||
static struct xfer_interface_operations downloader_xfer_operations = {
|
||||
.close = downloader_xfer_close,
|
||||
.vredirect = xfer_vopen,
|
||||
.request = ignore_xfer_request,
|
||||
.seek = downloader_xfer_seek,
|
||||
.deliver_iob = xfer_deliver_as_raw,
|
||||
.deliver_raw = downloader_xfer_deliver_raw,
|
||||
|
@ -36,7 +36,6 @@ static void hw_xfer_close ( struct xfer_interface *xfer, int rc ) {
|
||||
static struct xfer_interface_operations hw_xfer_operations = {
|
||||
.close = hw_xfer_close,
|
||||
.vredirect = ignore_xfer_vredirect,
|
||||
.request = ignore_xfer_request,
|
||||
.seek = ignore_xfer_seek,
|
||||
.deliver_iob = xfer_deliver_as_raw,
|
||||
.deliver_raw = ignore_xfer_deliver_raw,
|
||||
|
@ -159,7 +159,6 @@ posix_file_xfer_deliver_iob ( struct xfer_interface *xfer,
|
||||
static struct xfer_interface_operations posix_file_xfer_operations = {
|
||||
.close = posix_file_xfer_close,
|
||||
.vredirect = xfer_vopen,
|
||||
.request = ignore_xfer_request,
|
||||
.seek = posix_file_xfer_seek,
|
||||
.alloc_iob = default_xfer_alloc_iob,
|
||||
.deliver_iob = posix_file_xfer_deliver_iob,
|
||||
|
@ -326,7 +326,6 @@ static int resolv_xfer_seek ( struct xfer_interface *xfer __unused,
|
||||
static struct xfer_interface_operations named_xfer_ops = {
|
||||
.close = ignore_xfer_close,
|
||||
.vredirect = ignore_xfer_vredirect,
|
||||
.request = ignore_xfer_request,
|
||||
.seek = resolv_xfer_seek,
|
||||
.alloc_iob = default_xfer_alloc_iob,
|
||||
.deliver_iob = xfer_deliver_as_raw,
|
||||
|
@ -85,33 +85,6 @@ int xfer_redirect ( struct xfer_interface *xfer, int type, ... ) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request data
|
||||
*
|
||||
* @v xfer Data transfer interface
|
||||
* @v offset Offset to new position
|
||||
* @v whence Basis for new position
|
||||
* @v len Length of requested data
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
int xfer_request ( struct xfer_interface *xfer, off_t offset, int whence,
|
||||
size_t len ) {
|
||||
struct xfer_interface *dest = xfer_get_dest ( xfer );
|
||||
int rc;
|
||||
|
||||
DBGC ( xfer, "XFER %p->%p request %s+%ld %zd\n", xfer, dest,
|
||||
whence_text ( whence ), offset, len );
|
||||
|
||||
rc = dest->op->request ( dest, offset, whence, len );
|
||||
|
||||
if ( rc != 0 ) {
|
||||
DBGC ( xfer, "XFER %p<-%p request: %s\n", xfer, dest,
|
||||
strerror ( rc ) );
|
||||
}
|
||||
xfer_put ( dest );
|
||||
return rc;
|
||||
}
|
||||
|
||||
/**
|
||||
* Seek to position
|
||||
*
|
||||
@ -311,21 +284,6 @@ int ignore_xfer_vredirect ( struct xfer_interface *xfer __unused,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ignore request() event
|
||||
*
|
||||
* @v xfer Data transfer interface
|
||||
* @v offset Offset to new position
|
||||
* @v whence Basis for new position
|
||||
* @v len Length of requested data
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
int ignore_xfer_request ( struct xfer_interface *xfer __unused,
|
||||
off_t offset __unused, int whence __unused,
|
||||
size_t len __unused ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ignore seek() event
|
||||
*
|
||||
@ -415,7 +373,6 @@ int ignore_xfer_deliver_raw ( struct xfer_interface *xfer,
|
||||
struct xfer_interface_operations null_xfer_ops = {
|
||||
.close = ignore_xfer_close,
|
||||
.vredirect = ignore_xfer_vredirect,
|
||||
.request = ignore_xfer_request,
|
||||
.seek = ignore_xfer_seek,
|
||||
.alloc_iob = default_xfer_alloc_iob,
|
||||
.deliver_iob = xfer_deliver_as_raw,
|
||||
|
@ -32,16 +32,6 @@ struct xfer_interface_operations {
|
||||
*/
|
||||
int ( * vredirect ) ( struct xfer_interface *xfer, int type,
|
||||
va_list args );
|
||||
/** Request data
|
||||
*
|
||||
* @v xfer Data transfer interface
|
||||
* @v offset Offset to new position
|
||||
* @v whence Basis for new position
|
||||
* @v len Length of requested data
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
int ( * request ) ( struct xfer_interface *xfer, off_t offset,
|
||||
int whence, size_t len );
|
||||
/** Seek to position
|
||||
*
|
||||
* @v xfer Data transfer interface
|
||||
@ -146,8 +136,6 @@ extern void xfer_close ( struct xfer_interface *xfer, int rc );
|
||||
extern int xfer_vredirect ( struct xfer_interface *xfer, int type,
|
||||
va_list args );
|
||||
extern int xfer_redirect ( struct xfer_interface *xfer, int type, ... );
|
||||
extern int xfer_request ( struct xfer_interface *xfer, off_t offset,
|
||||
int whence, size_t len );
|
||||
extern int xfer_seek ( struct xfer_interface *xfer, off_t offset, int whence );
|
||||
extern int xfer_ready ( struct xfer_interface *xfer );
|
||||
extern struct io_buffer * xfer_alloc_iob ( struct xfer_interface *xfer,
|
||||
@ -167,8 +155,6 @@ extern int xfer_printf ( struct xfer_interface *xfer,
|
||||
extern void ignore_xfer_close ( struct xfer_interface *xfer, int rc );
|
||||
extern int ignore_xfer_vredirect ( struct xfer_interface *xfer,
|
||||
int type, va_list args );
|
||||
extern int ignore_xfer_request ( struct xfer_interface *xfer, off_t offset,
|
||||
int whence, size_t len );
|
||||
extern int ignore_xfer_seek ( struct xfer_interface *xfer, off_t offset,
|
||||
int whence );
|
||||
extern struct io_buffer * default_xfer_alloc_iob ( struct xfer_interface *xfer,
|
||||
|
@ -103,7 +103,6 @@ static int pxe_udp_deliver_iob ( struct xfer_interface *xfer,
|
||||
static struct xfer_interface_operations pxe_udp_xfer_operations = {
|
||||
.close = ignore_xfer_close,
|
||||
.vredirect = ignore_xfer_vredirect,
|
||||
.request = ignore_xfer_request,
|
||||
.seek = ignore_xfer_seek,
|
||||
.alloc_iob = default_xfer_alloc_iob,
|
||||
.deliver_iob = pxe_udp_deliver_iob,
|
||||
|
@ -951,7 +951,6 @@ static int tcp_xfer_deliver_iob ( struct xfer_interface *xfer,
|
||||
static struct xfer_interface_operations tcp_xfer_operations = {
|
||||
.close = tcp_xfer_close,
|
||||
.vredirect = ignore_xfer_vredirect,
|
||||
.request = ignore_xfer_request,
|
||||
.seek = tcp_xfer_seek,
|
||||
.alloc_iob = default_xfer_alloc_iob,
|
||||
.deliver_iob = tcp_xfer_deliver_iob,
|
||||
|
@ -296,7 +296,6 @@ static int ftp_control_deliver_raw ( struct xfer_interface *control,
|
||||
static struct xfer_interface_operations ftp_control_operations = {
|
||||
.close = ftp_control_close,
|
||||
.vredirect = xfer_vopen,
|
||||
.request = ignore_xfer_request,
|
||||
.seek = ignore_xfer_seek,
|
||||
.alloc_iob = default_xfer_alloc_iob,
|
||||
.deliver_iob = xfer_deliver_as_raw,
|
||||
@ -361,7 +360,6 @@ static int ftp_data_deliver_iob ( struct xfer_interface *data,
|
||||
static struct xfer_interface_operations ftp_data_operations = {
|
||||
.close = ftp_data_closed,
|
||||
.vredirect = xfer_vopen,
|
||||
.request = ignore_xfer_request,
|
||||
.seek = ignore_xfer_seek,
|
||||
.alloc_iob = default_xfer_alloc_iob,
|
||||
.deliver_iob = ftp_data_deliver_iob,
|
||||
@ -394,7 +392,6 @@ static void ftp_xfer_closed ( struct xfer_interface *xfer, int rc ) {
|
||||
static struct xfer_interface_operations ftp_xfer_operations = {
|
||||
.close = ftp_xfer_closed,
|
||||
.vredirect = ignore_xfer_vredirect,
|
||||
.request = ignore_xfer_request,
|
||||
.seek = ignore_xfer_seek,
|
||||
.alloc_iob = default_xfer_alloc_iob,
|
||||
.deliver_iob = xfer_deliver_as_raw,
|
||||
|
@ -424,7 +424,6 @@ static void http_socket_close ( struct xfer_interface *socket, int rc ) {
|
||||
static struct xfer_interface_operations http_socket_operations = {
|
||||
.close = http_socket_close,
|
||||
.vredirect = xfer_vopen,
|
||||
.request = ignore_xfer_request,
|
||||
.seek = ignore_xfer_seek,
|
||||
.alloc_iob = default_xfer_alloc_iob,
|
||||
.deliver_iob = http_socket_deliver_iob,
|
||||
@ -451,7 +450,6 @@ static void http_xfer_close ( struct xfer_interface *xfer, int rc ) {
|
||||
static struct xfer_interface_operations http_xfer_operations = {
|
||||
.close = http_xfer_close,
|
||||
.vredirect = ignore_xfer_vredirect,
|
||||
.request = ignore_xfer_request,
|
||||
.seek = ignore_xfer_seek,
|
||||
.alloc_iob = default_xfer_alloc_iob,
|
||||
.deliver_iob = xfer_deliver_as_raw,
|
||||
|
@ -414,7 +414,6 @@ static int udp_xfer_deliver_iob ( struct xfer_interface *xfer,
|
||||
static struct xfer_interface_operations udp_xfer_operations = {
|
||||
.close = udp_xfer_close,
|
||||
.vredirect = ignore_xfer_vredirect,
|
||||
.request = ignore_xfer_request,
|
||||
.seek = ignore_xfer_seek,
|
||||
.alloc_iob = udp_alloc_iob,
|
||||
.deliver_iob = udp_xfer_deliver_iob,
|
||||
|
@ -721,7 +721,6 @@ static int dhcp_deliver_raw ( struct xfer_interface *xfer,
|
||||
static struct xfer_interface_operations dhcp_xfer_operations = {
|
||||
.close = ignore_xfer_close,
|
||||
.vredirect = xfer_vopen,
|
||||
.request = ignore_xfer_request,
|
||||
.seek = ignore_xfer_seek,
|
||||
.deliver_iob = xfer_deliver_as_raw,
|
||||
.deliver_raw = dhcp_deliver_raw,
|
||||
|
@ -432,7 +432,6 @@ static void dns_xfer_close ( struct xfer_interface *socket, int rc ) {
|
||||
static struct xfer_interface_operations dns_socket_operations = {
|
||||
.close = dns_xfer_close,
|
||||
.vredirect = xfer_vopen,
|
||||
.request = ignore_xfer_request,
|
||||
.seek = ignore_xfer_seek,
|
||||
.alloc_iob = default_xfer_alloc_iob,
|
||||
.deliver_iob = xfer_deliver_as_raw,
|
||||
|
@ -582,7 +582,6 @@ static void tftp_socket_close ( struct xfer_interface *socket, int rc ) {
|
||||
static struct xfer_interface_operations tftp_socket_operations = {
|
||||
.close = tftp_socket_close,
|
||||
.vredirect = xfer_vopen,
|
||||
.request = ignore_xfer_request,
|
||||
.seek = ignore_xfer_seek,
|
||||
.alloc_iob = default_xfer_alloc_iob,
|
||||
.deliver_iob = tftp_socket_deliver_iob,
|
||||
@ -609,7 +608,6 @@ static void tftp_xfer_close ( struct xfer_interface *xfer, int rc ) {
|
||||
static struct xfer_interface_operations tftp_xfer_operations = {
|
||||
.close = tftp_xfer_close,
|
||||
.vredirect = ignore_xfer_vredirect,
|
||||
.request = ignore_xfer_request,
|
||||
.seek = ignore_xfer_seek,
|
||||
.alloc_iob = default_xfer_alloc_iob,
|
||||
.deliver_iob = xfer_deliver_as_raw,
|
||||
|
Loading…
Reference in New Issue
Block a user