Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
b08f9581
Commit
b08f9581
authored
Jan 14, 2005
by
Rein Klazes
Committed by
Alexandre Julliard
Jan 14, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In int21_ioctl - get device data-, set the "is console" bits if the
device handle is a tty or a proper console io handle.
parent
c3ead97b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
18 deletions
+26
-18
int21.c
dlls/winedos/int21.c
+26
-18
No files found.
dlls/winedos/int21.c
View file @
b08f9581
...
...
@@ -46,6 +46,7 @@
#include "wine/debug.h"
#include "wine/exception.h"
BOOL
WINAPI
VerifyConsoleIoHandle
(
HANDLE
);
/*
* Note:
* - Most of the file related functions are wrong. NT's kernel32
...
...
@@ -2731,27 +2732,34 @@ static void INT21_Ioctl_Char( CONTEXT86 *context )
{
struct
stat
st
;
int
status
,
i
,
fd
;
int
IsConsoleIOHandle
=
0
;
HANDLE
handle
=
DosFileHandleToWin32Handle
(
BX_reg
(
context
));
status
=
wine_server_handle_to_fd
(
handle
,
0
,
&
fd
,
NULL
);
if
(
status
)
{
SET_AX
(
context
,
RtlNtStatusToDosError
(
status
)
);
SET_CFLAG
(
context
);
return
;
}
fstat
(
fd
,
&
st
);
wine_server_release_fd
(
handle
,
fd
);
for
(
i
=
0
;
i
<
NB_MAGIC_DEVICES
;
i
++
)
{
if
(
!
magic_devices
[
i
].
handle
)
continue
;
if
(
magic_devices
[
i
].
dev
==
st
.
st_dev
&&
magic_devices
[
i
].
ino
==
st
.
st_ino
)
{
/* found it */
magic_devices
[
i
].
ioctl_handler
(
context
);
if
(
VerifyConsoleIoHandle
(
handle
))
IsConsoleIOHandle
=
1
;
else
{
SET_AX
(
context
,
RtlNtStatusToDosError
(
status
)
);
SET_CFLAG
(
context
);
return
;
}
}
else
{
fstat
(
fd
,
&
st
);
IsConsoleIOHandle
=
isatty
(
fd
);
wine_server_release_fd
(
handle
,
fd
);
for
(
i
=
0
;
i
<
NB_MAGIC_DEVICES
;
i
++
)
{
if
(
!
magic_devices
[
i
].
handle
)
continue
;
if
(
magic_devices
[
i
].
dev
==
st
.
st_dev
&&
magic_devices
[
i
].
ino
==
st
.
st_ino
)
{
/* found it */
magic_devices
[
i
].
ioctl_handler
(
context
);
return
;
}
}
}
/* no magic device found, do default handling */
...
...
@@ -2760,7 +2768,7 @@ static void INT21_Ioctl_Char( CONTEXT86 *context )
{
case
0x00
:
/* GET DEVICE INFORMATION */
TRACE
(
"IOCTL - GET DEVICE INFORMATION - %d
\n
"
,
BX_reg
(
context
)
);
if
(
S_ISCHR
(
st
.
st_mode
))
if
(
IsConsoleIOHandle
||
S_ISCHR
(
st
.
st_mode
))
{
/*
* Returns attribute word in DX:
...
...
@@ -2774,10 +2782,10 @@ static void INT21_Ioctl_Char( CONTEXT86 *context )
* Bit 4 - Device is special (uses int29).
* Bit 3 - Clock device.
* Bit 2 - NUL device.
* Bit 1 -
Standard output
.
* Bit 0 -
Standard input
.
* Bit 1 -
Console output device
.
* Bit 0 -
Console input device
.
*/
SET_DX
(
context
,
0x80c0
/* FIXME */
);
SET_DX
(
context
,
IsConsoleIOHandle
?
0x80c3
:
0x80c0
/* FIXME */
);
}
else
{
...
...
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