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
02a23461
Commit
02a23461
authored
Nov 03, 2003
by
Jukka Heinonen
Committed by
Alexandre Julliard
Nov 03, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement fat32 extended free space function.
Make fat32 calls reset carry flag explicitly.
parent
49eaa0db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
+50
-0
int21.c
dlls/winedos/int21.c
+50
-0
No files found.
dlls/winedos/int21.c
View file @
02a23461
...
...
@@ -2474,6 +2474,55 @@ static BOOL INT21_Fat32( CONTEXT86 *context )
}
break
;
case
0x03
:
/* FAT32 - GET EXTENDED FREE SPACE ON DRIVE */
{
WCHAR
dirW
[
MAX_PATH
];
char
*
dirA
=
CTX_SEG_OFF_TO_LIN
(
context
,
context
->
SegDs
,
context
->
Edx
);
BYTE
*
data
=
CTX_SEG_OFF_TO_LIN
(
context
,
context
->
SegEs
,
context
->
Edi
);
DWORD
cluster_sectors
;
DWORD
sector_bytes
;
DWORD
free_clusters
;
DWORD
total_clusters
;
TRACE
(
"FAT32 - GET EXTENDED FREE SPACE ON DRIVE %s
\n
"
,
dirA
);
MultiByteToWideChar
(
CP_OEMCP
,
0
,
dirA
,
-
1
,
dirW
,
MAX_PATH
);
if
(
CX_reg
(
context
)
<
44
)
{
SetLastError
(
ERROR_BAD_LENGTH
);
return
FALSE
;
}
if
(
!
GetDiskFreeSpaceW
(
dirW
,
&
cluster_sectors
,
&
sector_bytes
,
&
free_clusters
,
&
total_clusters
))
return
FALSE
;
*
(
WORD
*
)
(
data
+
0
)
=
44
;
/* size of structure */
*
(
WORD
*
)
(
data
+
2
)
=
0
;
/* version */
*
(
DWORD
*
)(
data
+
4
)
=
cluster_sectors
;
*
(
DWORD
*
)(
data
+
8
)
=
sector_bytes
;
*
(
DWORD
*
)(
data
+
12
)
=
free_clusters
;
*
(
DWORD
*
)(
data
+
16
)
=
total_clusters
;
/*
* Below we have free/total sectors and
* free/total allocation units without adjustment
* for compression. We fake both using cluster information.
*/
*
(
DWORD
*
)(
data
+
20
)
=
free_clusters
*
cluster_sectors
;
*
(
DWORD
*
)(
data
+
24
)
=
total_clusters
*
cluster_sectors
;
*
(
DWORD
*
)(
data
+
28
)
=
free_clusters
;
*
(
DWORD
*
)(
data
+
32
)
=
total_clusters
;
/*
* Between (data + 36) and (data + 43) there
* are eight reserved bytes.
*/
}
break
;
default:
INT_BARF
(
context
,
0x21
);
}
...
...
@@ -3923,6 +3972,7 @@ void WINAPI DOSVM_Int21Handler( CONTEXT86 *context )
break
;
case
0x73
:
/* MSDOS7 - FAT32 */
RESET_CFLAG
(
context
);
if
(
!
INT21_Fat32
(
context
))
bSetDOSExtendedError
=
TRUE
;
break
;
...
...
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