Skip to content
This repository has been archived by the owner on Jun 10, 2021. It is now read-only.

Commit

Permalink
added blocks written output
Browse files Browse the repository at this point in the history
  • Loading branch information
davidferguson committed May 17, 2016
1 parent 4c5f4d5 commit 43af1b0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
8 changes: 4 additions & 4 deletions info.rc
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
1 VERSIONINFO
FILEVERSION 0,0,0,1
PRODUCTVERSION 0,0,0,1
FILEVERSION 0,0,0,2
PRODUCTVERSION 0,0,0,2
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "080904E4"
BEGIN
VALUE "FileDescription", "Command line version of Win32DiskImager"
VALUE "FileVersion", "0.0.0.1"
VALUE "FileVersion", "0.0.0.2"
VALUE "InternalName", "CommandLineDiskImager"
VALUE "OriginalFilename", "CommandLineDiskImager.exe"
VALUE "ProductName", "CommandLineDiskImager"
VALUE "ProductVersion", "0.0.0.1"
VALUE "ProductVersion", "0.0.0.2"
END
END

Expand Down
Binary file modified info.res
Binary file not shown.
14 changes: 14 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,22 @@ int main(int argc, char *argv[])
printf("\nerror - not enough space");
return 1;
}

char total_string[32];
sprintf(total_string, "%d", numsectors);

for (i = 0ul; i < numsectors && status == STATUS_WRITING; i += 1024ul)
{
if( i % 100 == 0 )
{
char i_string[32];
sprintf(i_string, "%d", i);
printf(i_string);
printf("/");
printf(total_string);
setbuf(stdout, NULL);
}

sectorData = readSectorDataFromHandle(hFile, i, (numsectors - i >= 1024ul) ? 1024ul:(numsectors - i), sectorsize);
if (sectorData == NULL)
{
Expand Down

0 comments on commit 43af1b0

Please sign in to comment.