mirror of
				https://review.coreboot.org/flashrom.git
				synced 2025-11-03 23:00:13 +01:00 
			
		
		
		
	Convert all messages in serial.c to the new message infrastructure
Corresponding to flashrom svn r848. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
This commit is contained in:
		
							
								
								
									
										6
									
								
								serial.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								serial.c
									
									
									
									
									
								
							@@ -139,7 +139,7 @@ fdtype sp_openserport(char *dev, unsigned int baud)
 | 
				
			|||||||
	for (i = 0;; i++) {
 | 
						for (i = 0;; i++) {
 | 
				
			||||||
		if (sp_baudtable[i].baud == 0) {
 | 
							if (sp_baudtable[i].baud == 0) {
 | 
				
			||||||
			close(fd);
 | 
								close(fd);
 | 
				
			||||||
			fprintf(stderr,
 | 
								msg_perr(
 | 
				
			||||||
				"Error: cannot configure for baudrate %d\n",
 | 
									"Error: cannot configure for baudrate %d\n",
 | 
				
			||||||
				baud);
 | 
									baud);
 | 
				
			||||||
			exit(1);
 | 
								exit(1);
 | 
				
			||||||
@@ -193,7 +193,7 @@ int serialport_write(unsigned char *buf, unsigned int writecnt)
 | 
				
			|||||||
		if (tmp == -1)
 | 
							if (tmp == -1)
 | 
				
			||||||
			return 1;
 | 
								return 1;
 | 
				
			||||||
		if (!tmp)
 | 
							if (!tmp)
 | 
				
			||||||
			printf_debug("Empty write\n");
 | 
								msg_pdbg("Empty write\n");
 | 
				
			||||||
		writecnt -= tmp; 
 | 
							writecnt -= tmp; 
 | 
				
			||||||
		buf += tmp;
 | 
							buf += tmp;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -214,7 +214,7 @@ int serialport_read(unsigned char *buf, unsigned int readcnt)
 | 
				
			|||||||
		if (tmp == -1)
 | 
							if (tmp == -1)
 | 
				
			||||||
			return 1;
 | 
								return 1;
 | 
				
			||||||
		if (!tmp)
 | 
							if (!tmp)
 | 
				
			||||||
			printf_debug("Empty read\n");
 | 
								msg_pdbg("Empty read\n");
 | 
				
			||||||
		readcnt -= tmp;
 | 
							readcnt -= tmp;
 | 
				
			||||||
		buf += tmp;
 | 
							buf += tmp;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user