Kill off unused request() method in data-xfer interface.
authorMichael Brown <mcb30@etherboot.org>
Sun, 8 Jul 2007 01:10:54 +0000 (02:10 +0100)
committerMichael Brown <mcb30@etherboot.org>
Sun, 8 Jul 2007 01:10:54 +0000 (02:10 +0100)
14 files changed:
src/core/downloader.c
src/core/hw.c
src/core/posix_io.c
src/core/resolv.c
src/core/xfer.c
src/include/gpxe/xfer.h
src/interface/pxe/pxe_udp.c
src/net/tcp.c
src/net/tcp/ftp.c
src/net/tcp/http.c
src/net/udp.c
src/net/udp/dhcp.c
src/net/udp/dns.c
src/net/udp/tftp.c

index d223744..4a74589 100644 (file)
@@ -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,
index 64258b8..2cb912b 100644 (file)
@@ -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,
index ca29ea6..03d440a 100644 (file)
@@ -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,
index 88fc118..7ca62cd 100644 (file)
@@ -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,
index 97fd2a6..3e55eba 100644 (file)
@@ -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,
index 55c5b17..edf553f 100644 (file)
@@ -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,
index d85028e..153d758 100644 (file)
@@ -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,
index a1b8646..12ca65a 100644 (file)
@@ -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,
index 9a90808..6c09edf 100644 (file)
@@ -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,
index 4a979ea..287a56a 100644 (file)
@@ -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,
index ad999c0..3e33ff1 100644 (file)
@@ -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,
index 07dd923..5a8203a 100644 (file)
@@ -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,
index 0768d8e..76d5dd7 100644 (file)
@@ -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,
index 4bbeb0f..03a51f9 100644 (file)
@@ -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,