mirror of
https://github.com/reactos/reactos.git
synced 2024-08-03 18:10:54 +00:00
[USETUP]
- Sylvain Petreolle: Improve debug prints for disk space check. svn path=/trunk/; revision=48767
This commit is contained in:
parent
9c827ade73
commit
1a554af4a0
|
@ -1401,26 +1401,24 @@ LayoutSettingsPage(PINPUT_RECORD Ir)
|
|||
static BOOL
|
||||
IsDiskSizeValid(PPARTENTRY PartEntry)
|
||||
{
|
||||
ULONGLONG m;
|
||||
ULONGLONG m1, m2;
|
||||
|
||||
/* check for unpartitioned space */
|
||||
m = PartEntry->UnpartitionedLength;
|
||||
m = (m + (1 << 19)) >> 20; /* in MBytes (rounded) */
|
||||
m1 = PartEntry->UnpartitionedLength;
|
||||
m1 = (m1 + (1 << 19)) >> 20; /* in MBytes (rounded) */
|
||||
|
||||
DPRINT1("Unpartitioned space is %lu MB\n", m);
|
||||
|
||||
if( m > RequiredPartitionDiskSpace)
|
||||
if( m1 > RequiredPartitionDiskSpace)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* check for partitioned space */
|
||||
m = PartEntry->PartInfo[0].PartitionLength.QuadPart;
|
||||
m = (m + (1 << 19)) >> 20; /* in MBytes (rounded) */
|
||||
if (m < RequiredPartitionDiskSpace)
|
||||
m2 = PartEntry->PartInfo[0].PartitionLength.QuadPart;
|
||||
m2 = (m2 + (1 << 19)) >> 20; /* in MBytes (rounded) */
|
||||
if (m2 < RequiredPartitionDiskSpace)
|
||||
{
|
||||
/* partition is too small so ask for another partion */
|
||||
DPRINT1("Partition is too small (%lu MB), required disk space is %lu MB\n", m, RequiredPartitionDiskSpace);
|
||||
DPRINT1("Partition is too small(unpartitioned: %I64u MB, partitioned: %I64u MB), required disk space is %lu MB\n", m1, m2, RequiredPartitionDiskSpace);
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue