mirror of
https://github.com/reactos/reactos.git
synced 2025-06-06 01:40:36 +00:00
[FSLIB]
- Don't call the callback if the caller didn't give one svn path=/trunk/; revision=54268
This commit is contained in:
parent
f89a5c926a
commit
daaf78f524
3 changed files with 16 additions and 4 deletions
|
@ -820,7 +820,10 @@ Ext2Format(IN PUNICODE_STRING DriveRoot,
|
|||
ULONG ret_blk;
|
||||
|
||||
|
||||
if (Callback != NULL)
|
||||
{
|
||||
Callback(PROGRESS, 0, (PVOID)&Percent);
|
||||
}
|
||||
|
||||
|
||||
RtlZeroMemory(&Ext2Sb, sizeof(EXT2_SUPER_BLOCK));
|
||||
|
@ -997,7 +1000,10 @@ clean_up:
|
|||
|
||||
Ext2CloseDevice(&FileSys);
|
||||
|
||||
if (Callback != NULL)
|
||||
{
|
||||
Callback(DONE, 0, (PVOID)&bRet);
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
|
|
@ -294,9 +294,12 @@ UpdateProgress(PFORMAT_CONTEXT Context,
|
|||
if (NewPercent > Context->Percent)
|
||||
{
|
||||
Context->Percent = NewPercent;
|
||||
if (Context->Callback != NULL)
|
||||
{
|
||||
Context->Callback (PROGRESS, 0, &Context->Percent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
|
|
|
@ -169,8 +169,11 @@ VfatxUpdateProgress(IN PFORMAT_CONTEXT Context,
|
|||
if (NewPercent > Context->Percent)
|
||||
{
|
||||
Context->Percent = NewPercent;
|
||||
if (Context->Callback != NULL)
|
||||
{
|
||||
Context->Callback(PROGRESS, 0, &Context->Percent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
Loading…
Reference in a new issue