TTY: printer better diagnostics
.tell when a line is not initialized .don't print when a request has failed, we use error codes for that
This commit is contained in:
		
							parent
							
								
									a458e9d00d
								
							
						
					
					
						commit
						e61268c454
					
				@ -444,6 +444,8 @@ void rs_init(tty_t *tp)
 | 
			
		||||
   * for all requests on it from userland. (The kernel will use it.)
 | 
			
		||||
   */
 | 
			
		||||
  if(env_get_param(SERVARNAME, l, sizeof(l)-1) == OK && atoi(l) == line) {
 | 
			
		||||
	printf("TTY: not initializing rs232 line %d (in use by kernel)\n",
 | 
			
		||||
		line);
 | 
			
		||||
	return;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -258,8 +258,6 @@ int main(void)
 | 
			
		||||
 | 
			
		||||
	/* If the device doesn't exist or is not configured return ENXIO. */
 | 
			
		||||
	if (tp == NULL || ! tty_active(tp)) {
 | 
			
		||||
		printf("Warning, TTY got illegal request %d from %d\n",
 | 
			
		||||
			tty_mess.m_type, tty_mess.m_source);
 | 
			
		||||
		if (tty_mess.m_source != LOG_PROC_NR)
 | 
			
		||||
		{
 | 
			
		||||
			tty_reply(TASK_REPLY, tty_mess.m_source,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user