Log the device name of the serial port.

This commit is contained in:
Jef Driesen 2013-07-21 22:15:43 +02:00
parent d44053a994
commit 9ce8888e37
2 changed files with 4 additions and 0 deletions

View File

@ -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) {

View File

@ -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] = "\\\\.\\";