int main(int argc, char *argv[]) { long file_size = (long) DEFAULT_FILE_SIZE; // printf("%d",sizeof(file_size)); unsigned char drive_path[256]; char *opts[256]; FILE *f; #if (OS == 0) fprintf(stderr, "\nError: current OS is not supported."); goto exit; #endif //read input params if (get_opts(argc, argv, drive_path) != 0){ goto exit; } if (can_write(drive_path) != 0){ fprintf(stderr, "\nError: unable to access/write to drive \"%s\"", drive_path); goto exit; } // fseek(&drive_path, 0, SEEK_END); BOOL ret; DWORD SectorsPerCluster; DWORD BytesPerSector; DWORD NumberOfFreeClusters; DWORD TotalNumberOfClusters; DWORD TotalSpace, TotalSpaceLeft; GetFreeSpace(drive_path); TotalSpace = BytesPerSector * SectorsPerCluster*TotalNumberOfClusters; TotalSpaceLeft=BytesPerSector * SectorsPerCluster * NumberOfFreeClusters; printf(" Drive: Total Space=%u bytes Space Left=%u Bytes\n",TotalSpace,TotalSpaceLeft); // TotalSpace = (double)diskfree.sectors_per_cluster * (double)diskfree.bytes_per_sector *(double)diskfree.total_clusters / (1024.0*1024.0); fprintf(stdout,"\nsize of drive : %d",TotalSpace); fprintf(stdout,"\nsize of drive trilok : %s",drive_path); char D; fprintf(stdout,"\nsize of drive : %d",sizeof(drive_path)); //wipe free space fprintf(stdout, "\nPress ENTER to start wiping free space of drive \"%s\"", drive_path); getchar(); wipe_wrap(drive_path, file_size); exit: fprintf(stdout, "\n\nWebsite: https://sourceforge.net/projects/simpledrivewipe/"); fprintf(stdout, "\nPress ENTER to quit."); fflush(stdout); getchar(); ////////////////////////trilok////////////////////////////// return 0; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)