[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] libxl: drop bootloader output if xenconsole file descriptor is not available for writing
2011/10/10 Andrew Cooper <andrew.cooper3@xxxxxxxxxx>: > > > On 10/10/11 15:04, Roger Pau Monne wrote: >> # HG changeset patch >> # User Roger Pau Monne <roger.pau@xxxxxxxxxxxxx> >> # Date 1318255452 -7200 >> # Node ID 1ebcb5d27ead38d6713d865704394ca99444f93c >> # Parent Âa5b8d5c8c98e0dd17368eea1801a8edaf1e79e69 >> libxl: drop bootloader output if xenconsole file descriptor is not available >> for writing. >> >> Drop output from bootloader if the pty buffer is full and we cannot write >> more data. Prevents the bootloader from getting stuck when using ptys with >> small buffers. >> >> Signed-off-by: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx> >> >> diff -r a5b8d5c8c98e -r 1ebcb5d27ead tools/libxl/libxl_bootloader.c >> --- a/tools/libxl/libxl_bootloader.c ÂMon Oct 10 11:26:22 2011 +0200 >> +++ b/tools/libxl/libxl_bootloader.c ÂMon Oct 10 16:04:12 2011 +0200 >> @@ -169,6 +169,7 @@ static char * bootloader_interact(libxl_ >> >> Â Â Âsize_t nr_out = 0, size_out = 0; >> Â Â Âchar *output = NULL; >> + Â Âstruct timeval timeout; >> >> Â Â Â/* input from xenconsole. read on xenconsoled_fd write to bootloader_fd >> */ >> Â Â Âint xenconsoled_prod = 0, xenconsoled_cons = 0; >> @@ -177,9 +178,14 @@ static char * bootloader_interact(libxl_ >> Â Â Âint bootloader_prod = 0, bootloader_cons = 0; >> Â Â Âchar bootloader_buf[BOOTLOADER_BUF_SIZE]; >> >> + Â Â/* Set timeout to 1s before starting to discard data */ >> + Â Âtimeout.tv_sec = 1; >> + Â Âtimeout.tv_usec = 0; >> + >> Â Â Âwhile(1) { >> Â Â Â Â Âfd_set wsel, rsel; >> Â Â Â Â Âint nfds; >> + Â Â Â Âint space; > > You appear to introduce an unreferenced variable here. Yes I've missed that one, sorry, second patch is ok. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |