*** usplash.c.bak	2006-04-19 11:13:55.000000000 +0200
--- usplash.c	2006-05-14 11:34:59.000000000 +0200
***************
*** 43,50 ****
  #define TEXT_WIDTH TEXT_X2-TEXT_X1
  #define TEXT_HEIGHT TEXT_Y2-TEXT_Y1
  
  int pipe_fd;
! char command[4096];
  
  extern struct bogl_font font_helvB10;
  struct bogl_pixmap* pixmap_usplash_artwork;
--- 43,53 ----
  #define TEXT_WIDTH TEXT_X2-TEXT_X1
  #define TEXT_HEIGHT TEXT_Y2-TEXT_Y1
  
+ #define MAX_COMMAND_LENGTH 4096
+ 
  int pipe_fd;
! char command[MAX_COMMAND_LENGTH];
! char saved_text[MAX_COMMAND_LENGTH];
  
  extern struct bogl_font font_helvB10;
  struct bogl_pixmap* pixmap_usplash_artwork;
***************
*** 129,134 ****
--- 132,139 ----
  
  	left_edge = (bogl_xres - 640) / 2;
  	top_edge  = (bogl_yres - 400) / 2;
+ 	
+ 	memset(saved_text, 0, sizeof(saved_text));
  
  	draw_image(pixmap_usplash_artwork);
  
***************
*** 236,255 ****
  	command = strtok(string," ");
  
  	if (strcmp(command,"TEXT")==0) {
! 		char *line = strtok(NULL,"\0");
! 		int length = strlen(line);		
! 		while (length>50) {
! 			draw_text(line,50);
! 			line+=50;
! 			length-=50;
! 		}
! 		draw_text(line,length);
  	} else if (strcmp(command,"STATUS")==0) {
! 		draw_status(strtok(NULL,"\0"),0);
  	} else if (strcmp(command,"SUCCESS")==0) {
! 		draw_status(strtok(NULL,"\0"),TEXT_FOREGROUND);
  	} else if (strcmp(command,"FAILURE")==0) {
! 		draw_status(strtok(NULL,"\0"),RED);
  	} else if (strcmp(command,"PROGRESS")==0) {
  		draw_progress(atoi(strtok(NULL,"\0")));
  	} else if (strcmp(command,"CLEAR")==0) {
--- 241,269 ----
  	command = strtok(string," ");
  
  	if (strcmp(command,"TEXT")==0) {
! 		// store the text, we'll show it on failure
! 		strncpy(saved_text, strtok(NULL, "\0"), sizeof(saved_text));
  	} else if (strcmp(command,"STATUS")==0) {
! 		// ignore normal status messages
  	} else if (strcmp(command,"SUCCESS")==0) {
! 		// ignore success messages
  	} else if (strcmp(command,"FAILURE")==0) {
! 		// show the saved text if any
! 		if(strlen(saved_text) > 0) {
! 			// draw the line of text
! 			char* line = saved_text;
! 			int length = strlen(line);		
! 			while (length>50) {
! 				draw_text(line,50);
! 				line+=50;
! 				length-=50;
! 			}
! 			draw_text(line,length);
! 			
! 			// draw failure text, clear saved text
! 			draw_status(strtok(NULL, "\0"),RED);
! 			memset(saved_text, 0, sizeof(saved_text));
! 		}
  	} else if (strcmp(command,"PROGRESS")==0) {
  		draw_progress(atoi(strtok(NULL,"\0")));
  	} else if (strcmp(command,"CLEAR")==0) {
