a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Libraries:
 hdwrench.library
  FindControllerID
  FindDefaults
  FindDiskName
  FindLastSector
  HDWCloseDevice
  HDWOpenDevice
  InMemMountfile
  InMemRDBStructs
  LowlevelFormat
  OutMemMountfile
  OutMemRDBStructs
  QueryCapacity
  QueryFindValid
  QueryInquiry
  QueryModeSense
  QueryReady
  RawRead
  RawWrite
  ReadMountfile
  ReadRDBStructs
  ReadRDBs
  VerifyDrive
  WriteBlock
  WriteMountfile
  WriteRDBStructs
  WriteRDBs
  ZZexample
  description
Include
GuruMeditation
Docs » Autodocs » hdwrench.library » FindDefaults

NAME

    FindDefaults

SYNOPSIS

    error = FindDefaults ( Optimize, Return )
D0 D0 A0
ULONG FindDefaults ( BOOL Optimize, struct DefaultsArray *Return )

FUNCTION

    Determine last useable block on the drive. From this information
derive standard partitioning data according to three algorithms.
1) Use standard 1 megabyte per cylinder values. Fall back to 100k
per cylinder if waste space for 1 megabyte per cylinder is
greater than 0.1% of the drive. (Exact values: 1045876 and 106496
bytes respectively.
2) Attempt to optimize the disk per standard algorithm.
3) Attempt to optimize the disk per the old HardFrame algorithm.
(deprecated)

INPUTS

    Optimize    USHORT Flag bits to set optimization method
Return Pointer to struct DefaultsArray to contain return values
Optimize Flag bits:
DA_OPTIMIZE Attempt to optimize usage of the drive.
DA_HUGE Allow full usage of drives larger than 4 gigabytes.
(Otherwise default to 4 gigabytes on large drives.)
DA_HF_WAY Attempt to optimize with the old HF algorithm. This
flag preempts DA_OPTIMIZE and DA_HUGE if set. It's
use is deprecated.

NOTES

    This function requires the library already have a device open for the
evaluation process.

RESULT

    Error   ULONG error indication per following:
DA_NOERRORS Good results returned
DA_NO_CAPACITY_REPORT No capacity report received. (not fatal)
DA_NO_OPTIMIZE Could not optimize the drive. (not fatal)
DA_BAD_MODESENSE_4 No Format Device page mode sense returned
DA_BAD_MODESENSE_3 No Geometery page mode sense returned
DA_NO_DRIVE_OPEN Fatal: No drive open to evaluate.
DA_RIDICULOUS_VALUES Fatal: Values obtained are ridiculous*
* This means ridiculous as in contains zeros.

BUGS

    This function no longer considers the old Adaptec ST-506 to SCSI converter
boards. In fact it no longer considers ST-506 drives of any sort.

SEE ALSO

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Fairlight

ATX
DJ
FLT
DC

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se