Commit acfc4c6c authored by Stefan Tauner's avatar Stefan Tauner
Browse files

Fix sp_openserport users on Windows


Corresponding to flashrom svn r1627.
Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: default avatarIdwer Vollering <vidwer@gmail.com>
parent 62574aa5
......@@ -40,7 +40,7 @@ static int buspirate_serialport_setup(char *dev)
{
/* 115200bps, 8 databits, no parity, 1 stopbit */
sp_fd = sp_openserport(dev, 115200);
if (sp_fd < 0)
if (sp_fd == SER_INV_FD)
return 1;
return 0;
}
......
......@@ -116,7 +116,7 @@ int pony_spi_init(void)
arg = extract_programmer_param("dev");
if (arg && strlen(arg)) {
sp_fd = sp_openserport(arg, 9600);
if (sp_fd < 0) {
if (sp_fd == SER_INV_FD) {
free(arg);
return 1;
}
......
......@@ -372,7 +372,7 @@ int serprog_init(void)
}
if (strlen(device)) {
sp_fd = sp_openserport(device, atoi(baudport));
if (sp_fd < 0) {
if (sp_fd == SER_INV_FD) {
free(device);
return 1;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment