aboutsummaryrefslogtreecommitdiffstats
path: root/core/fs/pxe/tcp.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2011-05-01 18:40:45 -0700
committerH. Peter Anvin <hpa@zytor.com>2011-05-01 18:40:45 -0700
commitefd2d8b54c4fa38ae9a036d5bce72baca4c9cce1 (patch)
treeec001cab158ff2cf3e2ea5a774a5ef3d4402bf47 /core/fs/pxe/tcp.c
parent275abcfb66c764bbc7b0d07ec9b63e6fda63ec3a (diff)
downloadsyslinux-efd2d8b54c4fa38ae9a036d5bce72baca4c9cce1.tar.gz
syslinux-efd2d8b54c4fa38ae9a036d5bce72baca4c9cce1.tar.xz
syslinux-efd2d8b54c4fa38ae9a036d5bce72baca4c9cce1.zip
pxe: move the per-connection-type operations into a structure
Move the per-connection-type operations into a structure, to make it easier to modify them in the future. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core/fs/pxe/tcp.c')
-rw-r--r--core/fs/pxe/tcp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/fs/pxe/tcp.c b/core/fs/pxe/tcp.c
index 759ec9f3..daff4d70 100644
--- a/core/fs/pxe/tcp.c
+++ b/core/fs/pxe/tcp.c
@@ -56,7 +56,7 @@ void tcp_fill_buffer(struct inode *inode)
socket->tftp_goteof = 1;
if (inode->size == -1)
inode->size = socket->tftp_filepos;
- socket->close(inode);
+ socket->ops->close(inode);
return;
}
}
@@ -71,3 +71,8 @@ void tcp_fill_buffer(struct inode *inode)
socket->tftp_bytesleft = len;
return;
}
+
+const struct pxe_conn_ops tcp_conn_ops = {
+ .fill_buffer = tcp_fill_buffer,
+ .close = tcp_close_file,
+};