From ca4c6f9eee896ef70b676096131559dfd51970dc Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sun, 8 Jul 2007 02:10:54 +0100 Subject: [PATCH] Kill off unused request() method in data-xfer interface. --- src/core/downloader.c | 1 - src/core/hw.c | 1 - src/core/posix_io.c | 1 - src/core/resolv.c | 1 - src/core/xfer.c | 43 ------------------------------------- src/include/gpxe/xfer.h | 14 ------------ src/interface/pxe/pxe_udp.c | 1 - src/net/tcp.c | 1 - src/net/tcp/ftp.c | 3 --- src/net/tcp/http.c | 2 -- src/net/udp.c | 1 - src/net/udp/dhcp.c | 1 - src/net/udp/dns.c | 1 - src/net/udp/tftp.c | 2 -- 14 files changed, 73 deletions(-) diff --git a/src/core/downloader.c b/src/core/downloader.c index d2237443..4a74589f 100644 --- a/src/core/downloader.c +++ b/src/core/downloader.c @@ -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, diff --git a/src/core/hw.c b/src/core/hw.c index 64258b86..2cb912b1 100644 --- a/src/core/hw.c +++ b/src/core/hw.c @@ -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, diff --git a/src/core/posix_io.c b/src/core/posix_io.c index ca29ea69..03d440a6 100644 --- a/src/core/posix_io.c +++ b/src/core/posix_io.c @@ -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, diff --git a/src/core/resolv.c b/src/core/resolv.c index 88fc1184..7ca62cd8 100644 --- a/src/core/resolv.c +++ b/src/core/resolv.c @@ -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, diff --git a/src/core/xfer.c b/src/core/xfer.c index 97fd2a62..3e55ebaf 100644 --- a/src/core/xfer.c +++ b/src/core/xfer.c @@ -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, diff --git a/src/include/gpxe/xfer.h b/src/include/gpxe/xfer.h index 55c5b176..edf553f7 100644 --- a/src/include/gpxe/xfer.h +++ b/src/include/gpxe/xfer.h @@ -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, diff --git a/src/interface/pxe/pxe_udp.c b/src/interface/pxe/pxe_udp.c index d85028e4..153d758c 100644 --- a/src/interface/pxe/pxe_udp.c +++ b/src/interface/pxe/pxe_udp.c @@ -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, diff --git a/src/net/tcp.c b/src/net/tcp.c index a1b86462..12ca65a6 100644 --- a/src/net/tcp.c +++ b/src/net/tcp.c @@ -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, diff --git a/src/net/tcp/ftp.c b/src/net/tcp/ftp.c index 9a908085..6c09edff 100644 --- a/src/net/tcp/ftp.c +++ b/src/net/tcp/ftp.c @@ -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, diff --git a/src/net/tcp/http.c b/src/net/tcp/http.c index 4a979eae..287a56a0 100644 --- a/src/net/tcp/http.c +++ b/src/net/tcp/http.c @@ -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, diff --git a/src/net/udp.c b/src/net/udp.c index ad999c0a..3e33ff17 100644 --- a/src/net/udp.c +++ b/src/net/udp.c @@ -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, diff --git a/src/net/udp/dhcp.c b/src/net/udp/dhcp.c index 07dd923b..5a8203a1 100644 --- a/src/net/udp/dhcp.c +++ b/src/net/udp/dhcp.c @@ -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, diff --git a/src/net/udp/dns.c b/src/net/udp/dns.c index 0768d8ee..76d5dd7a 100644 --- a/src/net/udp/dns.c +++ b/src/net/udp/dns.c @@ -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, diff --git a/src/net/udp/tftp.c b/src/net/udp/tftp.c index 4bbeb0f8..03a51f9a 100644 --- a/src/net/udp/tftp.c +++ b/src/net/udp/tftp.c @@ -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,