495 Commits

Author SHA1 Message Date
Uwe Seimet
5e7183a637 Added support for reserved IDs 2021-08-31 20:17:23 +02:00
Daniel Markstedt
65cf69c022
Feature configurable reserved id for rascsi-web (#223)
* Translate code commends into English, removing redundant ones

* - Translated all remaining Japanese code comments in src/raspberrypi/ to English, with the exception of cfilesystem.cpp|h
- Removed some redundant comments where the context is obvious from the
  code
  - Fixed a few typos and mistakes

* - Store only file path and name to configuration csv
- Strip known non-file path strings when reading configuration csv (backwards compatibility)
- Validate SCSI ID before attempting to attach a device

* Add comment and TODO

* Partial translation of cfilesystem.h

* Move csv read/write logic into file_cmd.py

* Load default.csv on rascsi-web startup

* Add rudimentary error handling to config loading/saving

* Implement a delete configuration csv file feature. Also rename the delete_image method to delete_file and made it take the full file patch as argument to be consistent with other file operation methods.

* Catch the exception when attempting to exclude SCSI id that is already in use from a list of valid SCSI ids

* Fix error handling when failing to open a csv file for read or write

* Run detach_all() only after succeeding to open a file for reading

* Make the reserved SCSI id configurable through an argument to start.sh; make the rascsi-web service reserve 7 by default to maintain current behavior.

* Make it possible to reserve multiple scsi ids in the web ui
2021-08-31 20:01:30 +02:00
Uwe Seimet
21a7dad7da Restore files in use if dry-run fails 2021-08-31 18:47:58 +02:00
Uwe Seimet
560997134f Fixed typos 2021-08-31 18:21:44 +02:00
Uwe Seimet
44d6696636 Comment update 2021-08-31 18:18:59 +02:00
Uwe Seimet
b83b76e9f3 Extract detaching all devices, add parameter list support 2021-08-31 18:11:41 +02:00
Uwe Seimet
5a6c83c21c Updated error message 2021-08-31 09:08:25 +02:00
Uwe Seimet
302df888da Protecting/unprotecing a non-ready medium is considered not possible 2021-08-30 22:13:01 +02:00
Daniel Markstedt
45e10480f5
Fixed unnecessary detach_all() when config file isn't read (#221)
* Translate code commends into English, removing redundant ones

* - Translated all remaining Japanese code comments in src/raspberrypi/ to English, with the exception of cfilesystem.cpp|h
- Removed some redundant comments where the context is obvious from the
  code
  - Fixed a few typos and mistakes

* - Store only file path and name to configuration csv
- Strip known non-file path strings when reading configuration csv (backwards compatibility)
- Validate SCSI ID before attempting to attach a device

* Add comment and TODO

* Partial translation of cfilesystem.h

* Move csv read/write logic into file_cmd.py

* Load default.csv on rascsi-web startup

* Add rudimentary error handling to config loading/saving

* Implement a delete configuration csv file feature. Also rename the delete_image method to delete_file and made it take the full file patch as argument to be consistent with other file operation methods.

* Catch the exception when attempting to exclude SCSI id that is already in use from a list of valid SCSI ids

* Fix error handling when failing to open a csv file for read or write

* Run detach_all() only after succeeding to open a file for reading
2021-08-30 20:56:40 +02:00
Uwe Seimet
6c5fae6304 Allow empty device list 2021-08-30 20:44:16 +02:00
Uwe Seimet
83389cd06f Added missing return statement 2021-08-30 18:42:19 +02:00
Uwe Seimet
4ab91e90fc Improved error handling 2021-08-30 18:41:02 +02:00
Uwe Seimet
0cb350f9c9 Comment update 2021-08-30 18:39:06 +02:00
Uwe Seimet
4008ac1f71 Updated list handling of protobuf interface 2021-08-30 18:30:59 +02:00
Uwe Seimet
5bf66a99a1 Added number of supported LUNs to protobuf interface 2021-08-30 15:47:56 +02:00
Uwe Seimet
2bec655b0c Updated error messages and exception handling 2021-08-30 15:36:11 +02:00
Uwe Seimet
b67ac954f2 Options -h and -v do not require to be the root user (fixes issue #166) 2021-08-30 15:21:40 +02:00
Uwe Seimet
76bd7bd882 Removed goto 2021-08-30 14:39:26 +02:00
Uwe Seimet
11f9e9cfa2 Updated GetEventStatusNotification 2021-08-30 14:25:44 +02:00
Uwe Seimet
ff84b139d1 Comment update 2021-08-30 14:23:18 +02:00
Uwe Seimet
29b0a7e839 Comment update 2021-08-30 14:22:52 +02:00
Uwe Seimet
47b43cd832 Updated logging 2021-08-30 14:21:49 +02:00
Uwe Seimet
eb0eced1ef Removed TODO 2021-08-30 13:56:22 +02:00
Uwe Seimet
3814c242a3 Refactoring 2021-08-30 13:44:25 +02:00
Uwe Seimet
5880ddc05d Renaming 2021-08-30 13:29:50 +02:00
Uwe Seimet
4859c17ee3 Removed duplicate code 2021-08-30 13:11:17 +02:00
Uwe Seimet
d46013934a Renaming 2021-08-30 13:01:06 +02:00
Uwe Seimet
2edac296a6 Renaming 2021-08-30 12:54:49 +02:00
Uwe Seimet
399c560aa9 Logging update 2021-08-30 12:09:02 +02:00
Uwe Seimet
6f9c5a543c Data type updated, use #pragma once 2021-08-30 12:04:57 +02:00
Uwe Seimet
976dc95187 Code review, data type updates 2021-08-30 11:39:46 +02:00
Uwe Seimet
2e943279ed Removed duplicate command 2021-08-30 11:20:07 +02:00
Uwe Seimet
0677b9f9bf SASI Format opcode is 0x06, not 0x04 (see comment in code) 2021-08-30 11:09:17 +02:00
Uwe Seimet
c5240e62e1 Use unscoped enums for commands 2021-08-30 10:41:37 +02:00
Uwe Seimet
b2670f9fbc Removed unused structures, code and type cleanup 2021-08-30 09:56:22 +02:00
Daniel Markstedt
436e54d83c
Improve and fix bugs with saving&loading configuration files for rascsi-web (#218)
* Translate code commends into English, removing redundant ones

* - Translated all remaining Japanese code comments in src/raspberrypi/ to English, with the exception of cfilesystem.cpp|h
- Removed some redundant comments where the context is obvious from the
  code
  - Fixed a few typos and mistakes

* - Store only file path and name to configuration csv
- Strip known non-file path strings when reading configuration csv (backwards compatibility)
- Validate SCSI ID before attempting to attach a device

* Add comment and TODO

* Partial translation of cfilesystem.h

* Move csv read/write logic into file_cmd.py

* Load default.csv on rascsi-web startup

* Add rudimentary error handling to config loading/saving

* Implement a delete configuration csv file feature. Also rename the delete_image method to delete_file and made it take the full file patch as argument to be consistent with other file operation methods.

* Catch the exception when attempting to exclude SCSI id that is already in use from a list of valid SCSI ids

* Fix error handling when failing to open a csv file for read or write
2021-08-30 08:47:36 +02:00
Uwe Seimet
8fc8531b5b Updated error message 2021-08-29 18:58:10 +02:00
Uwe Seimet
67d73da898 Fixed issue with missing method in old Raspberry Pi OS protobuf implementation 2021-08-29 16:52:43 +02:00
Uwe Seimet
502b19bfb2 Improved block size check 2021-08-29 16:45:12 +02:00
Uwe Seimet
5ed6673429 Sort devices list by ID *and unit* 2021-08-29 16:18:25 +02:00
Uwe Seimet
665ad92b2c Cleaned list handling 2021-08-29 16:09:21 +02:00
Uwe Seimet
d099f31ccb Fixed typo 2021-08-29 15:30:40 +02:00
Uwe Seimet
27225acbce Comment update 2021-08-29 15:30:03 +02:00
Uwe Seimet
5b9df8c1d5 Updated rasctl server info message 2021-08-29 14:55:18 +02:00
Uwe Seimet
91fd46b65e Save list of files in use before dry-run 2021-08-29 14:41:37 +02:00
Uwe Seimet
5308a6e74d Reject inserting a medium when there is already a medium present (eject first) 2021-08-29 14:13:34 +02:00
Uwe Seimet
d0eb629343 Comment update 2021-08-29 13:57:36 +02:00
Uwe Seimet
f67c62e810 Renaming 2021-08-29 13:55:41 +02:00
Uwe Seimet
9ff21626da Improved handling of MO capacities 2021-08-29 13:51:31 +02:00
Uwe Seimet
49211fda68 Updated rasctl server information output 2021-08-29 08:33:32 +02:00