Hi,
I believe M_ERRNO should handle this… After the register_ring_buffers() exits, the Win32 error code is left in GetLastError(). msg(M_ERRNO) picks it from there and formats a human-readable message. Regards, Simon From: Lev Stipakov <[email protected]> Sent: Wednesday, February 5, 2020 8:38 PM To: Simon Rozman <[email protected]> Cc: openvpn-devel <[email protected]> Subject: Re: [Openvpn-devel] [PATCH] wintun: upgrade error message in case of ring registration failure Hi, - msg(M_NONFATAL, "Failed to register ring buffers: %lu", GetLastError()); <skip> + switch (GetLastError()) <skip> + default: + msg(M_NONFATAL | M_ERRNO, "Failed to register ring buffers"); I think it would make sense to print the error code / error message (with strerror_win32) in the "default" case.
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
