Преглед на файлове

Kill off unused request() method in data-xfer interface.

tags/v0.9.3
Michael Brown преди 17 години
родител
ревизия
ca4c6f9eee
променени са 14 файла, в които са добавени 0 реда и са изтрити 73 реда
  1. 0
    1
      src/core/downloader.c
  2. 0
    1
      src/core/hw.c
  3. 0
    1
      src/core/posix_io.c
  4. 0
    1
      src/core/resolv.c
  5. 0
    43
      src/core/xfer.c
  6. 0
    14
      src/include/gpxe/xfer.h
  7. 0
    1
      src/interface/pxe/pxe_udp.c
  8. 0
    1
      src/net/tcp.c
  9. 0
    3
      src/net/tcp/ftp.c
  10. 0
    2
      src/net/tcp/http.c
  11. 0
    1
      src/net/udp.c
  12. 0
    1
      src/net/udp/dhcp.c
  13. 0
    1
      src/net/udp/dns.c
  14. 0
    2
      src/net/udp/tftp.c

+ 0
- 1
src/core/downloader.c Целия файл

@@ -227,7 +227,6 @@ static void downloader_xfer_close ( struct xfer_interface *xfer, int rc ) {
227 227
 static struct xfer_interface_operations downloader_xfer_operations = {
228 228
 	.close		= downloader_xfer_close,
229 229
 	.vredirect	= xfer_vopen,
230
-	.request	= ignore_xfer_request,
231 230
 	.seek		= downloader_xfer_seek,
232 231
 	.deliver_iob	= xfer_deliver_as_raw,
233 232
 	.deliver_raw	= downloader_xfer_deliver_raw,

+ 0
- 1
src/core/hw.c Целия файл

@@ -36,7 +36,6 @@ static void hw_xfer_close ( struct xfer_interface *xfer, int rc ) {
36 36
 static struct xfer_interface_operations hw_xfer_operations = {
37 37
 	.close		= hw_xfer_close,
38 38
 	.vredirect	= ignore_xfer_vredirect,
39
-	.request	= ignore_xfer_request,
40 39
 	.seek		= ignore_xfer_seek,
41 40
 	.deliver_iob	= xfer_deliver_as_raw,
42 41
 	.deliver_raw	= ignore_xfer_deliver_raw,

+ 0
- 1
src/core/posix_io.c Целия файл

@@ -159,7 +159,6 @@ posix_file_xfer_deliver_iob ( struct xfer_interface *xfer,
159 159
 static struct xfer_interface_operations posix_file_xfer_operations = {
160 160
 	.close		= posix_file_xfer_close,
161 161
 	.vredirect	= xfer_vopen,
162
-	.request	= ignore_xfer_request,
163 162
 	.seek		= posix_file_xfer_seek,
164 163
 	.alloc_iob	= default_xfer_alloc_iob,
165 164
 	.deliver_iob	= posix_file_xfer_deliver_iob,

+ 0
- 1
src/core/resolv.c Целия файл

@@ -326,7 +326,6 @@ static int resolv_xfer_seek ( struct xfer_interface *xfer __unused,
326 326
 static struct xfer_interface_operations named_xfer_ops = {
327 327
 	.close		= ignore_xfer_close,
328 328
 	.vredirect	= ignore_xfer_vredirect,
329
-	.request	= ignore_xfer_request,
330 329
 	.seek		= resolv_xfer_seek,
331 330
 	.alloc_iob	= default_xfer_alloc_iob,
332 331
 	.deliver_iob	= xfer_deliver_as_raw,

+ 0
- 43
src/core/xfer.c Целия файл

@@ -85,33 +85,6 @@ int xfer_redirect ( struct xfer_interface *xfer, int type, ... ) {
85 85
 	return rc;
86 86
 }
87 87
 
88
-/**
89
- * Request data
90
- *
91
- * @v xfer		Data transfer interface
92
- * @v offset		Offset to new position
93
- * @v whence		Basis for new position
94
- * @v len		Length of requested data
95
- * @ret rc		Return status code
96
- */
97
-int xfer_request ( struct xfer_interface *xfer, off_t offset, int whence,
98
-		   size_t len ) {
99
-	struct xfer_interface *dest = xfer_get_dest ( xfer );
100
-	int rc;
101
-
102
-	DBGC ( xfer, "XFER %p->%p request %s+%ld %zd\n", xfer, dest,
103
-	       whence_text ( whence ), offset, len );
104
-
105
-	rc = dest->op->request ( dest, offset, whence, len );
106
-
107
-	if ( rc != 0 ) {
108
-		DBGC ( xfer, "XFER %p<-%p request: %s\n", xfer, dest,
109
-		       strerror ( rc ) );
110
-	}
111
-	xfer_put ( dest );
112
-	return rc;
113
-}
114
-
115 88
 /**
116 89
  * Seek to position
117 90
  *
@@ -311,21 +284,6 @@ int ignore_xfer_vredirect ( struct xfer_interface *xfer __unused,
311 284
 	return 0;
312 285
 }
313 286
 
314
-/**
315
- * Ignore request() event
316
- *
317
- * @v xfer		Data transfer interface
318
- * @v offset		Offset to new position
319
- * @v whence		Basis for new position
320
- * @v len		Length of requested data
321
- * @ret rc		Return status code
322
- */
323
-int ignore_xfer_request ( struct xfer_interface *xfer __unused,
324
-			  off_t offset __unused, int whence __unused, 
325
-			  size_t len __unused ) {
326
-	return 0;
327
-}
328
-
329 287
 /**
330 288
  * Ignore seek() event
331 289
  *
@@ -415,7 +373,6 @@ int ignore_xfer_deliver_raw ( struct xfer_interface *xfer,
415 373
 struct xfer_interface_operations null_xfer_ops = {
416 374
 	.close		= ignore_xfer_close,
417 375
 	.vredirect	= ignore_xfer_vredirect,
418
-	.request	= ignore_xfer_request,
419 376
 	.seek		= ignore_xfer_seek,
420 377
 	.alloc_iob	= default_xfer_alloc_iob,
421 378
 	.deliver_iob	= xfer_deliver_as_raw,

+ 0
- 14
src/include/gpxe/xfer.h Целия файл

@@ -32,16 +32,6 @@ struct xfer_interface_operations {
32 32
 	 */
33 33
 	int ( * vredirect ) ( struct xfer_interface *xfer, int type,
34 34
 			      va_list args );
35
-	/** Request data
36
-	 *
37
-	 * @v xfer		Data transfer interface
38
-	 * @v offset		Offset to new position
39
-	 * @v whence		Basis for new position
40
-	 * @v len		Length of requested data
41
-	 * @ret rc		Return status code
42
-	 */
43
-	int ( * request ) ( struct xfer_interface *xfer, off_t offset,
44
-			    int whence, size_t len );
45 35
 	/** Seek to position
46 36
 	 *
47 37
 	 * @v xfer		Data transfer interface
@@ -146,8 +136,6 @@ extern void xfer_close ( struct xfer_interface *xfer, int rc );
146 136
 extern int xfer_vredirect ( struct xfer_interface *xfer, int type,
147 137
 			    va_list args );
148 138
 extern int xfer_redirect ( struct xfer_interface *xfer, int type, ... );
149
-extern int xfer_request ( struct xfer_interface *xfer, off_t offset,
150
-			  int whence, size_t len );
151 139
 extern int xfer_seek ( struct xfer_interface *xfer, off_t offset, int whence );
152 140
 extern int xfer_ready ( struct xfer_interface *xfer );
153 141
 extern struct io_buffer * xfer_alloc_iob ( struct xfer_interface *xfer,
@@ -167,8 +155,6 @@ extern int xfer_printf ( struct xfer_interface *xfer,
167 155
 extern void ignore_xfer_close ( struct xfer_interface *xfer, int rc );
168 156
 extern int ignore_xfer_vredirect ( struct xfer_interface *xfer,
169 157
 				   int type, va_list args );
170
-extern int ignore_xfer_request ( struct xfer_interface *xfer, off_t offset,
171
-				 int whence, size_t len );
172 158
 extern int ignore_xfer_seek ( struct xfer_interface *xfer, off_t offset,
173 159
 			      int whence );
174 160
 extern struct io_buffer * default_xfer_alloc_iob ( struct xfer_interface *xfer,

+ 0
- 1
src/interface/pxe/pxe_udp.c Целия файл

@@ -103,7 +103,6 @@ static int pxe_udp_deliver_iob ( struct xfer_interface *xfer,
103 103
 static struct xfer_interface_operations pxe_udp_xfer_operations = {
104 104
 	.close		= ignore_xfer_close,
105 105
 	.vredirect	= ignore_xfer_vredirect,
106
-	.request	= ignore_xfer_request,
107 106
 	.seek		= ignore_xfer_seek,
108 107
 	.alloc_iob	= default_xfer_alloc_iob,
109 108
 	.deliver_iob	= pxe_udp_deliver_iob,

+ 0
- 1
src/net/tcp.c Целия файл

@@ -951,7 +951,6 @@ static int tcp_xfer_deliver_iob ( struct xfer_interface *xfer,
951 951
 static struct xfer_interface_operations tcp_xfer_operations = {
952 952
 	.close		= tcp_xfer_close,
953 953
 	.vredirect	= ignore_xfer_vredirect,
954
-	.request	= ignore_xfer_request,
955 954
 	.seek		= tcp_xfer_seek,
956 955
 	.alloc_iob	= default_xfer_alloc_iob,
957 956
 	.deliver_iob	= tcp_xfer_deliver_iob,

+ 0
- 3
src/net/tcp/ftp.c Целия файл

@@ -296,7 +296,6 @@ static int ftp_control_deliver_raw ( struct xfer_interface *control,
296 296
 static struct xfer_interface_operations ftp_control_operations = {
297 297
 	.close		= ftp_control_close,
298 298
 	.vredirect	= xfer_vopen,
299
-	.request	= ignore_xfer_request,
300 299
 	.seek		= ignore_xfer_seek,
301 300
 	.alloc_iob	= default_xfer_alloc_iob,
302 301
 	.deliver_iob	= xfer_deliver_as_raw,
@@ -361,7 +360,6 @@ static int ftp_data_deliver_iob ( struct xfer_interface *data,
361 360
 static struct xfer_interface_operations ftp_data_operations = {
362 361
 	.close		= ftp_data_closed,
363 362
 	.vredirect	= xfer_vopen,
364
-	.request	= ignore_xfer_request,
365 363
 	.seek		= ignore_xfer_seek,
366 364
 	.alloc_iob	= default_xfer_alloc_iob,
367 365
 	.deliver_iob	= ftp_data_deliver_iob,
@@ -394,7 +392,6 @@ static void ftp_xfer_closed ( struct xfer_interface *xfer, int rc ) {
394 392
 static struct xfer_interface_operations ftp_xfer_operations = {
395 393
 	.close		= ftp_xfer_closed,
396 394
 	.vredirect	= ignore_xfer_vredirect,
397
-	.request	= ignore_xfer_request,
398 395
 	.seek		= ignore_xfer_seek,
399 396
 	.alloc_iob	= default_xfer_alloc_iob,
400 397
 	.deliver_iob	= xfer_deliver_as_raw,

+ 0
- 2
src/net/tcp/http.c Целия файл

@@ -424,7 +424,6 @@ static void http_socket_close ( struct xfer_interface *socket, int rc ) {
424 424
 static struct xfer_interface_operations http_socket_operations = {
425 425
 	.close		= http_socket_close,
426 426
 	.vredirect	= xfer_vopen,
427
-	.request	= ignore_xfer_request,
428 427
 	.seek		= ignore_xfer_seek,
429 428
 	.alloc_iob	= default_xfer_alloc_iob,
430 429
 	.deliver_iob	= http_socket_deliver_iob,
@@ -451,7 +450,6 @@ static void http_xfer_close ( struct xfer_interface *xfer, int rc ) {
451 450
 static struct xfer_interface_operations http_xfer_operations = {
452 451
 	.close		= http_xfer_close,
453 452
 	.vredirect	= ignore_xfer_vredirect,
454
-	.request	= ignore_xfer_request,
455 453
 	.seek		= ignore_xfer_seek,
456 454
 	.alloc_iob	= default_xfer_alloc_iob,
457 455
 	.deliver_iob	= xfer_deliver_as_raw,

+ 0
- 1
src/net/udp.c Целия файл

@@ -414,7 +414,6 @@ static int udp_xfer_deliver_iob ( struct xfer_interface *xfer,
414 414
 static struct xfer_interface_operations udp_xfer_operations = {
415 415
 	.close		= udp_xfer_close,
416 416
 	.vredirect	= ignore_xfer_vredirect,
417
-	.request	= ignore_xfer_request,
418 417
 	.seek		= ignore_xfer_seek,
419 418
 	.alloc_iob	= udp_alloc_iob,
420 419
 	.deliver_iob	= udp_xfer_deliver_iob,

+ 0
- 1
src/net/udp/dhcp.c Целия файл

@@ -721,7 +721,6 @@ static int dhcp_deliver_raw ( struct xfer_interface *xfer,
721 721
 static struct xfer_interface_operations dhcp_xfer_operations = {
722 722
 	.close		= ignore_xfer_close,
723 723
 	.vredirect	= xfer_vopen,
724
-	.request	= ignore_xfer_request,
725 724
 	.seek		= ignore_xfer_seek,
726 725
 	.deliver_iob	= xfer_deliver_as_raw,
727 726
 	.deliver_raw	= dhcp_deliver_raw,

+ 0
- 1
src/net/udp/dns.c Целия файл

@@ -432,7 +432,6 @@ static void dns_xfer_close ( struct xfer_interface *socket, int rc ) {
432 432
 static struct xfer_interface_operations dns_socket_operations = {
433 433
 	.close		= dns_xfer_close,
434 434
 	.vredirect	= xfer_vopen,
435
-	.request	= ignore_xfer_request,
436 435
 	.seek		= ignore_xfer_seek,
437 436
 	.alloc_iob	= default_xfer_alloc_iob,
438 437
 	.deliver_iob	= xfer_deliver_as_raw,

+ 0
- 2
src/net/udp/tftp.c Целия файл

@@ -582,7 +582,6 @@ static void tftp_socket_close ( struct xfer_interface *socket, int rc ) {
582 582
 static struct xfer_interface_operations tftp_socket_operations = {
583 583
 	.close		= tftp_socket_close,
584 584
 	.vredirect	= xfer_vopen,
585
-	.request	= ignore_xfer_request,
586 585
 	.seek		= ignore_xfer_seek,
587 586
 	.alloc_iob	= default_xfer_alloc_iob,
588 587
 	.deliver_iob	= tftp_socket_deliver_iob,
@@ -609,7 +608,6 @@ static void tftp_xfer_close ( struct xfer_interface *xfer, int rc ) {
609 608
 static struct xfer_interface_operations tftp_xfer_operations = {
610 609
 	.close		= tftp_xfer_close,
611 610
 	.vredirect	= ignore_xfer_vredirect,
612
-	.request	= ignore_xfer_request,
613 611
 	.seek		= ignore_xfer_seek,
614 612
 	.alloc_iob	= default_xfer_alloc_iob,
615 613
 	.deliver_iob	= xfer_deliver_as_raw,

Loading…
Отказ
Запис