Skip to contentSkip to conversation

UML - print errno before resetting it

PATCH New Jeff Dike 1 participant 1 message Sep 23, 2004 User-mode Linux (UML)

lore
Share & tools
lore

Jeff Dike

author
#0 lore raw

PATCH 1/1 UML - print errno before resetting it

Make sure we print ERRNO and not always -1.

arch/um/drivers/ubd_kern.c +1 -1
Index: linux-2.6.9-rc2-mm1-orig/arch/um/drivers/ubd_kern.c
===================================================================
@@ -776,10 +776,10 @@
 	io_pid = start_io_thread(stack + PAGE_SIZE - sizeof(void *), 
 				 &thread_fd);
 	if(io_pid < 0){
-		io_pid = -1;
 		printk(KERN_ERR 
 		       "ubd : Failed to start I/O thread (errno = %d) - "
 		       "falling back to synchronous I/O\n", -io_pid);
+		io_pid = -1;
 		return(0);
 	}
 	err = um_request_irq(UBD_IRQ, thread_fd, IRQ_READ, ubd_intr,