windows-nt/Source/XPSP1/NT/drivers/ftapi/ftinit/ftinit.c
2020-09-26 16:20:57 +08:00

31 lines
577 B
C

#include <windows.h>
#include <stdio.h>
#include <ftapi.h>
void __cdecl
main(
int argc,
char** argv
)
{
BOOL b;
FT_LOGICAL_DISK_ID diskId;
if (argc < 2) {
printf("usage: %s <diskId> [init-orphans]\n", argv[0]);
return;
}
sscanf(argv[1], "%I64X", &diskId);
printf("Initializing %I64X...\n", diskId);
b = FtInitializeLogicalDisk(diskId, argc > 2 ? TRUE : FALSE);
if (b) {
printf("Initialize started.\n");
} else {
printf("Initialize failed with %d\n", GetLastError());
}
}