Browse Source

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

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
ca4c6f9eee

+ 0
- 1
src/core/downloader.c View File

227
 static struct xfer_interface_operations downloader_xfer_operations = {
227
 static struct xfer_interface_operations downloader_xfer_operations = {
228
 	.close		= downloader_xfer_close,
228
 	.close		= downloader_xfer_close,
229
 	.vredirect	= xfer_vopen,
229
 	.vredirect	= xfer_vopen,
230
-	.request	= ignore_xfer_request,
231
 	.seek		= downloader_xfer_seek,
230
 	.seek		= downloader_xfer_seek,
232
 	.deliver_iob	= xfer_deliver_as_raw,
231
 	.deliver_iob	= xfer_deliver_as_raw,
233
 	.deliver_raw	= downloader_xfer_deliver_raw,
232
 	.deliver_raw	= downloader_xfer_deliver_raw,

+ 0
- 1
src/core/hw.c View File

36
 static struct xfer_interface_operations hw_xfer_operations = {
36
 static struct xfer_interface_operations hw_xfer_operations = {
37
 	.close		= hw_xfer_close,
37
 	.close		= hw_xfer_close,
38
 	.vredirect	= ignore_xfer_vredirect,
38
 	.vredirect	= ignore_xfer_vredirect,
39
-	.request	= ignore_xfer_request,
40
 	.seek		= ignore_xfer_seek,
39
 	.seek		= ignore_xfer_seek,
41
 	.deliver_iob	= xfer_deliver_as_raw,
40
 	.deliver_iob	= xfer_deliver_as_raw,
42
 	.deliver_raw	= ignore_xfer_deliver_raw,
41
 	.deliver_raw	= ignore_xfer_deliver_raw,

+ 0
- 1
src/core/posix_io.c View File

159
 static struct xfer_interface_operations posix_file_xfer_operations = {
159
 static struct xfer_interface_operations posix_file_xfer_operations = {
160
 	.close		= posix_file_xfer_close,
160
 	.close		= posix_file_xfer_close,
161
 	.vredirect	= xfer_vopen,
161
 	.vredirect	= xfer_vopen,
162
-	.request	= ignore_xfer_request,
163
 	.seek		= posix_file_xfer_seek,
162
 	.seek		= posix_file_xfer_seek,
164
 	.alloc_iob	= default_xfer_alloc_iob,
163
 	.alloc_iob	= default_xfer_alloc_iob,
165
 	.deliver_iob	= posix_file_xfer_deliver_iob,
164
 	.deliver_iob	= posix_file_xfer_deliver_iob,

+ 0
- 1
src/core/resolv.c View File

326
 static struct xfer_interface_operations named_xfer_ops = {
326
 static struct xfer_interface_operations named_xfer_ops = {
327
 	.close		= ignore_xfer_close,
327
 	.close		= ignore_xfer_close,
328
 	.vredirect	= ignore_xfer_vredirect,
328
 	.vredirect	= ignore_xfer_vredirect,
329
-	.request	= ignore_xfer_request,
330
 	.seek		= resolv_xfer_seek,
329
 	.seek		= resolv_xfer_seek,
331
 	.alloc_iob	= default_xfer_alloc_iob,
330
 	.alloc_iob	= default_xfer_alloc_iob,
332
 	.deliver_iob	= xfer_deliver_as_raw,
331
 	.deliver_iob	= xfer_deliver_as_raw,

+ 0
- 43
src/core/xfer.c View File

85
 	return rc;
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
  * Seek to position
89
  * Seek to position
117
  *
90
  *
311
 	return 0;
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
  * Ignore seek() event
288
  * Ignore seek() event
331
  *
289
  *
415
 struct xfer_interface_operations null_xfer_ops = {
373
 struct xfer_interface_operations null_xfer_ops = {
416
 	.close		= ignore_xfer_close,
374
 	.close		= ignore_xfer_close,
417
 	.vredirect	= ignore_xfer_vredirect,
375
 	.vredirect	= ignore_xfer_vredirect,
418
-	.request	= ignore_xfer_request,
419
 	.seek		= ignore_xfer_seek,
376
 	.seek		= ignore_xfer_seek,
420
 	.alloc_iob	= default_xfer_alloc_iob,
377
 	.alloc_iob	= default_xfer_alloc_iob,
421
 	.deliver_iob	= xfer_deliver_as_raw,
378
 	.deliver_iob	= xfer_deliver_as_raw,

+ 0
- 14
src/include/gpxe/xfer.h View File

32
 	 */
32
 	 */
33
 	int ( * vredirect ) ( struct xfer_interface *xfer, int type,
33
 	int ( * vredirect ) ( struct xfer_interface *xfer, int type,
34
 			      va_list args );
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
 	/** Seek to position
35
 	/** Seek to position
46
 	 *
36
 	 *
47
 	 * @v xfer		Data transfer interface
37
 	 * @v xfer		Data transfer interface
146
 extern int xfer_vredirect ( struct xfer_interface *xfer, int type,
136
 extern int xfer_vredirect ( struct xfer_interface *xfer, int type,
147
 			    va_list args );
137
 			    va_list args );
148
 extern int xfer_redirect ( struct xfer_interface *xfer, int type, ... );
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
 extern int xfer_seek ( struct xfer_interface *xfer, off_t offset, int whence );
139
 extern int xfer_seek ( struct xfer_interface *xfer, off_t offset, int whence );
152
 extern int xfer_ready ( struct xfer_interface *xfer );
140
 extern int xfer_ready ( struct xfer_interface *xfer );
153
 extern struct io_buffer * xfer_alloc_iob ( struct xfer_interface *xfer,
141
 extern struct io_buffer * xfer_alloc_iob ( struct xfer_interface *xfer,
167
 extern void ignore_xfer_close ( struct xfer_interface *xfer, int rc );
155
 extern void ignore_xfer_close ( struct xfer_interface *xfer, int rc );
168
 extern int ignore_xfer_vredirect ( struct xfer_interface *xfer,
156
 extern int ignore_xfer_vredirect ( struct xfer_interface *xfer,
169
 				   int type, va_list args );
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
 extern int ignore_xfer_seek ( struct xfer_interface *xfer, off_t offset,
158
 extern int ignore_xfer_seek ( struct xfer_interface *xfer, off_t offset,
173
 			      int whence );
159
 			      int whence );
174
 extern struct io_buffer * default_xfer_alloc_iob ( struct xfer_interface *xfer,
160
 extern struct io_buffer * default_xfer_alloc_iob ( struct xfer_interface *xfer,

+ 0
- 1
src/interface/pxe/pxe_udp.c View File

103
 static struct xfer_interface_operations pxe_udp_xfer_operations = {
103
 static struct xfer_interface_operations pxe_udp_xfer_operations = {
104
 	.close		= ignore_xfer_close,
104
 	.close		= ignore_xfer_close,
105
 	.vredirect	= ignore_xfer_vredirect,
105
 	.vredirect	= ignore_xfer_vredirect,
106
-	.request	= ignore_xfer_request,
107
 	.seek		= ignore_xfer_seek,
106
 	.seek		= ignore_xfer_seek,
108
 	.alloc_iob	= default_xfer_alloc_iob,
107
 	.alloc_iob	= default_xfer_alloc_iob,
109
 	.deliver_iob	= pxe_udp_deliver_iob,
108
 	.deliver_iob	= pxe_udp_deliver_iob,

+ 0
- 1
src/net/tcp.c View File

951
 static struct xfer_interface_operations tcp_xfer_operations = {
951
 static struct xfer_interface_operations tcp_xfer_operations = {
952
 	.close		= tcp_xfer_close,
952
 	.close		= tcp_xfer_close,
953
 	.vredirect	= ignore_xfer_vredirect,
953
 	.vredirect	= ignore_xfer_vredirect,
954
-	.request	= ignore_xfer_request,
955
 	.seek		= tcp_xfer_seek,
954
 	.seek		= tcp_xfer_seek,
956
 	.alloc_iob	= default_xfer_alloc_iob,
955
 	.alloc_iob	= default_xfer_alloc_iob,
957
 	.deliver_iob	= tcp_xfer_deliver_iob,
956
 	.deliver_iob	= tcp_xfer_deliver_iob,

+ 0
- 3
src/net/tcp/ftp.c View File

296
 static struct xfer_interface_operations ftp_control_operations = {
296
 static struct xfer_interface_operations ftp_control_operations = {
297
 	.close		= ftp_control_close,
297
 	.close		= ftp_control_close,
298
 	.vredirect	= xfer_vopen,
298
 	.vredirect	= xfer_vopen,
299
-	.request	= ignore_xfer_request,
300
 	.seek		= ignore_xfer_seek,
299
 	.seek		= ignore_xfer_seek,
301
 	.alloc_iob	= default_xfer_alloc_iob,
300
 	.alloc_iob	= default_xfer_alloc_iob,
302
 	.deliver_iob	= xfer_deliver_as_raw,
301
 	.deliver_iob	= xfer_deliver_as_raw,
361
 static struct xfer_interface_operations ftp_data_operations = {
360
 static struct xfer_interface_operations ftp_data_operations = {
362
 	.close		= ftp_data_closed,
361
 	.close		= ftp_data_closed,
363
 	.vredirect	= xfer_vopen,
362
 	.vredirect	= xfer_vopen,
364
-	.request	= ignore_xfer_request,
365
 	.seek		= ignore_xfer_seek,
363
 	.seek		= ignore_xfer_seek,
366
 	.alloc_iob	= default_xfer_alloc_iob,
364
 	.alloc_iob	= default_xfer_alloc_iob,
367
 	.deliver_iob	= ftp_data_deliver_iob,
365
 	.deliver_iob	= ftp_data_deliver_iob,
394
 static struct xfer_interface_operations ftp_xfer_operations = {
392
 static struct xfer_interface_operations ftp_xfer_operations = {
395
 	.close		= ftp_xfer_closed,
393
 	.close		= ftp_xfer_closed,
396
 	.vredirect	= ignore_xfer_vredirect,
394
 	.vredirect	= ignore_xfer_vredirect,
397
-	.request	= ignore_xfer_request,
398
 	.seek		= ignore_xfer_seek,
395
 	.seek		= ignore_xfer_seek,
399
 	.alloc_iob	= default_xfer_alloc_iob,
396
 	.alloc_iob	= default_xfer_alloc_iob,
400
 	.deliver_iob	= xfer_deliver_as_raw,
397
 	.deliver_iob	= xfer_deliver_as_raw,

+ 0
- 2
src/net/tcp/http.c View File

424
 static struct xfer_interface_operations http_socket_operations = {
424
 static struct xfer_interface_operations http_socket_operations = {
425
 	.close		= http_socket_close,
425
 	.close		= http_socket_close,
426
 	.vredirect	= xfer_vopen,
426
 	.vredirect	= xfer_vopen,
427
-	.request	= ignore_xfer_request,
428
 	.seek		= ignore_xfer_seek,
427
 	.seek		= ignore_xfer_seek,
429
 	.alloc_iob	= default_xfer_alloc_iob,
428
 	.alloc_iob	= default_xfer_alloc_iob,
430
 	.deliver_iob	= http_socket_deliver_iob,
429
 	.deliver_iob	= http_socket_deliver_iob,
451
 static struct xfer_interface_operations http_xfer_operations = {
450
 static struct xfer_interface_operations http_xfer_operations = {
452
 	.close		= http_xfer_close,
451
 	.close		= http_xfer_close,
453
 	.vredirect	= ignore_xfer_vredirect,
452
 	.vredirect	= ignore_xfer_vredirect,
454
-	.request	= ignore_xfer_request,
455
 	.seek		= ignore_xfer_seek,
453
 	.seek		= ignore_xfer_seek,
456
 	.alloc_iob	= default_xfer_alloc_iob,
454
 	.alloc_iob	= default_xfer_alloc_iob,
457
 	.deliver_iob	= xfer_deliver_as_raw,
455
 	.deliver_iob	= xfer_deliver_as_raw,

+ 0
- 1
src/net/udp.c View File

414
 static struct xfer_interface_operations udp_xfer_operations = {
414
 static struct xfer_interface_operations udp_xfer_operations = {
415
 	.close		= udp_xfer_close,
415
 	.close		= udp_xfer_close,
416
 	.vredirect	= ignore_xfer_vredirect,
416
 	.vredirect	= ignore_xfer_vredirect,
417
-	.request	= ignore_xfer_request,
418
 	.seek		= ignore_xfer_seek,
417
 	.seek		= ignore_xfer_seek,
419
 	.alloc_iob	= udp_alloc_iob,
418
 	.alloc_iob	= udp_alloc_iob,
420
 	.deliver_iob	= udp_xfer_deliver_iob,
419
 	.deliver_iob	= udp_xfer_deliver_iob,

+ 0
- 1
src/net/udp/dhcp.c View File

721
 static struct xfer_interface_operations dhcp_xfer_operations = {
721
 static struct xfer_interface_operations dhcp_xfer_operations = {
722
 	.close		= ignore_xfer_close,
722
 	.close		= ignore_xfer_close,
723
 	.vredirect	= xfer_vopen,
723
 	.vredirect	= xfer_vopen,
724
-	.request	= ignore_xfer_request,
725
 	.seek		= ignore_xfer_seek,
724
 	.seek		= ignore_xfer_seek,
726
 	.deliver_iob	= xfer_deliver_as_raw,
725
 	.deliver_iob	= xfer_deliver_as_raw,
727
 	.deliver_raw	= dhcp_deliver_raw,
726
 	.deliver_raw	= dhcp_deliver_raw,

+ 0
- 1
src/net/udp/dns.c View File

432
 static struct xfer_interface_operations dns_socket_operations = {
432
 static struct xfer_interface_operations dns_socket_operations = {
433
 	.close		= dns_xfer_close,
433
 	.close		= dns_xfer_close,
434
 	.vredirect	= xfer_vopen,
434
 	.vredirect	= xfer_vopen,
435
-	.request	= ignore_xfer_request,
436
 	.seek		= ignore_xfer_seek,
435
 	.seek		= ignore_xfer_seek,
437
 	.alloc_iob	= default_xfer_alloc_iob,
436
 	.alloc_iob	= default_xfer_alloc_iob,
438
 	.deliver_iob	= xfer_deliver_as_raw,
437
 	.deliver_iob	= xfer_deliver_as_raw,

+ 0
- 2
src/net/udp/tftp.c View File

582
 static struct xfer_interface_operations tftp_socket_operations = {
582
 static struct xfer_interface_operations tftp_socket_operations = {
583
 	.close		= tftp_socket_close,
583
 	.close		= tftp_socket_close,
584
 	.vredirect	= xfer_vopen,
584
 	.vredirect	= xfer_vopen,
585
-	.request	= ignore_xfer_request,
586
 	.seek		= ignore_xfer_seek,
585
 	.seek		= ignore_xfer_seek,
587
 	.alloc_iob	= default_xfer_alloc_iob,
586
 	.alloc_iob	= default_xfer_alloc_iob,
588
 	.deliver_iob	= tftp_socket_deliver_iob,
587
 	.deliver_iob	= tftp_socket_deliver_iob,
609
 static struct xfer_interface_operations tftp_xfer_operations = {
608
 static struct xfer_interface_operations tftp_xfer_operations = {
610
 	.close		= tftp_xfer_close,
609
 	.close		= tftp_xfer_close,
611
 	.vredirect	= ignore_xfer_vredirect,
610
 	.vredirect	= ignore_xfer_vredirect,
612
-	.request	= ignore_xfer_request,
613
 	.seek		= ignore_xfer_seek,
611
 	.seek		= ignore_xfer_seek,
614
 	.alloc_iob	= default_xfer_alloc_iob,
612
 	.alloc_iob	= default_xfer_alloc_iob,
615
 	.deliver_iob	= xfer_deliver_as_raw,
613
 	.deliver_iob	= xfer_deliver_as_raw,

Loading…
Cancel
Save