home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / disks / ratunku / rdbmount / hardblocks.doc next >
Text File  |  2002-07-03  |  8KB  |  310 lines

  1. TABLE OF CONTENTS
  2.  
  3. hardblocks.library/LoadHardBlocks
  4. hardblocks.library/SaveHardBlocks
  5. hardblocks.library/RestoreHardBlocks
  6. hardblocks.library/BackupHardBlocks
  7. hardblocks.library/PrintHardBlocks
  8. hardblocks.library/FreeHardBlocks
  9. hardblocks.library/RemoveHardBlocks
  10. hardblocks.library/InitRigidDiskBlock
  11. hardblocks.library/LastHardBlockNum
  12. hardblocks.library/LoadHardBlocks           hardblocks.library/LoadHardBlocks
  13.  
  14.    NAME
  15.     LoadHardBlocks - read hardblocks from SCSI device
  16.  
  17.    SYNOPSIS
  18.     error = LoadHardBlocks(rdb, device, unit)
  19.       D0                   A0     A1     D0
  20.  
  21.     USHORT LoadHardBlocks(struct RigidDiskBlock *, BYTE *, ULONG);
  22.  
  23.    FUNCTION
  24.     This routine reads the hardblocks from specified unit of SCSI
  25.     device. The hardblocks are stored in given RigidDiskBlock
  26.     structure.
  27.     All block numbers, eg. rdb_PartitionList, xxx_Next,
  28.     fhb_SegListBlocks ..., are represented by POINTERS to blocks in
  29.     memory. Use FreeHardBlocks() to release memory allocated for this
  30.     hardblocks.
  31.  
  32.     Note as NULL block address isn't used $ffffffff, but ZERO.
  33.  
  34.    INPUTS
  35.     rdb -- a pointer to a free RigidDiskBlock structure
  36.     device -- the name of the SCSI device
  37.     unit -- the unit number of SCSI device
  38.  
  39.    RESULTS
  40.     error -- 0 if the call succeeded else an error code as defined in
  41.          <libraries/hardblocks.h>
  42.  
  43.    SEE ALSO
  44.     SaveHardBlocks(), FreeHardBlocks()
  45.  
  46.    BUGS
  47.     None
  48.  
  49. hardblocks.library/SaveHardBlocks           hardblocks.library/SaveHardBlocks
  50.  
  51.    NAME
  52.     SaveHardBlocks - write hardblocks to SCSI device
  53.  
  54.    SYNOPSIS
  55.     error = SaveHardBlocks(rdb, device, unit)
  56.       D0                   A0     A1     D0
  57.  
  58.     USHORT SaveHardBlocks(struct RigidDiskBlock *, BYTE *, ULONG);
  59.  
  60.    FUNCTION
  61.     This routine writes the hardblocks defined in given RigidDiskBlock
  62.     to specified unit of SCSI device.
  63.     The hardblocks can be built by an call to LoadHardBlocks() and
  64.     RestoreHardBlocks() or constructed manually.
  65.  
  66.    INPUTS
  67.     rdb -- a pointer to a properly initialized RigidDiskBlock structure
  68.     device -- the name of the SCSI device
  69.     unit -- the unit number of SCSI device
  70.  
  71.    RESULTS
  72.     error -- 0 if the call succeeded else an error code as defined in
  73.          <libraries/hardblocks.h>
  74.  
  75.    SEE ALSO
  76.     LoadHardBlocks(), RestoreHardBlocks(), FreeHardBlocks()
  77.  
  78.    BUGS
  79.     None
  80.  
  81. hardblocks.library/RestoreHardBlocks     hardblocks.library/RestoreHardBlocks
  82.  
  83.    NAME
  84.     RestoreHardBlocks - read hardblocks from file
  85.  
  86.    SYNOPSIS
  87.     error = RestoreHardBlocks(rdb, file)
  88.       D0                      A0    A1
  89.  
  90.     USHORT RestoreHardBlocks(struct RigidDiskBlock *, BYTE *);
  91.  
  92.    FUNCTION
  93.     This routine reads the hardblocks from specified file. The file must
  94.     be created with BackupHardBlocks(). The hardblocks are stored in
  95.     given RigidDiskBlock structure.
  96.     All block numbers, eg. rdb_PartitionList, xxx_Next,
  97.     fhb_SegListBlocks ..., are represented by POINTERS to blocks in
  98.     memory. Use FreeHardBlocks() to release memory allocated for this
  99.     hardblocks.
  100.  
  101.     Note as NULL block address isn't used $ffffffff, but ZERO.
  102.  
  103.    INPUTS
  104.     rdb -- a pointer to a free RigidDiskBlock structure
  105.     file -- the name of the file containing a hardblocks backup
  106.  
  107.    RESULTS
  108.     error -- 0 if the call succeeded else an error code as defined in
  109.          <libraries/hardblocks.h>
  110.  
  111.    SEE ALSO
  112.     BackupHardBlocks(), FreeHardBlocks()
  113.  
  114.    BUGS
  115.     None
  116.  
  117. hardblocks.library/BackupHardBlocks       hardblocks.library/BackupHardBlocks
  118.  
  119.    NAME
  120.     BackupHardBlocks - write hardblocks to file
  121.  
  122.    SYNOPSIS
  123.     error = BackupHardBlocks(rdb, file)
  124.       D0                     A0    A1
  125.  
  126.     USHORT BackupHardBlocks(struct RigidDiskBlock *, BYTE *);
  127.  
  128.    FUNCTION
  129.     This routine writes the hardblocks defined in given RigidDiskBlock to
  130.     specified file.
  131.     The hardblocks can be built by an call to LoadHardBlocks() and
  132.     RestoreHardBlocks() or constructed manually.
  133.  
  134.    INPUTS
  135.     rdb -- a pointer to a properly initialized RigidDiskBlock structure
  136.     file -- the name of the file containing a hardblocks backup
  137.  
  138.    RESULTS
  139.     error -- 0 if the call succeeded else an error code as defined in
  140.          <libraries/hardblocks.h>
  141.  
  142.    SEE ALSO
  143.     BackupHardBlocks(), FreeHardBlocks()
  144.  
  145.    BUGS
  146.     None
  147.  
  148. hardblocks.library/PrintHardBlocks         hardblocks.library/PrintHardBlocks
  149.  
  150.    NAME
  151.     PrintHardBlocks - show contents of hardblocks in human readable format
  152.  
  153.    SYNOPSIS
  154.     error = PrintHardBlocks(rdb, fh)
  155.       D0                    A0   A1
  156.  
  157.     USHORT PrintHardBlocks(struct RigidDiskBlock *, BPTR *);
  158.  
  159.    FUNCTION
  160.     This routine shows the contents of the hardblocks stored in given
  161.     RigidDiskBlock in human readable format. The routine sends its
  162.     output to specified file handle. This file handle is the result of
  163.     Output() or Open().
  164.     The hardblocks can be built by an call to LoadHardBlocks() and
  165.     RestoreHardBlocks() or constructed manually.
  166.  
  167.    INPUTS
  168.     rdb -- a pointer to a properly initialized RigidDiskBlock structure
  169.     fh -- the output file handle
  170.  
  171.    RESULTS
  172.     error -- 0 if the call succeeded else an error code as defined in
  173.          <libraries/hardblocks.h>
  174.  
  175.    SEE ALSO
  176.     LoadHardBlocks(), RestoreBlocks(), FreeHardBlocks()
  177.  
  178.    BUGS
  179.     None
  180.  
  181. hardblocks.library/FreeHardBlocks           hardblocks.library/FreeHardBlocks
  182.  
  183.    NAME
  184.     FreeHardBlocks - release hardblocks from memory
  185.  
  186.    SYNOPSIS
  187.     error = FreeHardBlocks(rdb)
  188.       D0                   A0
  189.  
  190.     USHORT FreeHardBlocks(struct RigidDiskBlock *);
  191.  
  192.    FUNCTION
  193.     This routine releases specified hardblocks from memory.
  194.     The hardblocks can be built by an call to LoadHardBlocks() and
  195.     RestoreHardBlocks() or constructed manually.
  196.  
  197.     All block numbers, eg. rdb_PartitionList, xxx_Next,
  198.     fhb_SegListBlocks ..., are represented by POINTERS to blocks in
  199.     memory.
  200.  
  201.     Note as NULL block address isn't used $ffffffff, but ZERO.
  202.  
  203.    INPUTS
  204.     rdb -- a pointer to a properly initialized RigidDiskBlock structure
  205.  
  206.    RESULTS
  207.     error -- 0 if the call succeeded else an error code as defined in
  208.          <libraries/hardblocks.h>
  209.  
  210.    SEE ALSO
  211.     LoadHardBlocks(), RestoreBlocks()
  212.  
  213.    BUGS
  214.     None
  215.  
  216. hardblocks.library/RemoveHardBlocks       hardblocks.library/RemoveHardBlocks
  217.  
  218.    NAME
  219.     RemoveHardBlocks - delete hardblocks from SCSI device
  220.  
  221.    SYNOPSIS
  222.     error = RemoveHardBlocks(device, unit)
  223.       D0                       A0     D0
  224.  
  225.     USHORT RemoveHardBlocks(BYTE *, ULONG);
  226.  
  227.    FUNCTION
  228.     This routine tries to delete any existent hardblocks from specified
  229.     unit of SCSI device.
  230.  
  231.     Note that only the RigidDiskBlock found within the first 16 blocks
  232.     of the device will be cleared. All other hardblocks are left intact.
  233.  
  234.    INPUTS
  235.     device -- the name of the SCSI device
  236.     unit -- the unit number of SCSI device
  237.  
  238.    RESULTS
  239.     error -- 0 if the call succeeded else an error code as defined in
  240.          <libraries/hardblocks.h>
  241.  
  242.    SEE ALSO
  243.     SaveHardBlocks()
  244.  
  245.    BUGS
  246.     None
  247.  
  248. hardblocks.library/InitRigidDiskBlock   hardblocks.library/InitRigidDiskBlock
  249.  
  250.    NAME
  251.     InitRigidDiskBlock - initialize RigidDiskBlock with standard values
  252.  
  253.    SYNOPSIS
  254.     error = InitRigidDiskBlock(rdb, device, unit)
  255.       D0                       A0     a1     D0
  256.  
  257.     USHORT InitRigidDiskBlock(struct RigidDiskBlock *, BYTE *, ULONG);
  258.  
  259.    FUNCTION
  260.     This routine completely initializes given RigidDiskBlock with data
  261.     feom specified unit of SCSI device. It clears all block list heads,
  262.     fills physical drive characteristics with data from MODE SENSE +
  263.     READ CAPACITY and gets drive identification via INQUIRY. The host id
  264.     and block size are determined too.
  265.  
  266.    INPUTS
  267.     rdb -- a pointer to a free RigidDiskBlock structure
  268.     device -- the name of the SCSI device
  269.     unit -- the unit number of SCSI device
  270.  
  271.    RESULTS
  272.     error -- 0 if the call succeeded else an error code as defined in
  273.          <libraries/hardblocks.h>
  274.  
  275.    SEE ALSO
  276.  
  277.    BUGS
  278.     None
  279.  
  280. hardblocks.library/LastHardBlockNum       hardblocks.library/LastHardBlockNum
  281.  
  282.    NAME
  283.     LastHardBlockNum - calc block address of last hardblock
  284.  
  285.    SYNOPSIS
  286.     error = LastHardBlockNum(rdb)
  287.       D0                     A0
  288.  
  289.     USHORT LastHardBlockNum(struct RigidDiskBlock *);
  290.  
  291.    FUNCTION
  292.     This routine calculates the block address of the last block of
  293.     specified hardblocks. The result is stored in rdb_HighRDSKBlock.
  294.  
  295.     Note that the function starts counting with rdb_RDBBlocksLo, so this
  296.     must be initialized first.
  297.  
  298.    INPUTS
  299.     rdb -- a pointer to a properly initialized RigidDiskBlock structure
  300.  
  301.    RESULTS
  302.     error -- 0 if the call succeeded else an error code as defined in
  303.          <libraries/hardblocks.h>
  304.  
  305.    SEE ALSO
  306.  
  307.    BUGS
  308.     None
  309.  
  310.