Commit Graph

432 Commits

Author SHA1 Message Date
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
Uwe Seimet
0a5298b8ac
Feature extended server information (#169)
* PbDevice returns information on whether a device is removable

* Fixed log message

* Added additional status data (ejectable, protctable, removable)

* Assume ejectable == removable

* Removed obsolete fields

* Added locked/lockable to interface

* Code review

* Logging update

* The user should be allowed to also write protect hard disk drives

* Updated error handling

* Testing

* INSERT also has to search in the default file folder

* Added TODO

* Manpage update

* Message updates

* Moved some sanity checks to the server, so that they are run for any client

* Updated error handling

* Moved CR/LF handling to the client, the server should not format too much

* rascsi should not mention "rasctl" in its messages, there may be other clients

* Improved error messages

* Improved error handling by returning an error string

* Added TODO

* Moved check for duplicate ID to ProcessCmd()

* Removed debug output

* Moved include

* Removed obsolete includes, updated includes

* Reverted ready check

* Fixed error messages

* Added convenience method

* Simplified error handling

* Socket/error handling review

* "NO MEDIA" is added by the client, not by the server

* Added missing include

* Only check for duplicate ID when attaching a device

* Added type/string converters for PbDeviceType

* PbDevice indicates whether image files are supported

* Write-protecing a read-only devices is not treated as an error anymore

* Updated read-only check

* Made difference between read-only and protected more explicit

* Added comment

* Comment update

* Made hard disk drives write-protectable by the user

* Resolved https://github.com/akuker/RASCSI/issues/166

* Addressing compiler error - type needs to be initialized

Co-authored-by: akuker <akuker@gmail.com>
2021-08-08 10:08:58 -05:00
akuker
3d14950548
Delete extraneous files (#171)
Co-authored-by: akuker <akuker@gmail.com>
2021-08-07 08:52:58 +02:00
Uwe Seimet
1ba3b6a2f6
PbDevice returns information on whether a device is removable (#167)
* PbDevice returns information on whether a device is removable

* Fixed log message
2021-08-06 19:50:20 -05:00
Uwe Seimet
eeef537bc0
Manpage updates (#165)
* Updated rasctl.1

* Updated rascsi manpage, synchronized case/format with rasctl

* Added default folder option

* Added missing upper case option

* Sorted options alphabetically, as far as possible

* Updated rascsi manpage

* More rascsi manpage updates

* Added -v option

* Fixed issue with detection of duplicate image files
2021-08-06 19:30:35 -05:00
Uwe Seimet
735aff6cd1
Feature server information (#163)
* Extended protobuf interface with rascsi server information

* Added default_image_folder (to be used in a different feature)

* Remember log level because not all versions of spdlog support get_log_level()

* Display enum names instead of values

* Added support for default image folder

* Added method that returns the available image files

* Added list of image files to protobuf interface

* Error handling update

* Filter image files

* Update setting up image file list

* Message update

* Replaced if/else cascade by switch

* Updated log level handling

* Renaming, sort rasctl list output

* Added -lstdc++fs (required by gcc 8.3.0)

* Changed option shortcut

* Sorted log levels by severity

* Fixed sorting of log levels

* Use map for storing available log levels

* Replaced explicit typ

* Revert "Replaced explicit typ"

This reverts commit 4106c15d6f.

* Revert "Use map for storing available log levels"

This reverts commit 505751e64a.

* Added comments

* Removed needless CR/LF when logging

Co-authored-by: akuker <akuker@gmail.com>
2021-08-05 20:56:07 -05:00
Uwe Seimet
dd7ce23adc
Reject duplicate image files (#162)
* Reject duplicate image files

* Renaming
2021-08-05 20:38:03 -05:00
Uwe Seimet
8601452b67
Feature testing improvement for X86 platforms (#164)
* Do not poll for RaSCSI hardware events on X86 platforms

* Fixed typo
2021-08-05 08:36:55 -05:00
akuker
5333906846
Create FUNDING.yml 2021-08-04 17:34:24 -05:00
Uwe Seimet
8cf24e7163
Feature serialization improvements (#159)
* Re-added lost code

* Avoid some potential serialization issues
2021-08-03 20:41:18 -05:00
Eric Helgeson
ea4486d1c0
Speed up web uploads and various fixes (#158)
* Move to bjoern

* Stream upload

* wip

* Streams

* check for filename

* Allow easyinstall to be scripted

* Tell user we're done

* show help

* ignore hfdisk

* fix var

* Allow override of remote by setting GIT_REMOTE, default to origin

* Better handling of local changes

* Give user more info

* Fix #156 - show all supported types in web interface

* *.mos does not seem to be valid - ractl throws error

* Try some minor optomizations
Error handling
2021-07-31 10:52:09 -05:00
Eric Helgeson
1695b40c65
fix bridge-utils missing from dev (#157) 2021-07-29 19:04:29 -05:00