diff options
| author | Michael Brown | 2007-01-29 05:12:29 +0100 |
|---|---|---|
| committer | Michael Brown | 2007-01-29 05:12:29 +0100 |
| commit | c42a38470992c70716b683968bc8479df90ad984 (patch) | |
| tree | 43397a190c2c83ec20df5df92e11be6018f8160f /src/include/gpxe | |
| parent | Should be correct for building RSA (diff) | |
| download | ipxe-c42a38470992c70716b683968bc8479df90ad984.tar.gz ipxe-c42a38470992c70716b683968bc8479df90ad984.tar.xz ipxe-c42a38470992c70716b683968bc8479df90ad984.zip | |
Moved most buffer debug messages to DBG2.
Make expand_buffer() a non-inline function, so that we can add debug
messages.
Expandable buffers now don't *always* round up to the next power of two.
This allows e.g. loading a 137MB ISO image on a machine with only 256MB
RAM...
Diffstat (limited to 'src/include/gpxe')
| -rw-r--r-- | src/include/gpxe/buffer.h | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/include/gpxe/buffer.h b/src/include/gpxe/buffer.h index 72c0846ac..cb7c0870e 100644 --- a/src/include/gpxe/buffer.h +++ b/src/include/gpxe/buffer.h @@ -101,25 +101,6 @@ struct buffer { extern int fill_buffer ( struct buffer *buffer, const void *data, size_t offset, size_t len ); - -/** Expand data buffer - * - * @v buffer Data buffer - * @v new_len New length - * @ret rc Return status code - * - * Expand the data buffer to accommodate more data. Some buffers may - * not support being expanded. - */ -static inline int expand_buffer ( struct buffer *buffer, size_t new_len ) { - - if ( new_len <= buffer->len ) - return 0; - - if ( ! buffer->expand ) - return -ENOBUFS; - - return buffer->expand ( buffer, new_len ); -} +extern int expand_buffer ( struct buffer *buffer, size_t new_len ); #endif /* _GPXE_BUFFER_H */ |
