Displaying 1 result from an estimated 1 matches for "bootloader_cons".
2011 Oct 11
5
[PATCH] libxl: reimplement buffer for bootloading and drop data if buffer is full
...t = 0, size_out = 0;
     char *output = NULL;
+    struct timeval wait;
 
     /* input from xenconsole. read on xenconsoled_fd write to bootloader_fd */
     int xenconsoled_prod = 0, xenconsoled_cons = 0;
@@ -177,6 +180,10 @@ 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 */
+    wait.tv_sec = BOOTLOADER_TIMEOUT;
+    wait.tv_usec = 0;
+
     while(1) {
         fd_set wsel, rsel;
         int nfds;
@@ -185,15 +192,26 @@ static char * bootloader_interact(l...