X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=qemu%2Froms%2Fipxe%2Fsrc%2Finclude%2Fipxe%2Flinebuf.h;h=630278a047e8ac0197693bb7df13c2308e9a3512;hb=a14b48d18a9ed03ec191cf16b162206998a895ce;hp=706ef2554c00ae67275cc5cc01d2468d6e627cd8;hpb=e44e3482bdb4d0ebde2d8b41830ac2cdb07948fb;p=kvmfornfv.git diff --git a/qemu/roms/ipxe/src/include/ipxe/linebuf.h b/qemu/roms/ipxe/src/include/ipxe/linebuf.h index 706ef2554..630278a04 100644 --- a/qemu/roms/ipxe/src/include/ipxe/linebuf.h +++ b/qemu/roms/ipxe/src/include/ipxe/linebuf.h @@ -7,24 +7,24 @@ * */ -FILE_LICENCE ( GPL2_OR_LATER ); +FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); #include #include /** A line buffer */ struct line_buffer { - /** Current string in the buffer */ + /** Data buffer */ char *data; - /** Length of current string, excluding the terminating NUL */ + /** Length of buffered data */ size_t len; - /** String is ready to read */ - int ready; + /** Most recently consumed length */ + size_t consumed; }; extern char * buffered_line ( struct line_buffer *linebuf ); -extern ssize_t line_buffer ( struct line_buffer *linebuf, - const char *data, size_t len ); +extern int line_buffer ( struct line_buffer *linebuf, + const char *data, size_t len ); extern void empty_line_buffer ( struct line_buffer *linebuf ); #endif /* _IPXE_LINEBUF_H */