Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
a6d339c6
Commit
a6d339c6
authored
Feb 27, 2006
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 28, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implemented serial IOCTL for status: GET_COMM_STATUS.
parent
8f08fe6c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
serial.c
dlls/ntdll/serial.c
+38
-0
No files found.
dlls/ntdll/serial.c
View file @
a6d339c6
...
...
@@ -168,6 +168,36 @@ static NTSTATUS get_modem_status(int fd, DWORD* lpModemStat)
return
status
;
}
static
NTSTATUS
get_status
(
int
fd
,
SERIAL_STATUS
*
ss
)
{
NTSTATUS
status
=
STATUS_SUCCESS
;
ss
->
Errors
=
0
;
ss
->
HoldReasons
=
0
;
ss
->
EofReceived
=
FALSE
;
ss
->
WaitForImmediate
=
FALSE
;
#ifdef TIOCOUTQ
if
(
ioctl
(
fd
,
TIOCOUTQ
,
&
ss
->
AmountInOutQueue
)
==
-
1
)
{
WARN
(
"ioctl returned error
\n
"
);
status
=
FILE_GetNtStatus
();
}
#else
ss
->
AmountInOutQueue
=
0
;
/* FIXME: find a different way to find out */
#endif
#ifdef TIOCINQ
if
(
ioctl
(
fd
,
TIOCINQ
,
&
ss
->
AmountInInQueue
))
{
WARN
(
"ioctl returned error
\n
"
);
status
=
FILE_GetNtStatus
();
}
#else
ss
->
AmountInInQueue
=
0
;
/* FIXME: find a different way to find out */
#endif
return
status
;
}
static
NTSTATUS
get_wait_mask
(
HANDLE
hDevice
,
DWORD
*
mask
)
{
NTSTATUS
status
;
...
...
@@ -247,6 +277,14 @@ NTSTATUS COMM_DeviceIoControl(HANDLE hDevice,
switch
(
dwIoControlCode
)
{
case
IOCTL_SERIAL_GET_COMMSTATUS
:
if
(
lpOutBuffer
&&
nOutBufferSize
==
sizeof
(
SERIAL_STATUS
))
{
if
(
!
(
status
=
get_status
(
fd
,
(
SERIAL_STATUS
*
)
lpOutBuffer
)))
sz
=
sizeof
(
SERIAL_STATUS
);
}
else
status
=
STATUS_INVALID_PARAMETER
;
break
;
case
IOCTL_SERIAL_GET_MODEMSTATUS
:
if
(
lpOutBuffer
&&
nOutBufferSize
==
sizeof
(
DWORD
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment