Log the device name of the serial port.
This commit is contained in:
parent
d44053a994
commit
9ce8888e37
@ -132,6 +132,8 @@ serial_open (serial_t **out, dc_context_t *context, const char* name)
|
||||
if (out == NULL)
|
||||
return -1; // EINVAL (Invalid argument)
|
||||
|
||||
INFO (context, "Open: name=%s", name ? name : "");
|
||||
|
||||
// Allocate memory.
|
||||
serial_t *device = (serial_t *) malloc (sizeof (serial_t));
|
||||
if (device == NULL) {
|
||||
|
||||
@ -111,6 +111,8 @@ serial_open (serial_t **out, dc_context_t *context, const char* name)
|
||||
if (out == NULL)
|
||||
return -1; // ERROR_INVALID_PARAMETER (The parameter is incorrect)
|
||||
|
||||
INFO (context, "Open: name=%s", name ? name : "");
|
||||
|
||||
// Build the device name.
|
||||
const char *devname = NULL;
|
||||
char buffer[MAX_PATH] = "\\\\.\\";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user