Commit Graph

513 Commits

Author SHA1 Message Date
RaSCSI User 6f69b214dd restore original command 2022-03-14 02:34:20 +00:00
RaSCSI User 9ba4a9243d Ran formatting tool 2022-03-14 02:28:40 +00:00
RaSCSI User 8e48e72bf1 Comment cleanup 2022-03-14 02:16:21 +00:00
RaSCSI User b7c88d2d45 renamed classes 2022-03-14 02:10:51 +00:00
RaSCSI User 97f857b3b7 Merge branch 'develop' into bug_335_cache_fix_selectable 2022-03-14 01:34:07 +00:00
Uwe Seimet 0e8d89e827
Code cleanup, in particular related to MODE SENSE (#699)
* Replace member functions

* Fixed TODO

* Added TODOs

* Added TODOs

* Removed duplicate code

* Fixed return value

* CD-ROM mode pages are provided by the CD-ROM implementation

* MO mode pages are provided by the MO implementation

* Comment update

* Removed duplicate code

* Removed more duplicate code

* Optimization

* Updated mode page size handling

* Addec TODO

* Started more flexible mode page handling

* Map mode pages

* Page 0 must be last

* Error handling update

* Updated size handling

* Updated map handling

* Use map references

* Move superclass call

* Added comment

* Host services also support mode page 0x3f (all pages)

* Updated handling of page 0

* Removed duplicate code

* Updated buffer size handling

* Code cleanup

* Removed duplicate code

* Use calloc()

* Removed duplicate code

* Comment update

* Fixed buffer offset

* Fixed TODO

* Added buffer size check

* Comment udpate

* Logging update

* Updated logging

* Avoid potential memory leak

* Updated handling of page 0

* Added TODO

* Comment update

* Fixed error message

* Use vector instead of byte array

* Optimization

* More optimizations

* Removed duplicate code

* Do not try to add more pages when buffer is full

* Updated error message

* Comment update, fixed host services message length handling

* Code cleanup, optimizations

* Updated payload handling for page 0

* Fixed TODO

* Updated handling of PS field

* Fixed offsets

* Updated handling for page 0

* Code cleanup

* More cleanup

* Updated block descriptor handling

* Result of REPORT LUNS must not depend on whether a device is ready or not

* Printer uses a dynamically allocated buffer

* Use realloc

* Updated memory handling

* Added assertion

* Comment update

* Fixed initialization

* Reset byte transfer flag

* Updated usage of realloc

* Reverted some changes

* Re-added buffer size check

* Renaming

* Inquiry for hard disk must also work when drive is not ready

* Primary device checks EVPD

* Added page code check to Inquiry

* Explicitly set response level format

* Added comment

* Removed useless cast

* Fixed inconsistencies in setting the additional length

* Logging uodate

* Updated logging

* Made methods const

* Moved code

* Added TODO

* Added vendor page

* Reduced visibility

* Code cleanup

* Mark override

* Removed duplicate cast

* Synchronized host services mode page handling with other code

* Added TODO

* Signature update

* Moved code

* Removed duplicate code

* Fixed TODO

* Removed duplicate code

* Added buffer size check

* Improved buffer size check

* Code cleanup

* Removed useless assertions

* Cleanup

* Renaming

* Added overrides

* Removed unnecessary casts

* Cleanup

* Added TODO

* Removed obsolete memset

* Removed duplicate code

* Logging update

* Logging update

* Assertion update

* Removed useless comments

* Code cleanup

* Removed obsolete casts

* User super typedef

* Updated log messages

* Fixed #712

* Updated error handling

* Removed useless assertions

* Reduced casts to Disk*

* Updated sector size list argument

* Removed obsolete casts

* Removed comment
2022-02-27 15:58:01 -06:00
Uwe Seimet 33bfe42017
Replaced zlib by internal crc32() method (#698) 2022-02-27 15:24:50 -06:00
Uwe Seimet f5f5c002aa
Added reboot support (#696) 2022-02-22 19:08:22 -08:00
Uwe Seimet 7290803ace
Removed untested/unsupported NetBSD-related code (#694) 2022-02-22 19:07:06 -08:00
RaSCSI User 923728dda1 Updates to be compatible with develop 2022-02-22 02:38:22 +00:00
RaSCSI User 9de6804cc5 Merge branch 'develop' of https://github.com/akuker/RASCSI into bug_335_cache_fix_selectable 2022-02-22 02:37:57 +00:00
RaSCSI User fa72c3a678 First draft of command line option to configure disk caching 2022-02-22 01:24:42 +00:00
Uwe Seimet ba8ad2e7f5
Fixed missing media change handling (#690)
* Remember media change

* Added comment

* Added TODO

* Updated SCSI level for host services to SPC-5

* Manpage update
2022-02-21 21:01:17 +01:00
Uwe Seimet 2beb78727f
Added support for new interfaces syntax (#684)
* Added support for new interfaces syntax

* rasctl output update

* Added operation parameters

* Fixed typo

* Manpage update

* Added deprecation warning

* Moved parser

* Updated parser

* Updated parameter override

* Removed debug code

* Made netmask handling more flexible

* Updated logging

* Logging update

* Logging update

* Comment update

* Removed unused field

* Replaced BOOL by bool

* Moved code

* Logging update

* Removed useless comments

* Added TODZ

* Logging update

* Logging update

* Logging update

* No need to report that an error is an error twice

* Removed duplicate logging

* Updated error handling

* Updated error handling

* Fixed typo

* Removed magic constant

* Fixed 32 bit platform issue

* Signature update

* Fixed message string

* Comment update

* Fixed SCSI command opcode

* Updated StopPrint

* Logging update

* Removed obsolete casts

* Renaming

* Removed duplicate logging

* Updated flushing caches

* Added FlushCache() method

* Reduced visibility

* Reduced visibility

* Reduced visibility

* Code cleanup, removed useless comments

* Removed useless comments

* Updated error handling

* Removed duplicate code

* Manpage update
2022-02-20 18:40:30 +01:00
Uwe Seimet 81ca3c0ce8
Added filename placeholder, execute print command as lp, fixed memory leaks (#677)
* Added filename placeholder

* Comment update

* Execute print command as lp user

* Comment update

* Comment update

* Added operaton parameters

* Sort parameter output by name

* Removed assertion

* Revert "Removed assertion"

This reverts commit f9ab582ddc.

* Include cleanup

* Code cleanup

* Updated SCSI reset

* Fixed memory leak

* Revert "Fixed memory leak"

This reverts commit 2dbbdcd192.

* Fixed memory leak

* Fixed memory leak

* Updated operation count check

* Fixed memory leaks

* Delete temporary PbOperationInfo
2022-02-18 12:06:33 -08:00
Uwe Seimet e13cf1ebb4
Resolved TODO, rascsi guarantees that LUN 0 is always present (#681) 2022-02-18 12:04:07 -08:00
Uwe Seimet 2281a7e53b
Bridge is not yet ready to not subclass Disk (#679) 2022-02-18 12:03:22 -08:00
Uwe Seimet 419dca3c4c
Added support for SCSI printer device (SCLP) (#670)
* Fixed buster compile-time issue

* Host services inherit from ModePageDevice

* Call base class

* Visibility update

* Updated includes

* Updated dispatcher

* Added TODOs

* Logging update

* Code cleanup

* Use namespace instead of class for ScsiDefs

* Renaming

* Cleanup

* Use dispatcher template in order to remove duplicate code

* Updated all dispatchers

* Clean up commands

* Removed duplicate code

* Removed duplicate code

* Updated template definition

* Fixed typo

* Fixed warning

* Code cleanup

* Device list must be static

* Cleanup

* Logging update

* Added comments

* Cleanup

* Base class update

* SCSIBR is not a subclass of Disk anymore, but of PrimaryDevice

* Updated includes

* Fixed compile-time issue on the Pi

* Header file cleanup

* Interface cleanup

* Removed wrong override

* include file cleanup

* Removed obsolete usage of streams

* Removed more stream usages

* Stream usage cleanup

* Include cleanup

* Renaming

* Include cleanup

* Interface update

* SCLP device skeleton

* Initial RELEASE/RESERVE UNIT

* Added full set of commands

* Extracted command phase code

* Stripped SCSI controller code

* Removed unused code

* Commented out code

* Initial naive implementation

* Added debug output

* Disable printing for now

* Updated file handling

* Updated DataOut()

* Added comment

* Updated assertion

* Comment update

* Updated assertion

* Code cleanup

* Reset bytes to transfer

* Reverted change

* Refactoring

* Moved assertion

* Updated ReceiveBytes()

* Removed override

* Added interface

* Code cleanup

* Updated TEST UNIT READY

* Added flag for byte-oriented transfer

* Updated TEST UNIT READY

* Length handling update

* Updated bytecount handling

* Fixed warning

* Added TODO

* Updated assertion

* Enabled priting

* Updated error handling

* Code cleanup

* Logging update

* First working version

* Use temporary file

* Logging update

* Handle parameters

* Updated format string

* Updated logging

* File handling update

* Code cleanup

* Fixed buffer size

* Updated file handling

* Manpage update

* Initial reservation handling

* Updated reservation handling

* Initial reservation testing

* Remember initiator ID

* Extract initiator ID

* Updated SCSI initiator ID handling

* Logging update

* Added reservation timeout

* Updated timeout handling

* Code cleanup

* Only pass initiator ID to *SCSI* controller

* Added comments

* Added comment

* Implemented STOP PRINT

* Comment update

* Comment update

* Comment update

* Added comment

* Comment update

* Removed useless comments

* Updated printer parameter handling

* Updated parameter handling

* Manpage update

* Manpage update

* Comment update

* Default printer product name update

* Renaming

* Updated logging

* Logging update

* Logging update

* Comment update

* Code cleanup

* Added printer shortcut

* Comment update

* Comment update

* Output formatting update

* Updated error handling

* Code cleanup

* More cleanup

* Revert "More cleanup"

This reverts commit 05708986ee.

* Output formatting update

* Output format update

* Sort parameters

* Comment update

* Improved parsing of parameters

* Manpage update

* Updated SCSI level

* Removed magic constants

* Removed magic constant

* Template update

* Template usage update

* Get rid of SASIDEV for printer

* Get rid of SASIDEV for host services

* Moved initiator_id field

* Moved field

* Moved field

* Added comment

* Error handling must use effective LUN

* Removed obsolete casts

* Removed unused method declarations

* Comment update

* Code cleanup

* More code cleanup

* Optimization

* Removed duplicate code

* Logging update

* Fixed warning

* Code cleanup

* Added TODOs

* TODO update

* Backwards compatibility update

* Comment update
2022-02-16 20:04:42 -06:00
Uwe Seimet 511c55a720
Added work-around for the Atari Daynaport driver (#665) 2022-02-15 18:13:22 -08:00
Uwe Seimet 45cd5e58d1
Inheritance hierarchy improvements, reduced dependencies to Disk class (#662)
* Fixed buster compile-time issue

* Host services inherit from ModePageDevice

* Call base class

* Visibility update

* Updated includes

* Updated dispatcher

* Added TODOs

* Logging update

* Code cleanup

* Use namespace instead of class for ScsiDefs

* Renaming

* Cleanup

* Use dispatcher template in order to remove duplicate code

* Updated all dispatchers

* Clean up commands

* Removed duplicate code

* Removed duplicate code

* Updated template definition

* Fixed typo

* Fixed warning

* Code cleanup

* Device list must be static

* Cleanup

* Logging update

* Added comments

* Cleanup

* Base class update

* SCSIBR is not a subclass of Disk anymore, but of PrimaryDevice

* Updated includes

* Fixed compile-time issue on the Pi

* Header file cleanup

* Interface cleanup

* Removed wrong override

* include file cleanup

* Removed obsolete usage of streams

* Removed more stream usages

* Stream usage cleanup

* Include cleanup

* Renaming

* Include cleanup

* Interface update
2022-02-13 13:30:02 -06:00
RaSCSI User 401ecc5118 Merge branch 'develop' into bug_335_cache_fix_selectable 2022-02-13 17:05:00 +00:00
RaSCSI User 7416429c55 Added posix file i/o functionality 2022-02-13 05:10:06 +00:00
RaSCSI User 33d9864573 Increase priority for RaSCSI Service 2022-02-13 03:07:20 +00:00
Uwe Seimet 5622694701
Host services (SCHS) with realtime clock and shutdown, improved device inheritance (#647)
* Initial RTC skeleton

* Added device info

* Added TEST UNIT READY

* Fixed command dispatcher

* First untested naive implementation

* Comment update

* Code cleanup

* More code cleanup

* Updated date/time encoding

* Updated versioning

* Use standard RaSCSI INQUIRY version for SCRT device

* Manpage update

* Added shortcut for SCRT type

* Added support for rtc "filename"

* RTC supports LUNs > 0

* Fixed LUN count

* Renaming

* Renaming

* Manpage update

* Initial naive implementation

* SCRA is removable

* Updated command list

* Added controller field

* Shut down works, bus free phase is not yet entered

* Clear caches on shutdown

* Expose BusFree()

* Moved code

* Logging update

* Moved code

* Moved code

* Added comment

* Logging update

* Code cleanup

* Service device is not removable anymore (was only needed for testing)

* Manpage update

* Added comment

* Comment update

* Version update

* Renaming

* Comment update

* Comment update

* Renaming

* Fixed typo

* Added convenience method

* Property handling optimization

* Code cleanup

* Code cleanup

* Code cleanup, introduced base class

* Added TODO

* More code cleanup

* Removed unnecessary assignments

* Moved code

* Removed forward declaration

* Added base class

* INclude cleanup

* Moved scsi_command enum

* Fixed warnings

* Addressing circular dependencies

* Removed duplicate enum

* include file cleanup

* Include cleanup

* Reduced dependencies to Disk class (replaced by Device), fixed TODO

* Include cleanup

* PrimaryDevice implements ReportLuns

* Inheritance update

* Removed duplicate code

* Moved code to base class

* Cleanup

* Removed duplicate field

* Updated command dispatchign

* Comment update

* Moved code

* Updated method visibilities

* Moved MODE SENSE/MODE SELECT base code
2022-02-10 12:54:48 -06:00
Tony Kuker 6f5919d3e4 #335 handle the case when the file isn't opened/memory mapped 2022-02-09 03:34:51 +00:00
Tony Kuker 97d5053555 First cut of removing RAM cache 2022-02-09 02:52:48 +00:00
Uwe Seimet 0a55680a50
Fixed segfault (#654) 2022-02-07 16:11:44 -08:00
Tony Kuker c80e010196 Update version for next development version 2022-02-06 20:00:48 +00:00
Tony Kuker 87865d2f38 Update revision number for release 2022-02-06 19:57:43 +00:00
Uwe Seimet 9d0d78a643
Flush the cache on STOP UNIT (#644) 2022-02-06 13:44:28 -06:00
Uwe Seimet 36cadd78fc
Flush the RaSCSI write cache on SYNCHRONIZE CACHE (#645) 2022-02-06 13:43:50 -06:00
Uwe Seimet d9b4e1fc1f
Support ICD (Atari ACSI) command semantics (#640)
* Initial ICD support

* Comment update

* Comment update

* Comment update

* Update README.md
2022-02-04 19:45:10 -06:00
Uwe Seimet cb2553a9eb
Permit LUNs > 0 for SCDP and SCBR (#641) 2022-02-03 19:37:31 -06:00
Uwe Seimet ed46262cca
Added configurable network interface name support to rascsi (#635)
* Added support for explicit network interface name to rascsi

* Fixed patch_version for development build
2022-02-01 20:52:49 -08:00
Benjamin Zeiss ffb0aa61b4
fix for #621. (#624) 2022-01-29 11:06:10 -08:00
Uwe Seimet 7f362c9308
MODE SENSE: Fixed wrong ALLOCATION LENGTH handling (#617)
* Log PCF

* Code cleanup

* Logging update

* Updated error handling

* Updated setting of MODE SENSE return data size

* Added comments

* Removed useless assertions

* Updated logging

* Comment update

* Updated logging

* Formatting update

* Comment update
2022-01-20 09:04:59 -06:00
Benjamin Zeiss 17497cf1fe clean squashed restructuring branch. #455 2022-01-09 20:22:19 +01:00
akuker b52abbfdc7
Output higher-level report from scsimon (#596)
* Output JSON file for post-processing

* Debug utility for parsing the SCSI data

* Prototype app for parsing scsi captures

* correct arg parsing

* output html

* Cleanupt html output

* Add missing include

* Allow compilation on non-Linux platforms

* Refactored scsimon to be in multiple files

* Refactored away

* Restructured scsimon into smaller pieces

* Added ability to read in pre-generated .json file and re-parse it

* Delete scsiparse.cpp

* Fix argument parsing and code cleanup

* Ran vscode c++ formatting utility

* Restore the -Wno-psabi flag for Linux only

* Address compiler warnings

* Updated to use C++ style ostreams

* Cleanup conversion to c++ style ostreams

* Updated to use ofstream instead of fprintf

* Delete src/raspberrypi/scsimon directory

Co-authored-by: akuker <akuker@gmail.com>
2022-01-07 12:17:44 -06:00
Daniel Markstedt 1c84bb34f9
Shorten file names when downloading to AFP (#592) 2022-01-04 21:08:28 -06:00
n4al a240198123
N4al/spanish localisation (#594)
* Adding Spanish localisation to localizer.cpp

* Addind Spanish localisation for the Web Interface
2022-01-04 16:04:54 +01:00
RaSCSI User 7e1ca6a7c9 Update version for next development version 2022-01-01 20:49:50 +00:00
RaSCSI User 3cc04a8dcf Update revision for release 2022-01-01 20:48:30 +00:00
Daniel Markstedt 5befff28e6
Improve token auth and oled monitor install scripts; better venv cleanup logic (#587)
* Trigger installation of the oled monitor script after installing rascsi; break out the token auth code and clarify wordings.

* Better logic for venv cleanup
2022-01-01 11:38:10 -06:00
cvictor c5ed2b5b67
Cvictor update german (#585)
* Added german translations

* German translations edited header

* Fixed typo

Co-authored-by: Uwe Seimet <Uwe.Seimet@seimet.de>
2021-12-30 17:34:41 -08:00
Daniel Markstedt ce7e391a52
More sturdy logic for when session language is unset (#583) 2021-12-29 20:54:59 -06:00
Kamel Makhloufi 40fe8d611e
Added french localization (#584)
* French localization added

* Updated french translation

* Corrected small typo in french translation

* Corrected small errors in fr translation
2021-12-29 17:56:44 -08:00
Daniel Markstedt a973485f8c
Update Swedish translations after string change (#581) 2021-12-28 19:44:47 -06:00
Daniel Markstedt 338b6af92c
Hardcoded locale fallback to English (#582)
* Hardcoded locale fallback to English

* Fallbacks for locale in proto requests in case the locale fallback fails
2021-12-28 19:44:12 -06:00
akuker 2c60a848a8
Add Apple CD Drive as pre-defined drive (#580)
* Add Apple CD Drive as pre-defined drive

* Fix block size for Apple CD-ROM

Co-authored-by: Tony Kuker <akuker@gmail.com>
2021-12-28 18:30:20 -06:00
Daniel Markstedt 3ad78e8312
Final updates for Swedish l10n (#576)
* Revert previous solution, and do dropzone i18n the right way.

* Translate Swedish

* Update Swedish localization

* Update Swedish localization
2021-12-28 15:14:30 -06:00