Skip to content

Commit 85fb213

Browse files
author
Tyler Erickson
committed
bug: Changing fast format to stay busy until complete
Changing fast format options to hold the bus busy until the format is complete in order to make sure the drive completes the format as expected without interruptions from the OS or the user. This was added after observing that drives doing fast format report 100% right away, however this is confusing as the sense data still shows that the drive is busy with a format. Setting it to hold busy makes it more clear when the drive is actually done and ready. Signed-off-by: Tyler Erickson <[email protected]>
1 parent 186a012 commit 85fb213

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

utils/C/openSeaChest/openSeaChest_Erase.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
// Global Variables //
4848
////////////////////////
4949
const char *util_name = "openSeaChest_Erase";
50-
const char *buildVersion = "3.0.2";
50+
const char *buildVersion = "3.0.3";
5151

5252
////////////////////////////
5353
// functions to declare //
@@ -1988,6 +1988,10 @@ int32_t main(int argc, char *argv[])
19881988
currentBlockSize = false;
19891989
}
19901990
formatUnitParameters.formatType = FAST_FORMAT_FLAG;
1991+
if (FAST_FORMAT_FLAG > 0)
1992+
{
1993+
formatUnitParameters.disableImmediate = true;//for fast format, we want to hold the bus busy until it is done.
1994+
}
19911995
formatUnitParameters.currentBlockSize = currentBlockSize;
19921996
formatUnitParameters.newBlockSize = FORMAT_SECTOR_SIZE;
19931997
formatUnitParameters.gList = NULL;

utils/C/openSeaChest/openSeaChest_Format.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
// Global Variables //
3535
////////////////////////
3636
const char *util_name = "openSeaChest_Format";
37-
const char *buildVersion = "2.2.0";
37+
const char *buildVersion = "2.2.1";
3838

3939
////////////////////////////
4040
// functions to declare //
@@ -1241,6 +1241,11 @@ int32_t main(int argc, char *argv[])
12411241
}
12421242
//formatUnitParameters.defaultFormat = FORMAT_UNIT_DEFAULT_FORMAT;//change to true when a user wants a default format...This is basically obsolete now due to the above code, but left in place in case someone wants to try some weird bit combinations
12431243
formatUnitParameters.disableImmediate = FORMAT_UNIT_DISABLE_IMMEDIATE_RESPONSE;
1244+
if (FAST_FORMAT_FLAG > 0)
1245+
{
1246+
//For a fast format, make the drive hold the bus instead or return immediately for a better overall result and reduced risk of being interrupted during the format.
1247+
formatUnitParameters.disableImmediate = true;
1248+
}
12441249
//Set the same protection information as we discovered first.
12451250
formatUnitParameters.changeProtectionType = false;
12461251
//override protection info if we were asked to.

0 commit comments

Comments
 (0)