Commit graph

200 commits

Author SHA1 Message Date
Mark Pizzolato
06c696385f SCP: Coverity inspired changes 2022-03-06 02:11:57 -08:00
Mark Pizzolato
eac0e5680b DISK: Add SET NOAUTOSIZE - disable autosize when attaching existing containers
This is a global command possibly for folks who have configurations which
always explicitly specify the drive type they want a particular unit to be
before they attach a container to the unit.  The side effect of this will
be to avoid the addition of drive type describing meta data to disk
containers.
2022-02-14 15:06:34 -08:00
Mark Pizzolato
3949f62e89 SCP: Use sim_messagef for all error paths in attach_unit and sim_disk_attach 2022-02-14 04:00:04 -08:00
Mark Pizzolato
b557eaf6e2 DISK: Add support for attach/detach of memory buffered drives (UNIT_MUSTBUF) 2022-02-13 22:51:48 -08:00
Mark Pizzolato
e6c4b01f2e DISK: Provide coherent messages when container encountering incompatibility 2022-02-11 02:06:45 -08:00
Mark Pizzolato
92b1efe50f DISK: Clarify minor changes to sim_disk API in the documentation 2022-02-10 07:10:08 -08:00
Mark Pizzolato
a94a9ac28f DISK: Allow for attach time copies of dissimilar sized disk containers 2022-02-09 08:33:38 -08:00
Mark Pizzolato
b8903f303f DISK: Add highwater support to the container meta data
The highwater support records the furthest logical sector in a disk
container that has been written by the simulator when accessing
the device.
2022-02-08 19:07:00 -08:00
Mark Pizzolato
5015d6ae14 DISK: Cleanup attach behaviors add better support for containers with meta data
At this time:
- The ZAP command exists to remove meta data from containers that
   have it.  Container files processed by the ZAP command will generally
   be restored to the size it was before the addition of the meta data
   and the file time stamps will be unchanged.
- Newly created containers get meta data.
- At attach time, containers that don't have meta data, but have
   recognized file systems that fit within the drive it is being
   attached to get meta data added without changing the file timestamps.
- Containers that don't have meta data and don't have a recognized
   file system that is <= the drive size are attached without comment
   and without adding meta data as long as the drive is NOT set to
   autosize (controllers that support multiple drive types all default to
   autosize, which can explicitly be disabled on a drive by drive basis).
- Containers that don't have meta data which are > the drive size can
   only be attached read only.
- Containers with meta data can not be attached to a different
   controller at all if the container size is smaller than the drive on the
   other controller.
- Containers that have meta data can be freely be attached to the
   controller that they were attached to when they got the meta data.
   If a file system is detected, it will be reported.  Otherwise if no
   recognized file system is found, the attach will be silent.  File
   system detection reporting can be suppressed with -Q on the attach
   command.
- Containers with meta data can only be attached read only to a different
   controller if the container is larger than the drive it is being
   attached to.
In the future:
- In general, containers with meta data (or recognized file systems)
   will be attachable to MSCP and SCSI controllers, as long as reasonable
   sector sizes and file system not requiring interleaving have been found.
- Containers without meta data will only be attachable if autosize
   is disabled and the container is <= the size of the drive.
- Explicitly setting a drive type on a unit will implicitly disable
   autosizing.  If a user wants to set the default drive for a unit
   and still allow autosizing they must explicitly set the unit to
   autosize after setting the drive type.

Relevant to: #1065, #1059, #1094, #1100, #1118, #1117
2022-02-07 22:55:23 -08:00
Mark Pizzolato
a4054f33b8 SCP: Add command argument passed into library unit test routines 2022-02-07 04:21:16 -08:00
Mark Pizzolato
39f2ab96cc DISK: Add logic to avoid zapping an attach container file
- ZAP with -Z switch now trims all zero sectors, where the default is
   to trim zero sectors added beyond the container file size when the
   meta data was added.
- Remove file system wording from the skipping autosizing message.
2022-01-22 10:13:29 -08:00
Mark Pizzolato
99c5f2a763 DISK: Record original container file size in footer restore size during removal 2022-01-20 17:24:45 -08:00
Mark Pizzolato
121b0323a6 DISK: Disallow attach of unrecognized disk container > size of the current unit
Containers without recognized file systems already won't autosize, but now
you can't attach a container which is larger than the current drive type
presuming there is useful data beyond the size of the current drive type.
2021-12-15 16:54:04 -08:00
Mark Pizzolato
c5cd38afbf SCP, makefile: Rename build conditional HAVE_DLOPEN to SIM_HAVE_DLOPEN
Some dependent packages on some platforms may also define HAVE_DLOPEN
and that definition may have different syntax or semantics.  This change
avoids the potential symbol conflict.

As reported in #1098
2021-12-04 17:44:57 -08:00
Mark Pizzolato
b4fa00cebf DISK: Properly allow/disallow containers of reasonable/unreasonavle sizes
As reported in #1065
2021-10-31 04:32:54 -07:00
Mark Pizzolato
e6611c61b3 DISK: Preserve container dates when adding or removing container meta data 2021-10-31 04:24:25 -07:00
Mark Pizzolato
feec1da242 DISK, TAPE: Add optional library specific DEVICE context structure
- add disk and tape library initialization routines
- cleanup snprintf arguments
- truncate disk container trailing zero sectors when zapping
2021-09-20 12:28:11 -07:00
Mark Pizzolato
64b1223468 DISK: Add sim_disk_erase API 2021-08-17 15:35:51 -07:00
Mark Pizzolato
f95b20e1f3 SCP: Cleanup potential compiler warnings 2021-08-13 09:09:53 -07:00
Mark Pizzolato
502ebeafc3 DISK: Clarify comments for logic generating attach error messages
as discussed in #1064
2021-08-13 02:35:29 -07:00
Mark Pizzolato
fdd871da65 DISK: Clean up attach time error messages
- Fix 'non expandable' error message to avoid potential extra space as
   mentioned in #1065
- Reasonably report open errors as mentioned in #1064
2021-08-07 19:15:33 -07:00
Mark Pizzolato
a779de82aa DISK: Enrich ATTACH time error message to include C runtime error text
Standardize format and wording of error reporting messages

As discussed in #1064
2021-08-07 12:56:20 -07:00
Mark Pizzolato
a5b7ebe44b DISK: Assure that all reads past EOF read as 0 data, even partial sector reads 2021-01-27 12:47:36 -08:00
John Forecast
18d6247cb7 DISK: Add file system detection on interleaved device file system images
- DEC filesystems on RX01 and RX02 devices interleave data
- Add additional RT11 file system detection for images created by exchange
  on VMS.
2021-01-23 21:02:52 -08:00
Mark Pizzolato
8c42a3436c VAXen with SCSI: Allow some cross controller read only drive access 2020-12-29 11:14:34 -08:00
Mark Pizzolato
52fbdcd1f0 DISK: Fix Compiler warning 2020-10-13 05:23:02 -07:00
Mark Pizzolato
187ee83f07 DISK: Use memset and strlcpy rather than strncpy for fixed size strings 2020-10-11 15:33:23 -07:00
Mark Pizzolato
31606161ce SCP: Avoid potential compiler warnings
Essentially all are non-functional problems but silencing them is a good idea
2020-10-09 05:09:41 -07:00
Mark Pizzolato
c3f28e33e9 DISK: Extend DISKINFO command to work on wildcard file specifications 2020-08-11 07:29:10 -07:00
Peter Coghlan
2f79d796cf DISK: Initialize return values to 0 for unimplemented OS and VHD functions 2020-06-10 07:46:26 -07:00
Mark Pizzolato
5bec9d58dd DISK: Avoid trying to change drive type when it is already correct. 2020-05-02 13:34:26 -07:00
Mark Pizzolato
0b3e415b8e DISK: Cleanup compiler warnings 2020-04-30 02:59:30 -07:00
Mark Pizzolato
7082e212ea DISK: Avoid autosizing if file system can't be determined
Add DISKINFO command to display information about a disk container file.
2020-04-29 13:21:12 -07:00
Mark Pizzolato
aa380517fa DISK: Add support for arbitrary sector sizes in all container formats 2020-04-29 12:21:08 -07:00
Mark Pizzolato
580b388917 DISK: Add ATTACH copy option to create a SIMH or VHD copy
- Fail ATTACH when container type doesn't match drive type and autosizing
  is disabled.
- Be sure to write data at the end of a VHD container right up to the end of
  the disk.
2020-04-22 08:55:36 -07:00
Mark Pizzolato
d225629b9a DISK: Always open VHD containers as VHD without regard to the selected format 2020-04-20 21:22:12 -07:00
Mark Pizzolato
e872682d3c DISK: Major rework to support VHD's with other than 512 byte sectors
- Added rigorous disk test routine to exercise all supported disk container
  formats with various sector sizes and storage element sizes
- Extended logic to validate disk container simulated device consistency
  with the simulator and/or controller accessing it.
2020-04-17 17:34:28 -07:00
Mark Pizzolato
07682806a5 DISK: Fix size detection and validation for VHD disks 2020-04-13 10:05:46 -07:00
Mark Pizzolato
d0022e9328 DISK: Update VHD Footer to current info 2020-04-12 08:13:28 -07:00
Mark Pizzolato
049ba32505 DISK: Add robust disk container validation 2020-04-11 13:01:48 -07:00
Mark Pizzolato
ab66fa1484 DISK: Fix attach time auto sizing to walk through list of potential drive types 2020-04-05 16:50:16 -07:00
Mark Pizzolato
73df9b1c4e PDP10, PDP11, Massbus VAXen, DISK: Rework PDP10 use of sim_disk
- Make all PDP11, VAX RP and RQ devices autosizing behave similarly
- Generalize the attach help to be specific to the device/system being
   attached
- Remove the sim_disk_pdp10_* calls which weren't correct or needed
   since sim_disk_attach_ex provides sector size which is used correctly
2020-04-03 17:32:14 -07:00
Mark Pizzolato
b7824943df DISK: Minimize the sim_disk_pdp10_attach arguments to minimize aguments
The sim_disk_pdp10_... API's specifically provide 1024 byte sector
interfaces for 64bit data.

Customize the attach help output to be more appropriate for the devices
in the running simulator and the device who's help is being displayed.
2020-03-31 19:37:33 -07:00
John Forecast
6efa9c0a92 PDP10, DISK: Add sim_disk support for PDP10 format disks add to the RP device
This allows the underlying disk container formats that that sim_disk supports
(VHD, SIMH or RAW) to be accessed from the PDP10 KS10 simulator, and later
on to Rich Cornwell's PDP10-KA, PDP10-KI, and PDP10-KL simulators.
2020-03-31 15:20:04 -07:00
John Forecast
89215d8288 DISK: Fix Coverity flagged issues with tainted data and potential overflow 2020-02-17 19:14:51 -08:00
Mark Pizzolato
e333a691d0 DISK: Ignore NULL unit with HELP <dev> ATTACH for disk devices
Related to activities in #801
2020-02-10 10:41:33 -08:00
Mark Pizzolato
78f8599024 DISK: Limit HELP output attach commands to at most 4 disks
As discussed in #801
2020-02-09 07:17:12 -08:00
John Forecast
d00c1d4540 DISK: Add RSTS file system recognizer
Thorough fix to #581
2020-02-07 15:51:12 -08:00
Mark Pizzolato
519ef27def DISK, TAPE: Remove compiler and Coverity warnings 2019-11-24 10:55:25 -08:00
Mark Pizzolato
4e5780e15e DISK: Allow file system sizing if device doesn't have DEV_SECTORS set_cmd
As it turns out, the RD device in the MicroVAX 2000 systems reasonably
doesn't have DEV_SECTORS set in the DEVICE flags.

Follow on to #768.
2019-11-16 20:57:58 -08:00