mirror of
https://github.com/ipxe/ipxe
synced 2025-12-19 02:50:25 +03:00
Allow buffers to be pre-expanded on demand.
This commit is contained in:
@@ -167,11 +167,7 @@ int fill_buffer ( struct buffer *buffer, const void *data,
|
||||
|
||||
/* Check that block fits within buffer, expand if necessary */
|
||||
if ( data_end > buffer->len ) {
|
||||
if ( ! buffer->expand ) {
|
||||
DBGC ( buffer, "BUFFER %p not expandable\n", buffer );
|
||||
return -ENOBUFS;
|
||||
}
|
||||
if ( ( rc = buffer->expand ( buffer, data_end ) ) != 0 ) {
|
||||
if ( ( rc = expand_buffer ( buffer, data_end ) ) != 0 ) {
|
||||
DBGC ( buffer, "BUFFER %p could not expand :%s\n",
|
||||
buffer, strerror ( rc ) );
|
||||
return rc;
|
||||
|
||||
Reference in New Issue
Block a user