Skip to content

Conversation

@Cacodemon345
Copy link
Contributor

Summary

serial_passthrough: Allow configuration of named pipe parameter

Windows-only.

Checklist

References

None.

Comment on lines 170 to 173
if (strnicmp("\\\\.\\pipe\\", ascii_pipe_name, sizeof("\\\\.\\pipe\\") - 1)) {
ui_msgbox(MBX_WARNING, L"Serial Passthrough: Pipe name is invalid.");
return 0;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO this condition is redundant as long as we properly handle CreateNamedPipe errors.

if (dev->master_fd == (intptr_t) INVALID_HANDLE_VALUE) {
return 0;
Copy link
Contributor

@dhrdlicka dhrdlicka Feb 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could show a message box here with the error information obtained via GetLastError instead.

@OBattler OBattler merged commit 6b6632e into 86Box:master Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants