Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
969 B

  1. #include <windows.h>
  2. #include <stdio.h>
  3. #include <ftapi.h>
  4. void __cdecl
  5. main(
  6. int argc,
  7. char** argv
  8. )
  9. {
  10. int i;
  11. BOOL b;
  12. FT_LOGICAL_DISK_ID diskId[100], newDiskId;
  13. FT_STRIPE_SET_CONFIGURATION_INFORMATION configInfo;
  14. if (argc < 3) {
  15. printf("usage: %s <diskId1> <diskId2> ...\n", argv[0]);
  16. return;
  17. }
  18. printf("Creating a stripe for");
  19. for (i = 1; i < argc; i++) {
  20. sscanf(argv[i], "%I64X", &diskId[i - 1]);
  21. printf(" %I64X", diskId[i - 1]);
  22. }
  23. printf(" ...\n");
  24. configInfo.StripeSize = 0x10000;
  25. b = FtCreateLogicalDisk(FtStripeSet, (WORD) (argc - 1), diskId,
  26. sizeof(configInfo), &configInfo, &newDiskId);
  27. if (b) {
  28. printf("Stripe %I64X created.\n", newDiskId);
  29. } else {
  30. printf("Stripe create failed with %d\n", GetLastError());
  31. }
  32. }