Pārlūkot izejas kodu

[downloader] Provide direct access to the underlying data transfer buffer

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 9 gadus atpakaļ
vecāks
revīzija
2b15ae5507
1 mainītis faili ar 14 papildinājumiem un 0 dzēšanām
  1. 14
    0
      src/core/downloader.c

+ 14
- 0
src/core/downloader.c Parādīt failu

@@ -153,9 +153,23 @@ static int downloader_xfer_deliver ( struct downloader *downloader,
153 153
 	return rc;
154 154
 }
155 155
 
156
+/**
157
+ * Get underlying data transfer buffer
158
+ *
159
+ * @v downloader	Downloader
160
+ * @ret xferbuf		Data transfer buffer, or NULL on error
161
+ */
162
+static struct xfer_buffer *
163
+downloader_xfer_buffer ( struct downloader *downloader ) {
164
+
165
+	/* Provide direct access to underlying data transfer buffer */
166
+	return &downloader->buffer;
167
+}
168
+
156 169
 /** Downloader data transfer interface operations */
157 170
 static struct interface_operation downloader_xfer_operations[] = {
158 171
 	INTF_OP ( xfer_deliver, struct downloader *, downloader_xfer_deliver ),
172
+	INTF_OP ( xfer_buffer, struct downloader *, downloader_xfer_buffer ),
159 173
 	INTF_OP ( intf_close, struct downloader *, downloader_finished ),
160 174
 };
161 175
 

Notiek ielāde…
Atcelt
Saglabāt