Commit Graph

443 Commits

Author SHA1 Message Date
Uwe Seimet
073113539c Merge branch 'feature_controller_cleanup' into uweseimet_develop 2021-08-22 21:45:17 +02:00
Uwe Seimet
cec8068aac Merge branch 'develop' into feature_controller_cleanup 2021-08-22 21:39:45 +02:00
Uwe Seimet
39d4da64d4 Merge branch 'develop' into uweseimet_develop 2021-08-22 21:39:23 +02:00
Daniel Markstedt
66342dc18a
Fix for issue#197. Also removed the valid file extensions list from web/file_cmds.py since it wasn't used. (#205) 2021-08-22 21:37:43 +02:00
Uwe Seimet
9bbd11e77c Fixed assertion 2021-08-22 21:33:36 +02:00
Uwe Seimet
aa37868495 No need to set STATUSNOERROR, this is the default 2021-08-22 21:29:48 +02:00
Uwe Seimet
e1e1061837 Removed unused code 2021-08-22 21:25:09 +02:00
Uwe Seimet
30fed0e69c Reaming 2021-08-22 21:16:33 +02:00
Uwe Seimet
cd52a650f4 Refactoring 2021-08-22 21:07:18 +02:00
Uwe Seimet
2a939f5b38 Merged controller cleanup 2021-08-22 20:41:55 +02:00
Uwe Seimet
f4784c998d Testing 2021-08-22 20:35:30 +02:00
Uwe Seimet
4bdec5d8e4 Fixed typo 2021-08-22 20:30:08 +02:00
Uwe Seimet
fcedbf1e1d Updated LUN handling 2021-08-22 19:54:46 +02:00
Uwe Seimet
81f11b6dc2 Revert "LUN handling update"
This reverts commit 877c78ef7b.
2021-08-22 19:50:54 +02:00
Uwe Seimet
78bfd5bd14 Revert "Removed unused field cache_wb"
This reverts commit 6f845193d2.
2021-08-22 19:50:37 +02:00
Uwe Seimet
877c78ef7b LUN handling update 2021-08-22 19:48:37 +02:00
Uwe Seimet
6f845193d2 Removed unused field cache_wb 2021-08-22 19:44:31 +02:00
Uwe Seimet
84df9ab11e Removed duplicate logging 2021-08-22 19:33:45 +02:00
Uwe Seimet
07da6bfa1c Remember controller 2021-08-22 19:28:12 +02:00
Uwe Seimet
e32c2af48c Remember control structure 2021-08-22 19:25:34 +02:00
Uwe Seimet
d47ac6ce40 Removed unused code 2021-08-22 19:21:21 +02:00
Uwe Seimet
a278d7cfc9 Logging update 2021-08-22 19:08:33 +02:00
Uwe Seimet
0b755cade6 Removed obsolete DaynaPort check 2021-08-22 19:04:13 +02:00
Uwe Seimet
757e340f6d Logging updates 2021-08-22 18:55:57 +02:00
Uwe Seimet
6949f17d6a Added override 2021-08-22 18:49:49 +02:00
Uwe Seimet
4ad8425be5 Updated Inquiry 2021-08-22 18:48:31 +02:00
Uwe Seimet
5e20391ebd Updated error handling 2021-08-22 18:17:42 +02:00
Uwe Seimet
c5b7f2ffd4 Error handling update 2021-08-22 18:08:57 +02:00
Uwe Seimet
d3a9ae48af Moved DaynPort specific code 2021-08-22 17:52:36 +02:00
Uwe Seimet
806e0e0f27 Moved Daynaport code to the Daynaport class 2021-08-22 17:17:38 +02:00
Uwe Seimet
cdf9a6ad5b Added command dispatcher to Disk class 2021-08-22 16:39:24 +02:00
Uwe Seimet
9772b976d4 Renaming 2021-08-22 16:22:03 +02:00
Uwe Seimet
8fcbc74c33 Cleanup 2021-08-22 16:16:02 +02:00
Uwe Seimet
ea49c35c1a Split scsi_command enums into separate enums for SASI and for SCSI 2021-08-22 16:06:29 +02:00
Uwe Seimet
7e94aeea63 Updated separation of scsidev/sasidev 2021-08-22 15:49:49 +02:00
Uwe Seimet
f26c9dcc5d Removed unused code 2021-08-22 15:35:12 +02:00
Uwe Seimet
bc41c9f2a2 Updated separation of scsidev/sasidev 2021-08-22 14:50:45 +02:00
Uwe Seimet
7cb5b89a52 Fixed Inquiry issue 2021-08-22 14:39:26 +02:00
Uwe Seimet
68eb6bba4c Moved all hard disk commands to disk.cpp for testing 2021-08-22 14:29:51 +02:00
Uwe Seimet
43cd5263f9 Moved commands from controller to disk 2021-08-22 12:47:45 +02:00
Uwe Seimet
ff88ce9602 Simplified controller/device interface 2021-08-22 12:01:58 +02:00
Uwe Seimet
f1f2f4a84f Moved commands from controller do disk 2021-08-22 11:46:03 +02:00
Uwe Seimet
af13ce37bc Use generic name for MO, must like for HD 2021-08-22 11:05:48 +02:00
Uwe Seimet
000b568dfb Consider media removed if no filename was provided when attaching 2021-08-22 09:55:47 +02:00
Uwe Seimet
524327f7be Merged feature_controller_cleanup 2021-08-22 00:42:24 +02:00
Uwe Seimet
db8c50ab00 Made block size configurable (resolves issue #196) 2021-08-22 00:37:13 +02:00
Uwe Seimet
0bd12e93f5
Refactoring, device handling extensions, additional settings, improved error handling, 64 bit OS support, fixed issues (#184)
* Device type unification, support of removable media

* Added support for .hdr extension

* Removable flag cleanup

* Manpage update

* Enriched PbOperation with PbDevice

* Added file size to PbImageFile

* Added device list support

* Set image_file

* Make remote interface more robust by ignoring SIGPIPE

* Return status only once

* Fixed typo

* Error handling update

* When starting rascsi parse everything before attaching devices

* Added dry run mode

* Comment update

* Updated logging

* Added Device base class, Disk class inherits from it

* Renaming

* Use vectors for controllers and disks, as preparation for using maps

* Updated file support handling

* Comment update

* DaynaPort and Bridge inherit from Device instead of Disk

* ProcessCmd() now works with devices instead of disks

* Renaming

* Added DeviceFactory

* Improved factory

* Comment update

* protected disk_t

* Code cleanup, added translations

* Device name can be set for rascsi

* rasctl can set device name

* Manpage update

* Manpage update

* Formatting update

* Check for missing name

* Initialize fd

* Initialize type

* Fixed string length issue

* Updated capacity formatting

* Fixed typo

* Split PbDevice into device and device definition

* Added TODO

* Renaming

* Renaming

* Device types can be explicitly specified with -t (no FILE:TYPE syntax anymore)

* Fixed compile-time issue

* Removed unused Append mode, updated read-only handling

* Type handling and manpage update

* Cleanup

* rasctl parser cleanup

* Review

* Constructor update

* Added .hdr (SCRM) support to web interface, tested web interface

* Default folder can be set remotely

* Removed deprecated operation

* DETACH supports all parameters in order to detach all devices

* include cleanup

* Logging should not depend on NDEBUG, for RaSCSI it is not peformance-critical

* INFO is default log level

* Exception renaming

* Updated GetPaddedName()

* Inheritance update

* Added BlockDevice class

* Removed unused code

* Updated typedefs

* Revert "Updated typedefs"

This reverts commit 546b46215a.

* Removed unused code

* Fixed warnign

* Use standard C++ integer types, use streams to resolve printf data type issues

* Added TODOs

* Added TODO

* Renaming

* Added TODO

* Added TODO

* Improved dry-run

* Code cleanup

* Updated handling of unknown options, code review and cleanup

* Manpage update

* Added PrimaryDevice

* Include cleanup

* Added pure virtual methods

* Comment updates

* Split rasutil

* Replaced some occurrences of BOOL

* Removed obsolete RASCSI definition in xm6.h

* Removed unused code, updated TODOs, replaced BOOL

* Added capacity check (issue #192)

* Fixed (most likely) https://github.com/akuker/RASCSI/issues/191

* Fixed wrong error messages

* For root the default image folder is /home/pi/images, updated error handling

* Dynaport code review

* Improved error handling

* Implemented READ CAPACITY(16)

* Comment update

* Commands can be 16 bytes long

* Implemented READ/WRITE/VERIFY(16)

* Comment update

* Renamed method to reflect the name of the respective SCSI command

* Do not created devices during dryRun

* Fixed padding of SCSIHD_APPLE vendor and product

* Initial implementation

* Updated ReportLuns

* Byte count update

* Fixed typo

* Finalized REPORT LUNS

* Removed TODO

* Updated TODO

* TODO update

* Updated device factory

* Comment update

* 64 bit update, tested on Ubuntu 64 bit system

* Removed assertion

* SCSI hard disks always have Apple specific mode pages (resolves issue #193)

* Error messsage update, 64 bit cleanup

* Reduced streams usage

* Updated handling of device flags

* MOs are protectable

* Removed duplicate error code handling

* Removed duplicate code

* Fixed CmdReadToc buffer overflow (https://github.com/akuker/RASCSI/issues/194)

* Added naive implementation of GET EVENT STATUS NOTIFICATION to avoid wranings

* HD must set removable device bit if the media is removable

* Removed duplicate logging

* Updated daynaport additional length

* Removed broken daynaport REQUEST SENSE. Successfully tested with my Mac.

* EnableInterface should not always return TRUE

* Updated Inquiry

* Updated LUN handling

* Replaced incorrect free by delete

* Updated comments and write-protection handling

* Made default HD name consistent

* STATUS_NOERROR is default

* Fixed Eject

* More eject handling updates

* Manpage updates

* Logging update

* Changed debug level

* Logging update

* Log capacity of all media types

* Logging update

* Encapsulated disk.blocks

* Encapsulated sector size

* Added overrides

* Added more overrides

* Fixed error message

* Fixed typos

* Fixed logging

* Added logging

* Use PrimaryDevice when calling Inquiry

* Comment update

* Changed default buffer size for testing

* Reverted last change

* Removed debug output

* De-inlined methods because optimized code did not work with them inlined

* Web interface can attach Daynaport again

* Improved handling of read-only hard disks

* Fixed issue with "all" semantics of DETACH

* rasctl supports adding removable media devices without providing a filename

* Removed unused flag in PbDeviceDefinition

* Updated rasctl output for ecjected media (resolves issue #199)

* Validate default folder name when changing default folder
2021-08-21 16:45:30 -05:00
Uwe Seimet
1c8c3600a7
Feature explicit device type (rascsi) (#177)
* Added support for explicit file type

* Check file type

* Manpage update

* Removed device file work-around, an explicit type can be used instead

Co-authored-by: akuker <akuker@gmail.com>
2021-08-09 21:20:58 -05:00
Uwe Seimet
79de9e29e0
Added PbDevices to PbServerInfo for client convenience (#176)
* Added device list to server info

* Updated loggin

* Added comment

* Added comment

* Added comment

* Comment update

* Deprecate LIST

* Comment update

* Updated duplicate ID/unit check

* Updated logging

* Updated logging

* Unified error message handling: Errors are now consistently logged

* REview

* Added missing field initialization (reported by Eclipse IDE)

* Added some translations

* Fixed typo

Co-authored-by: akuker <akuker@gmail.com>
2021-08-09 20:24:56 -05:00
Uwe Seimet
157172b566
Use existing ioexception for Disk::Open() error handling (#175)
* Use ioexception for file open error handling

* Use standard string comparison functions

* Error message update

* Improved CD-ROM handling error messages
2021-08-09 18:56:13 -05:00