Merge branch 'master' of rom.etherboot.org:/pub/scm/gpxe

This commit is contained in:
Michael Brown
2008-01-22 18:53:01 +00:00
24 changed files with 254 additions and 226 deletions

View File

@@ -1022,7 +1022,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,
.seek = ignore_xfer_seek,
.window = tcp_xfer_window,
.alloc_iob = default_xfer_alloc_iob,
.deliver_iob = tcp_xfer_deliver_iob,

View File

@@ -299,7 +299,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,
.seek = ignore_xfer_seek,
.window = unlimited_xfer_window,
.alloc_iob = default_xfer_alloc_iob,
.deliver_iob = xfer_deliver_as_raw,
@@ -364,7 +363,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,
.seek = ignore_xfer_seek,
.window = unlimited_xfer_window,
.alloc_iob = default_xfer_alloc_iob,
.deliver_iob = ftp_data_deliver_iob,
@@ -397,7 +395,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,
.seek = ignore_xfer_seek,
.window = unlimited_xfer_window,
.alloc_iob = default_xfer_alloc_iob,
.deliver_iob = xfer_deliver_as_raw,

View File

@@ -426,7 +426,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,
.seek = ignore_xfer_seek,
.window = unlimited_xfer_window,
.alloc_iob = default_xfer_alloc_iob,
.deliver_iob = http_socket_deliver_iob,
@@ -453,7 +452,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,
.seek = ignore_xfer_seek,
.window = unlimited_xfer_window,
.alloc_iob = default_xfer_alloc_iob,
.deliver_iob = xfer_deliver_as_raw,

View File

@@ -684,7 +684,7 @@ static int iscsi_handle_chap_c_value ( struct iscsi_session *iscsi,
/* Process challenge an octet at a time */
for ( ; ( value[0] && value[1] ) ; value += 2 ) {
memcpy ( buf, value, 2 );
buf[3] = 0;
buf[2] = 0;
byte = strtoul ( buf, &endp, 16 );
if ( *endp != '\0' ) {
DBGC ( iscsi, "iSCSI %p saw invalid CHAP challenge "
@@ -1322,7 +1322,6 @@ static int iscsi_vredirect ( struct xfer_interface *socket, int type,
static struct xfer_interface_operations iscsi_socket_operations = {
.close = iscsi_socket_close,
.vredirect = iscsi_vredirect,
.seek = ignore_xfer_seek,
.window = unlimited_xfer_window,
.alloc_iob = default_xfer_alloc_iob,
.deliver_iob = xfer_deliver_as_raw,

View File

@@ -1460,7 +1460,6 @@ static int tls_plainstream_deliver_raw ( struct xfer_interface *xfer,
static struct xfer_interface_operations tls_plainstream_operations = {
.close = tls_plainstream_close,
.vredirect = ignore_xfer_vredirect,
.seek = filter_seek,
.window = tls_plainstream_window,
.alloc_iob = default_xfer_alloc_iob,
.deliver_iob = xfer_deliver_as_raw,
@@ -1600,7 +1599,6 @@ static int tls_cipherstream_deliver_raw ( struct xfer_interface *xfer,
static struct xfer_interface_operations tls_cipherstream_operations = {
.close = tls_cipherstream_close,
.vredirect = xfer_vopen,
.seek = filter_seek,
.window = filter_window,
.alloc_iob = default_xfer_alloc_iob,
.deliver_iob = xfer_deliver_as_raw,

View File

@@ -415,7 +415,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,
.seek = ignore_xfer_seek,
.window = unlimited_xfer_window,
.alloc_iob = udp_alloc_iob,
.deliver_iob = udp_xfer_deliver_iob,

View File

@@ -368,11 +368,11 @@ static size_t dhcp_field_len ( const void *data, size_t max_len ) {
* @v max_len Field length
* @v tag DHCP option tag, or 0
*
* If @c tag is non-zero, the field will be treated as a
* NUL-terminated string representing the value of the specified DHCP
* option. If @c tag is zero, the field will be treated as a block of
* DHCP options, and simply appended to the existing options in the
* option block.
* If @c tag is non-zero (and the field is not empty), the field will
* be treated as a NUL-terminated string representing the value of the
* specified DHCP option. If @c tag is zero, the field will be
* treated as a block of DHCP options, and simply appended to the
* existing options in the option block.
*
* The caller must ensure that there is enough space in the options
* block to perform the merge.
@@ -385,7 +385,9 @@ static void merge_dhcp_field ( struct dhcp_option_block *options,
struct dhcp_option *end;
if ( tag ) {
set_dhcp_option ( options, tag, data, strlen ( data ) );
len = strlen ( data );
if ( len )
set_dhcp_option ( options, tag, data, len );
} else {
len = dhcp_field_len ( data, max_len );
dest = ( options->data + options->len - 1 );
@@ -925,8 +927,8 @@ static int dhcp_deliver_raw ( struct xfer_interface *xfer,
static struct xfer_interface_operations dhcp_xfer_operations = {
.close = ignore_xfer_close,
.vredirect = xfer_vopen,
.seek = ignore_xfer_seek,
.window = unlimited_xfer_window,
.alloc_iob = default_xfer_alloc_iob,
.deliver_iob = xfer_deliver_as_raw,
.deliver_raw = dhcp_deliver_raw,
};

View File

@@ -435,7 +435,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,
.seek = ignore_xfer_seek,
.window = unlimited_xfer_window,
.alloc_iob = default_xfer_alloc_iob,
.deliver_iob = xfer_deliver_as_raw,

View File

@@ -703,6 +703,7 @@ static int tftp_rx_oack ( struct tftp_request *tftp, void *buf, size_t len ) {
static int tftp_rx_data ( struct tftp_request *tftp,
struct io_buffer *iobuf ) {
struct tftp_data *data = iobuf->data;
struct xfer_metadata meta;
int block;
off_t offset;
size_t data_len;
@@ -729,8 +730,10 @@ static int tftp_rx_data ( struct tftp_request *tftp,
}
/* Deliver data */
xfer_seek ( &tftp->xfer, offset, SEEK_SET );
rc = xfer_deliver_iob ( &tftp->xfer, iobuf );
memset ( &meta, 0, sizeof ( meta ) );
meta.whence = SEEK_SET;
meta.offset = offset;
rc = xfer_deliver_iob_meta ( &tftp->xfer, iobuf, &meta );
iobuf = NULL;
if ( rc != 0 ) {
DBGC ( tftp, "TFTP %p could not deliver data: %s\n",
@@ -909,7 +912,6 @@ static int tftp_socket_deliver_iob ( struct xfer_interface *socket,
static struct xfer_interface_operations tftp_socket_operations = {
.close = ignore_xfer_close,
.vredirect = xfer_vopen,
.seek = ignore_xfer_seek,
.window = unlimited_xfer_window,
.alloc_iob = default_xfer_alloc_iob,
.deliver_iob = tftp_socket_deliver_iob,
@@ -937,7 +939,6 @@ static int tftp_mc_socket_deliver_iob ( struct xfer_interface *mc_socket,
static struct xfer_interface_operations tftp_mc_socket_operations = {
.close = ignore_xfer_close,
.vredirect = xfer_vopen,
.seek = ignore_xfer_seek,
.window = unlimited_xfer_window,
.alloc_iob = default_xfer_alloc_iob,
.deliver_iob = tftp_mc_socket_deliver_iob,
@@ -964,7 +965,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,
.seek = ignore_xfer_seek,
.window = unlimited_xfer_window,
.alloc_iob = default_xfer_alloc_iob,
.deliver_iob = xfer_deliver_as_raw,