David Hendricks uploaded patch set #2 to this change.

View Change

serial: Fix file read/write error handling for Windows

File read/write semantics are different between POSIX and Windows. In
particular Windows file read/write functions return a boolean type to
indicate success or failure, while the POSIX equivalents return a
signed integer indicating number of bytes read if successful or -1 if
not.

This attempts to correct some error handling paths for Windows and
avoid invalid comparisons that were causing compilation issues.

Reported on https://github.com/flashrom/flashrom/issues/149

Change-Id: Ib179d51ede2dbd38f54f3641bfe90340a6a87e31
Signed-off-by: David Hendricks <david.hendricks@gmail.com>
---
M serial.c
1 file changed, 22 insertions(+), 8 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/51/43051/2

To view, visit change 43051. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ib179d51ede2dbd38f54f3641bfe90340a6a87e31
Gerrit-Change-Number: 43051
Gerrit-PatchSet: 2
Gerrit-Owner: David Hendricks <david.hendricks@gmail.com>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Miklós Márton <martonmiklosqdev@gmail.com>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-MessageType: newpatchset