Reroute stderr to uart and color it red
This commit is contained in:
		@@ -89,6 +89,12 @@ int _write(int fd, const void *buf, int count)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	if (fd == 1)
 | 
						if (fd == 1)
 | 
				
			||||||
		uart_send_array_with_dma(&shell_uart, (char *)buf, count);
 | 
							uart_send_array_with_dma(&shell_uart, (char *)buf, count);
 | 
				
			||||||
 | 
						else if (fd == 2) {
 | 
				
			||||||
 | 
							uart_send_string_with_dma(&shell_uart, "\e[31m");
 | 
				
			||||||
 | 
							uart_send_array_with_dma(&shell_uart, (char *)buf, count);
 | 
				
			||||||
 | 
							uart_send_string_with_dma(&shell_uart, "\e[m");
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return count;
 | 
						return count;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user