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
7bf39d4b
Commit
7bf39d4b
authored
Jan 07, 2009
by
Francois Gouget
Committed by
Alexandre Julliard
Jan 07, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedos: Remove unused functions from devices.c.
parent
ca82e0f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
141 deletions
+0
-141
devices.c
dlls/winedos/devices.c
+0
-134
dosexe.h
dlls/winedos/dosexe.h
+0
-7
No files found.
dlls/winedos/devices.c
View file @
7bf39d4b
...
...
@@ -476,140 +476,6 @@ void DOSDEV_InstallDOSDevices(void)
dataseg
->
lol
.
ptr_CON_dev_hdr
=
MAKESEGPTR
(
seg
,
DOS_DATASEG_OFF
(
dev
[
0
]));
}
DWORD
DOSDEV_Console
(
void
)
{
return
DOSMEM_LOL
()
->
ptr_CON_dev_hdr
;
}
DWORD
DOSDEV_FindCharDevice
(
char
*
name
)
{
SEGPTR
cur_ptr
=
MAKESEGPTR
(
HIWORD
(
DOS_LOLSeg
),
FIELD_OFFSET
(
DOS_LISTOFLISTS
,
NUL_dev
));
DOS_DEVICE_HEADER
*
cur
=
PTR_REAL_TO_LIN
(
SELECTOROF
(
cur_ptr
),
OFFSETOF
(
cur_ptr
));
char
dname
[
8
];
int
cnt
;
/* get first 8 characters */
/* if less than 8 characters, pad with spaces */
for
(
cnt
=
0
;
name
[
cnt
]
&&
cnt
<
8
;
cnt
++
)
dname
[
cnt
]
=
name
[
cnt
];
while
(
cnt
<
8
)
dname
[
cnt
++
]
=
' '
;
/* search for char devices with the right name */
while
(
cur
&&
((
!
(
cur
->
attr
&
ATTR_CHAR
))
||
memcmp
(
cur
->
name
,
dname
,
8
)))
{
cur_ptr
=
cur
->
next_dev
;
if
(
cur_ptr
==
NONEXT
)
cur
=
NULL
;
else
cur
=
PTR_REAL_TO_LIN
(
SELECTOROF
(
cur_ptr
),
OFFSETOF
(
cur_ptr
));
}
return
cur_ptr
;
}
static
void
DOSDEV_DoReq
(
void
*
req
,
DWORD
dev
)
{
REQUEST_HEADER
*
hdr
=
(
REQUEST_HEADER
*
)
req
;
DOS_DEVICE_HEADER
*
dhdr
;
CONTEXT86
ctx
;
char
*
phdr
;
dhdr
=
PTR_REAL_TO_LIN
(
SELECTOROF
(
dev
),
OFFSETOF
(
dev
));
phdr
=
((
char
*
)
DOSMEM_LOL
())
+
DOS_DATASEG_OFF
(
req
);
/* copy request to request scratch area */
memcpy
(
phdr
,
req
,
hdr
->
size
);
/* prepare to call device driver */
memset
(
&
ctx
,
0
,
sizeof
(
ctx
));
ctx
.
EFlags
|=
V86_FLAG
;
/* ES:BX points to request for strategy routine */
ctx
.
SegEs
=
HIWORD
(
DOS_LOLSeg
);
ctx
.
Ebx
=
DOS_DATASEG_OFF
(
req
);
/* call strategy routine */
ctx
.
SegCs
=
SELECTOROF
(
dev
);
ctx
.
Eip
=
dhdr
->
strategy
;
DPMI_CallRMProc
(
&
ctx
,
0
,
0
,
0
);
/* call interrupt routine */
ctx
.
SegCs
=
SELECTOROF
(
dev
);
ctx
.
Eip
=
dhdr
->
interrupt
;
DPMI_CallRMProc
(
&
ctx
,
0
,
0
,
0
);
/* completed, copy request back */
memcpy
(
req
,
phdr
,
hdr
->
size
);
if
(
hdr
->
status
&
STAT_ERROR
)
{
switch
(
hdr
->
status
&
STAT_MASK
)
{
case
0x0F
:
/* invalid disk change */
/* this error seems to fit the bill */
SetLastError
(
ERROR_NOT_SAME_DEVICE
);
break
;
default:
SetLastError
((
hdr
->
status
&
STAT_MASK
)
+
0x13
);
break
;
}
}
}
static
int
DOSDEV_IO
(
unsigned
cmd
,
DWORD
dev
,
DWORD
buf
,
int
buflen
)
{
REQ_IO
req
;
req
.
hdr
.
size
=
sizeof
(
req
);
req
.
hdr
.
unit
=
0
;
/* not dealing with block devices yet */
req
.
hdr
.
command
=
cmd
;
req
.
hdr
.
status
=
STAT_BUSY
;
req
.
media
=
0
;
/* not dealing with block devices yet */
req
.
buffer
=
buf
;
req
.
count
=
buflen
;
req
.
sector
=
0
;
/* block devices */
req
.
volume
=
0
;
/* block devices */
DOSDEV_DoReq
(
&
req
,
dev
);
return
req
.
count
;
}
int
DOSDEV_Peek
(
DWORD
dev
,
BYTE
*
data
)
{
REQ_SAFEINPUT
req
;
req
.
hdr
.
size
=
sizeof
(
req
);
req
.
hdr
.
unit
=
0
;
/* not dealing with block devices yet */
req
.
hdr
.
command
=
CMD_SAFEINPUT
;
req
.
hdr
.
status
=
STAT_BUSY
;
req
.
data
=
0
;
DOSDEV_DoReq
(
&
req
,
dev
);
if
(
req
.
hdr
.
status
&
STAT_BUSY
)
return
0
;
*
data
=
req
.
data
;
return
1
;
}
int
DOSDEV_Read
(
DWORD
dev
,
DWORD
buf
,
int
buflen
)
{
return
DOSDEV_IO
(
CMD_INPUT
,
dev
,
buf
,
buflen
);
}
int
DOSDEV_Write
(
DWORD
dev
,
DWORD
buf
,
int
buflen
,
int
verify
)
{
return
DOSDEV_IO
(
verify
?
CMD_SAFEOUTPUT
:
CMD_OUTPUT
,
dev
,
buf
,
buflen
);
}
int
DOSDEV_IoctlRead
(
DWORD
dev
,
DWORD
buf
,
int
buflen
)
{
return
DOSDEV_IO
(
CMD_INIOCTL
,
dev
,
buf
,
buflen
);
}
int
DOSDEV_IoctlWrite
(
DWORD
dev
,
DWORD
buf
,
int
buflen
)
{
return
DOSDEV_IO
(
CMD_OUTIOCTL
,
dev
,
buf
,
buflen
);
}
void
DOSDEV_SetSharingRetry
(
WORD
delay
,
WORD
count
)
{
DOSMEM_LOL
()
->
sharing_retry_delay
=
delay
;
...
...
dlls/winedos/dosexe.h
View file @
7bf39d4b
...
...
@@ -368,13 +368,6 @@ extern UINT WINAPI DOSVM_GetTimer( void );
extern
void
DOSDEV_InstallDOSDevices
(
void
);
extern
void
DOSDEV_SetupDevice
(
const
WINEDEV
*
devinfo
,
WORD
seg
,
WORD
off_dev
,
WORD
off_thunk
);
extern
DWORD
DOSDEV_Console
(
void
);
extern
DWORD
DOSDEV_FindCharDevice
(
char
*
name
);
extern
int
DOSDEV_Peek
(
DWORD
dev
,
BYTE
*
data
);
extern
int
DOSDEV_Read
(
DWORD
dev
,
DWORD
buf
,
int
buflen
);
extern
int
DOSDEV_Write
(
DWORD
dev
,
DWORD
buf
,
int
buflen
,
int
verify
);
extern
int
DOSDEV_IoctlRead
(
DWORD
dev
,
DWORD
buf
,
int
buflen
);
extern
int
DOSDEV_IoctlWrite
(
DWORD
dev
,
DWORD
buf
,
int
buflen
);
extern
void
DOSDEV_SetSharingRetry
(
WORD
delay
,
WORD
count
);
extern
SEGPTR
DOSDEV_GetLOL
(
BOOL
v86
);
...
...
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