mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 14:56:31 +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;
|
ULONG ret_blk;
|
||||||
|
|
||||||
|
|
||||||
Callback(PROGRESS, 0, (PVOID)&Percent);
|
if (Callback != NULL)
|
||||||
|
{
|
||||||
|
Callback(PROGRESS, 0, (PVOID)&Percent);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
RtlZeroMemory(&Ext2Sb, sizeof(EXT2_SUPER_BLOCK));
|
RtlZeroMemory(&Ext2Sb, sizeof(EXT2_SUPER_BLOCK));
|
||||||
|
@ -997,7 +1000,10 @@ clean_up:
|
||||||
|
|
||||||
Ext2CloseDevice(&FileSys);
|
Ext2CloseDevice(&FileSys);
|
||||||
|
|
||||||
Callback(DONE, 0, (PVOID)&bRet);
|
if (Callback != NULL)
|
||||||
|
{
|
||||||
|
Callback(DONE, 0, (PVOID)&bRet);
|
||||||
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
|
@ -294,7 +294,10 @@ UpdateProgress(PFORMAT_CONTEXT Context,
|
||||||
if (NewPercent > Context->Percent)
|
if (NewPercent > Context->Percent)
|
||||||
{
|
{
|
||||||
Context->Percent = NewPercent;
|
Context->Percent = NewPercent;
|
||||||
Context->Callback (PROGRESS, 0, &Context->Percent);
|
if (Context->Callback != NULL)
|
||||||
|
{
|
||||||
|
Context->Callback (PROGRESS, 0, &Context->Percent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -169,7 +169,10 @@ VfatxUpdateProgress(IN PFORMAT_CONTEXT Context,
|
||||||
if (NewPercent > Context->Percent)
|
if (NewPercent > Context->Percent)
|
||||||
{
|
{
|
||||||
Context->Percent = NewPercent;
|
Context->Percent = NewPercent;
|
||||||
Context->Callback(PROGRESS, 0, &Context->Percent);
|
if (Context->Callback != NULL)
|
||||||
|
{
|
||||||
|
Context->Callback(PROGRESS, 0, &Context->Percent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue