88 |
extern RDPDR_DEVICE g_rdpdr_device[]; |
extern RDPDR_DEVICE g_rdpdr_device[]; |
89 |
|
|
90 |
static SERIAL_DEVICE * |
static SERIAL_DEVICE * |
91 |
get_serial_info(HANDLE handle) |
get_serial_info(NTHANDLE handle) |
92 |
{ |
{ |
93 |
int index; |
int index; |
94 |
|
|
101 |
} |
} |
102 |
|
|
103 |
static BOOL |
static BOOL |
104 |
get_termios(SERIAL_DEVICE * pser_inf, HANDLE serial_fd) |
get_termios(SERIAL_DEVICE * pser_inf, NTHANDLE serial_fd) |
105 |
{ |
{ |
106 |
speed_t speed; |
speed_t speed; |
107 |
struct termios *ptermios; |
struct termios *ptermios; |
224 |
} |
} |
225 |
|
|
226 |
static void |
static void |
227 |
set_termios(SERIAL_DEVICE * pser_inf, HANDLE serial_fd) |
set_termios(SERIAL_DEVICE * pser_inf, NTHANDLE serial_fd) |
228 |
{ |
{ |
229 |
speed_t speed; |
speed_t speed; |
230 |
|
|
407 |
|
|
408 |
static NTSTATUS |
static NTSTATUS |
409 |
serial_create(uint32 device_id, uint32 access, uint32 share_mode, uint32 disposition, |
serial_create(uint32 device_id, uint32 access, uint32 share_mode, uint32 disposition, |
410 |
uint32 flags_and_attributes, char *filename, HANDLE * handle) |
uint32 flags_and_attributes, char *filename, NTHANDLE * handle) |
411 |
{ |
{ |
412 |
HANDLE serial_fd; |
NTHANDLE serial_fd; |
413 |
SERIAL_DEVICE *pser_inf; |
SERIAL_DEVICE *pser_inf; |
414 |
struct termios *ptermios; |
struct termios *ptermios; |
415 |
|
|
462 |
} |
} |
463 |
|
|
464 |
static NTSTATUS |
static NTSTATUS |
465 |
serial_close(HANDLE handle) |
serial_close(NTHANDLE handle) |
466 |
{ |
{ |
467 |
int i = get_device_index(handle); |
int i = get_device_index(handle); |
468 |
if (i >= 0) |
if (i >= 0) |
472 |
} |
} |
473 |
|
|
474 |
static NTSTATUS |
static NTSTATUS |
475 |
serial_read(HANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result) |
serial_read(NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result) |
476 |
{ |
{ |
477 |
long timeout; |
long timeout; |
478 |
SERIAL_DEVICE *pser_inf; |
SERIAL_DEVICE *pser_inf; |
519 |
} |
} |
520 |
|
|
521 |
static NTSTATUS |
static NTSTATUS |
522 |
serial_write(HANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result) |
serial_write(NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, uint32 * result) |
523 |
{ |
{ |
524 |
*result = write(handle, data, length); |
*result = write(handle, data, length); |
525 |
return STATUS_SUCCESS; |
return STATUS_SUCCESS; |
526 |
} |
} |
527 |
|
|
528 |
static NTSTATUS |
static NTSTATUS |
529 |
serial_device_control(HANDLE handle, uint32 request, STREAM in, STREAM out) |
serial_device_control(NTHANDLE handle, uint32 request, STREAM in, STREAM out) |
530 |
{ |
{ |
531 |
#if 0 |
#if 0 |
532 |
int flush_mask, purge_mask; |
int flush_mask, purge_mask; |
684 |
|
|
685 |
/* Read timeout for a given file descripter (device) when adding fd's to select() */ |
/* Read timeout for a given file descripter (device) when adding fd's to select() */ |
686 |
BOOL |
BOOL |
687 |
serial_get_timeout(HANDLE handle, uint32 length, uint32 * timeout, uint32 * itv_timeout) |
serial_get_timeout(NTHANDLE handle, uint32 length, uint32 * timeout, uint32 * itv_timeout) |
688 |
{ |
{ |
689 |
int index; |
int index; |
690 |
SERIAL_DEVICE *pser_inf; |
SERIAL_DEVICE *pser_inf; |