Author: stefanct Date: Fri Nov 30 17:46:45 2012 New Revision: 1627 URL: http://flashrom.org/trac/flashrom/changeset/1627
Log: Fix sp_openserport users on Windows.
Signed-off-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at Acked-by: Idwer Vollering vidwer@gmail.com
Modified: trunk/buspirate_spi.c trunk/pony_spi.c trunk/serprog.c
Modified: trunk/buspirate_spi.c ============================================================================== --- trunk/buspirate_spi.c Fri Nov 30 17:46:41 2012 (r1626) +++ trunk/buspirate_spi.c Fri Nov 30 17:46:45 2012 (r1627) @@ -40,7 +40,7 @@ { /* 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; }
Modified: trunk/pony_spi.c ============================================================================== --- trunk/pony_spi.c Fri Nov 30 17:46:41 2012 (r1626) +++ trunk/pony_spi.c Fri Nov 30 17:46:45 2012 (r1627) @@ -116,7 +116,7 @@ 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; }
Modified: trunk/serprog.c ============================================================================== --- trunk/serprog.c Fri Nov 30 17:46:41 2012 (r1626) +++ trunk/serprog.c Fri Nov 30 17:46:45 2012 (r1627) @@ -372,7 +372,7 @@ } if (strlen(device)) { sp_fd = sp_openserport(device, atoi(baudport)); - if (sp_fd < 0) { + if (sp_fd == SER_INV_FD) { free(device); return 1; }