home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 575.lha / DiskInfo_v1.13 / DiskInfo1.13.TXT.pp / DiskInfo1.13.TXT
Text File  |  1991-12-03  |  11KB  |  286 lines

  1.  
  2.  
  3.                                  DiskInfo
  4.                                Version 1.13
  5.  
  6.                            Written by Gregg Giles
  7.                               17 November 1991
  8.  
  9.                          Security Leak Publications
  10.                           3330 Kinsrow Avenue 217,
  11.                            Eugene, OR 97401, USA.
  12.  
  13.                                 BIX: ggiles
  14.                             AmigaX: 503/342-2144
  15.                          Amigalectric: 912/922-5655
  16.  
  17.  
  18.   This program is public domain. Spread it at will - populate the world!
  19.     Donations and contributions will be accepted, but are not demanded.
  20.                    Suggestions and ideas are always welcomed!
  21.  
  22.  
  23.  
  24. ***************************************************************************
  25. *** Purpose                                                             ***
  26. ***************************************************************************
  27.  
  28.    DiskInfo is a tool which can be used to display information about any
  29. Amiga storage media, including disks, hard disks and memory. Eventually it
  30. will be worthy of completely replacing the Workbench "Info" command. It can
  31. be executed as an AmigaDOS command from the Workbench or Shell.
  32.  
  33.  
  34. ***************************************************************************
  35. *** Requirements                                                        ***
  36. ***************************************************************************
  37.  
  38.    For this program to operate properly, you must have the following:
  39.    (*) An Amiga (any model)
  40.    (*) Workbench 2.04
  41.    (*) A working knowledge of the Workbench and Shell environments
  42.    (*) This program
  43.  
  44.  
  45. ***************************************************************************
  46. *** Usage                                                               ***
  47. ***************************************************************************
  48.  
  49.    This program may be executed from the Workbench using the "Workbench/
  50. Execute Command..." option, or from the Shell. Usage is the same from either
  51. environment:
  52.                            DiskInfo <Device>
  53.  
  54.    The "<device>", of course, is the name of any storage device or volume.
  55. Further arguments are not present in this version of the program. If no
  56. device is specified, the following will be displayed:
  57.  
  58. DiskInfo (Version 1.13) by Gregg Giles
  59. Purpose: Gives a complete status report on any mounted AmigaDOS device.
  60. Usage  : DiskInfo <Device>
  61.  
  62.  
  63. ***************************************************************************
  64. *** Usage Examples                                                      ***
  65. ***************************************************************************
  66.  
  67.    These examples assume that you have booted from your Workbench 2.04
  68. distribution disk, and your Extras disk is in DF1:. Issue this command:
  69.  
  70.    1> DiskInfo DF0:
  71.  
  72.    Most information of interest to the average user will be displayed, and
  73. will appear like this (or similar to it):
  74.  
  75. Name  : Workbench2.0:        Errors : 0                    Bytes   Blocks
  76. Status: Write Protected      Full   : 94 %       Size:    857904     1758
  77. Type  : AmigaDOS OFS         In Unit: 0          Used:    808128     1656
  78. Block : 488 bytes            In Use : Yes        Free:     49776      102
  79.  
  80.    Issuing the following command will show what resides on the Extras disk:
  81.  
  82.    1> DiskInfo DF1:
  83.  
  84.    Something similar to the following will appear:
  85.  
  86. Name  : Extras2.0:           Errors : 0                    Bytes   Blocks
  87. Status: Write Protected      Full   : 84 %       Size:    857904     1758
  88. Type  : AmigaDOS OFS         In Unit: 1          Used:    726144     1488
  89. Block : 488 bytes            In Use : Yes        Free:    131760      270
  90.  
  91.    This, of course, is assuming that no errors occur. Further explanation
  92. of each field can be found later in this document. Other examples of using
  93. DiskInfo include:
  94.  
  95. Command              Description
  96. ----------------------------------------------------------------------------
  97. DiskInfo DF0:        Shows information about disk in unit 0 (DF0:)
  98. DiskInfo DF1:        Shows information about disk in unit 1 (DF1:)
  99. DiskInfo DF2:        Shows information about disk in unit 2 (DF2:)
  100. DiskInfo DF3:        Shows information about disk in unit 3 (DF3:)
  101. DiskInfo DH0:        Shows information about hard disk partition DH0:
  102. DiskInfo DH1:        Shows information about hard disk partition DH1:
  103. DiskInfo RAM:        Shows information about the RAM: disk
  104. DiskInfo RAD:        Shows information about the RAD: disk
  105. DiskInfo Extras2.0:  Shows information about a volume named "Extras2.0"
  106. DiskInfo Pictures1:  Shows information about a volume name "Pictures1"
  107.  
  108.    Logical devices created using the "Assign" command may be used in place
  109. of a physical storage device (ie: "c:", "libs:", "devs:", etc.) However, in
  110. such cases, information about the physical media on which that logical
  111. device resides will be displayed.
  112.    For example, assuming you booted from your Workbench 2.04 distribution
  113. disk, use this command and view the ensuing results:
  114.  
  115.    1> DiskInfo C:
  116.  
  117. Name  : Workbench2.0:C       Errors : 0                    Bytes   Blocks
  118. Status: Write Protected      Full   : 94 %       Size:    857904     1758
  119. Type  : AmigaDOS OFS         In Unit: 0          Used:    808128     1656
  120. Block : 488 bytes            In Use : Yes        Free:     49776      102
  121.  
  122.    Notice that the "name" field gives the complete path to the logical
  123. device specified.
  124.  
  125.  
  126. ***************************************************************************
  127. *** Explanation of Fields                                               ***
  128. ***************************************************************************
  129.  
  130.    The program displays rougly a dozen fields when executed (assuming there
  131. are no errors). They are described as follows.
  132.  
  133. Field    : NAME
  134. Purpose  : Name of the disk (or volume) being examined.
  135. Output   : A valid Amiga disk name. If a logical device name is given, a
  136.            full path name will be displayed.
  137.  
  138.  
  139. Field    : STATUS
  140. Purpose  : Physical status of the disk.
  141. Output   : Possible results include:
  142.  
  143.    "Write Protected":
  144.       Disk is write protected. (Formerly "Read Only" in program versions).
  145.    "Validating":
  146.       The disk's structure has been corrupted, and AmigaDOS is attempting
  147.       to correct the problem.
  148.    "Validated (Writable)":
  149.       The disk's structure is stable, and thus can be written to or read
  150.       from. (Formerly "Read/Write" in earlier program versions).
  151.    "Unknown":
  152.       The disk's status cannot be determined.
  153.  
  154.  
  155. Field    : TYPE
  156. Purpose  : Type of disk.
  157. Output   : Possible results include:
  158.  
  159.    "AmigaDOS OFS":
  160.       A standard AmigaDOS OFS disk (Old File System). All disks formatted
  161.       using "Format" command under Workbench 1.0-1.3 were OFS format disks
  162.       (Workbench 2.0 will read/write/format OFS disks.)
  163.    "AmigaDOS FFS":
  164.       A standard AmigaDOS FFS disk (Fast File System). Most likely a disk
  165.       created using the "Format" command under Workbench 2.00 and later
  166.       versions.
  167.    "Unknown (????)":
  168.       The format of the disk cannot be determined. Possibly a disk format
  169.       not known about at the time of the creation of this program.
  170.  
  171.    Note: Subsequent versions of this program may be able to recognize the
  172.    following disk types: BAD (unreadable/corrupted), KICK (Amiga Kickstart
  173.    disk), NDOS (Format of the disk is good, but it does not use any known
  174.    AmigaDOS format; possibly a proprietary file format such as those often
  175.    used as copy protection for games).
  176.  
  177.  
  178. Field    : BLOCK
  179. Purpose  : The number of bytes that compose one block on the disk.
  180. Output   : A positive numeric value.
  181.  
  182.  
  183. Field    : ERRORS
  184. Purpose  : Number of read/write errors on the disk.
  185. Output   : A positive numeric value.
  186.  
  187.  
  188. Field    : FULL
  189. Purpose  : Percentage of the disk which is full.
  190. Output   : A positive numeric percentage (rounded off).
  191.  
  192.  
  193. Field    : IN UNIT
  194. Purpose  : AmigaDOS unit number in which the disk resides.
  195. Output   : Possible results include:
  196.  
  197.    -1: The RAM: device
  198.    0 : Floppy disk DF0:
  199.    1 : Floppy disk DF1:
  200.    2 : Floppy disk DF2:
  201.    x : Any unknown unit number, where (x) is the number of that unit.
  202.        (Note: Some hard disk partitions may appear as unit 0.)
  203.  
  204.  
  205. Field    : IN USE
  206. Purpose  : Message telling if the disk is currently in use.
  207. Output   : Possible results include:
  208.  
  209.    "Yes": The disk is in use.
  210.    "No" : The disk is not in use.
  211.  
  212.  
  213. Field    : SIZE (BYTES)
  214. Purpose  : Total byte storage capacity of the disk.
  215. Output   : A positive numeric value. Note that this is the total actual
  216.            storage possible. The Amiga file system will reduce the total
  217.            available free storage space.
  218.  
  219.  
  220. Field    : SIZE (BLOCKS)
  221. Purpose  : Total block storage capacity of the disk.
  222. Output   : A positive numeric value.
  223.  
  224.  
  225. Field    : USED (BYTES)
  226. Purpose  : Number of bytes of the disk which have been used.
  227. Output   : A positive numeric value.
  228.  
  229.  
  230. Field    : USED (BLOCKS)
  231. Purpose  : Number of blocks of the disk which have been used.
  232. Output   : A positive numeric value.
  233.  
  234.  
  235. Field    : FREE (BYTES)
  236. Purpose  : Number of bytes of the disk which are not yet used.
  237. Output   : A positive numeric value.
  238.  
  239.  
  240. Field    : FREE (BLOCKS)
  241. Purpose  : Number of blocks of the disk which are not yet used.
  242. Output   : A positive numeric value.
  243.  
  244.  
  245. ***************************************************************************
  246. *** Program Integrity & Bugs                                            ***
  247. ***************************************************************************
  248.  
  249.    It is the author's goal to keep this program as stable, correct, and as
  250. bug-free as possible. For this reason it employs careful error checking
  251. techniques, particularly when dealing with locks and memory. Everything
  252. which is opened is closed, even when errors occur. As an Amiga user
  253. himself, the author loves cleanly written programs, particularly those
  254. that don't suck up system resources when they screw up.
  255.    This program has its own built-in error messages, and all are largely
  256. self-explanitory. These error messages generally only appear when the
  257. user has done something incorrectly (ie: trying to examine a disk in a
  258. drive when no disk is present).
  259.    However, should you discover any bugs in this program, please record them
  260. and contact me immediately so that they may be corrected and the fixed
  261. version of the program released.
  262.  
  263.  
  264. ***************************************************************************
  265. *** Revisions & Planned Enhancements                                    ***
  266. ***************************************************************************
  267.  
  268. Planned Enhancements:
  269. * Wildcards, including the AmigaDOS wildcard combination (#?) and the
  270.   well-liked asterisk (*) familiar to UNIX, MS-DOS, and Amiga ARP users.
  271. * Enable recognition of disk formats other than AmigaDOS.
  272. * Enable display of all mounted devices simultaneously, much like the
  273.   AmigaDOS Info command when used with no flags.
  274.  
  275. The following changes have been made to this program since the previous
  276. version:
  277.  
  278. * Now using official 2.04 #defines for return codes instead of self-defined
  279.   return codes of 1.12. Makes program a little smaller.
  280. * Device lock changed from ACCESS_READ to new synonomous SHARED_LOCK.
  281. * Error checking code streamlined. Makes program a little smaller.
  282. * Error messages improved; now use Workbench 2.04 messages from IoErr().
  283. * Breaking with Control-C is now impossible; prevents dangerous situations.
  284.  
  285. *EOF*
  286.