Skip to content

Commit 223b78a

Browse files
authored
Merge pull request #287 from Microsemi/win_errno
platform/windows: set errno when MRPC command returns failure
2 parents 5ae251d + 930dee7 commit 223b78a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/platform/windows.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,8 @@ static int windows_cmd(struct switchtec_dev *dev, uint32_t cmd,
364364
memcpy(resp, mres->data, resp_len);
365365

366366
ret = mres->status;
367+
if (ret)
368+
errno = ret;
367369

368370
free_and_exit:
369371
free(mres);

0 commit comments

Comments
 (0)