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
1563e83a
Commit
1563e83a
authored
Aug 07, 1999
by
Morten Eriksen
Committed by
Alexandre Julliard
Aug 07, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved GetDiskFreeSpaceEx() implementation a little bit.
parent
f57ef1d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
7 deletions
+32
-7
drive.c
files/drive.c
+32
-7
No files found.
files/drive.c
View file @
1563e83a
...
@@ -810,6 +810,15 @@ BOOL WINAPI GetDiskFreeSpaceW( LPCWSTR root, LPDWORD cluster_sectors,
...
@@ -810,6 +810,15 @@ BOOL WINAPI GetDiskFreeSpaceW( LPCWSTR root, LPDWORD cluster_sectors,
/***********************************************************************
/***********************************************************************
* GetDiskFreeSpaceEx32A (KERNEL32.871)
* GetDiskFreeSpaceEx32A (KERNEL32.871)
*
* This function is used to aquire the size of the available and
* total space on a logical volume.
*
* RETURNS
*
* Zero on failure, nonzero upon success. Use GetLastError to obtain
* detailed error information.
*
*/
*/
BOOL
WINAPI
GetDiskFreeSpaceExA
(
LPCSTR
root
,
BOOL
WINAPI
GetDiskFreeSpaceExA
(
LPCSTR
root
,
PULARGE_INTEGER
avail
,
PULARGE_INTEGER
avail
,
...
@@ -824,21 +833,37 @@ BOOL WINAPI GetDiskFreeSpaceExA( LPCSTR root,
...
@@ -824,21 +833,37 @@ BOOL WINAPI GetDiskFreeSpaceExA( LPCSTR root,
{
{
if
((
root
[
1
])
&&
((
root
[
1
]
!=
':'
)
||
(
root
[
2
]
!=
'\\'
)))
if
((
root
[
1
])
&&
((
root
[
1
]
!=
':'
)
||
(
root
[
2
]
!=
'\\'
)))
{
{
FIXME_
(
dosfs
)(
"there are valid root names which are not supported yet
\n
"
);
/* ..like UNC names, for instance. */
WARN_
(
dosfs
)(
"invalid root '%s'
\n
"
,
root
);
WARN_
(
dosfs
)(
"invalid root '%s'
\n
"
,
root
);
return
FALSE
;
return
FALSE
;
}
}
drive
=
toupper
(
root
[
0
])
-
'A'
;
drive
=
toupper
(
root
[
0
])
-
'A'
;
}
}
if
(
!
DRIVE_GetFreeSpace
(
drive
,
&
size
,
&
available
))
return
FALSE
;
if
(
!
DRIVE_GetFreeSpace
(
drive
,
&
size
,
&
available
))
return
FALSE
;
/*FIXME: Do we have the number of bytes available to the user? */
if
(
totalfree
)
{
if
(
total
)
totalfree
->
HighPart
=
size
.
HighPart
;
{
totalfree
->
LowPart
=
size
.
LowPart
;
total
->
HighPart
=
size
.
HighPart
;
total
->
LowPart
=
size
.
LowPart
;
}
}
if
(
avail
)
{
avail
->
HighPart
=
available
.
HighPart
;
if
(
totalfree
)
avail
->
LowPart
=
available
.
LowPart
;
{
totalfree
->
HighPart
=
available
.
HighPart
;
totalfree
->
LowPart
=
available
.
LowPart
;
}
}
if
(
avail
)
{
FIXME_
(
dosfs
)(
"no per-user quota support yet
\n
"
);
/* Quick hack */
avail
->
HighPart
=
totalfree
->
HighPart
;
avail
->
LowPart
=
totalfree
->
LowPart
;
}
return
TRUE
;
return
TRUE
;
}
}
...
...
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