From a539918d401cd010f052e9810f0e14e8b6d72b74 Mon Sep 17 00:00:00 2001 From: stefanct Date: Sat, 13 Apr 2013 00:29:30 +0000 Subject: Initialize sp_fd and fix baud rate setting on windows. Signed-off-by: Stefan Tauner Acked-by: Stefan Tauner git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1669 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- serial.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'serial.c') diff --git a/serial.c b/serial.c index 49484f5..1b394cd 100644 --- a/serial.c +++ b/serial.c @@ -39,7 +39,7 @@ #include "flash.h" #include "programmer.h" -fdtype sp_fd; +fdtype sp_fd = SER_INV_FD; void __attribute__((noreturn)) sp_die(char *msg) { @@ -189,7 +189,7 @@ fdtype sp_openserport(char *dev, unsigned int baud) goto out_close; } const struct baudentry *entry = round_baud(baud); - dcb.BaudRate = entry->baud; + dcb.BaudRate = entry->flag; dcb.ByteSize = 8; dcb.Parity = NOPARITY; dcb.StopBits = ONESTOPBIT; -- cgit v1.2.1