Commit Graph

765 Commits

Author SHA1 Message Date
Uwe Seimet
38412b8ddd Made method const 2022-02-28 19:41:08 +01:00
Uwe Seimet
22d173291f Use iterator 2022-02-28 16:32:27 +01:00
Uwe Seimet
32511cc623 Added TODO 2022-02-28 15:43:09 +01:00
Uwe Seimet
9903945bf3 Made method const 2022-02-28 15:32:06 +01:00
Uwe Seimet
cc82b69eb5 Made method const 2022-02-28 15:23:47 +01:00
Uwe Seimet
465d11501c GetSendDelay() can be const 2022-02-28 15:13:18 +01:00
Uwe Seimet
6577857804 Renaming 2022-02-28 15:00:11 +01:00
Uwe Seimet
1e6780844e Reduced method visibility 2022-02-28 14:58:32 +01:00
Uwe Seimet
1a6c64d86d removed unused enum 2022-02-28 14:48:16 +01:00
Uwe Seimet
ed9d8da7de Removed obsolete forward declaration 2022-02-28 14:47:21 +01:00
Uwe Seimet
f6f6935662 SendDiagnostic is now const 2022-02-28 12:01:28 +01:00
Uwe Seimet
d1a65de433 Data type update 2022-02-28 11:57:25 +01:00
Uwe Seimet
b8d8fc6d6b Updated buffer handling 2022-02-28 11:56:15 +01:00
Uwe Seimet
81063c83a9 Comment update 2022-02-28 11:53:25 +01:00
Uwe Seimet
fc8c0ef9be Fixed ReadDefectData10 2022-02-28 11:52:50 +01:00
Uwe Seimet
c00312b907 Moved error codes to scsi_defs namespace 2022-02-28 11:20:09 +01:00
Uwe Seimet
131a207e8e Cleanup 2022-02-28 10:43:52 +01:00
Uwe Seimet
f1ac304b1d Removed obsolete casts 2022-02-28 10:40:21 +01:00
Uwe Seimet
c923966bf4 Renaming 2022-02-28 10:29:55 +01:00
Uwe Seimet
f23d4eb3b6 Renaming 2022-02-28 10:28:38 +01:00
Uwe Seimet
6785d02dd0 Size handling update 2022-02-28 10:25:59 +01:00
Uwe Seimet
d65e6a9f70 Added assertion 2022-02-28 10:22:24 +01:00
Uwe Seimet
1b179d40b2 Check for INQUIRY command support first 2022-02-28 10:08:23 +01:00
Uwe Seimet
41d4078053 Updated additional length handling 2022-02-28 10:01:02 +01:00
Uwe Seimet
d7c2836412 Re-added comment 2022-02-28 09:57:16 +01:00
Uwe Seimet
91a9bffdd1 Fixed typo 2022-02-28 09:51:50 +01:00
Uwe Seimet
90e58b97bb Fixed typo 2022-02-28 09:51:19 +01:00
Uwe Seimet
461dd565f0 Updated REQUEST SENSE buffer handling 2022-02-28 09:46:25 +01:00
Uwe Seimet
18fbcbd7fb Updated comment 2022-02-28 09:31:33 +01:00
Uwe Seimet
46305d7f48 Comment update 2022-02-28 09:28:32 +01:00
Uwe Seimet
dcb1f7c093 Removed unused method argument 2022-02-28 09:17:06 +01:00
Uwe Seimet
6622b54569 Bridge can also use PrimaryDevice::Inquiry() 2022-02-28 09:10:39 +01:00
Uwe Seimet
9702d95a9b Comment update 2022-02-28 08:57:14 +01:00
Uwe Seimet
104da3e886 NEC drive is never removable 2022-02-28 08:56:58 +01:00
Uwe Seimet
19f9010ad7 NEC drive can also use PrimaryDevice::Inquiry() 2022-02-28 08:55:53 +01:00
Uwe Seimet
a40bbfc5e9 Inquiry cleanup 2022-02-28 08:36:05 +01:00
Uwe Seimet
27571e4ebc Logging update 2022-02-28 08:27:38 +01:00
Uwe Seimet
f47680a8da Inquiry() result buffer handling update 2022-02-28 08:23:47 +01:00
Uwe Seimet
a7daf2f18c Limit result buffer size 2022-02-28 00:44:23 +01:00
Uwe Seimet
81c8ab4a93 Limit result vector size 2022-02-28 00:23:34 +01:00
Uwe Seimet
3d065ec3c1 Set length 2022-02-27 23:45:13 +01:00
Uwe Seimet
4bc9c73bc3 Updated memcpy 2022-02-27 23:28:24 +01:00
Uwe Seimet
e2d8895025 Fixed warning 2022-02-27 23:24:02 +01:00
Uwe Seimet
84b115e0e6 Moved code 2022-02-27 23:22:48 +01:00
Uwe Seimet
10ec66f381 Use vector for INQUIRY data, Inquiry() is const, moved EVPD check 2022-02-27 23:10:23 +01: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
Daniel Markstedt
e8f392c3f1
Create SysCmds common class, and refactor Python codebase (#697)
* Move the oled script's PiCmds module to common, and rename it SysCmds.

* Use sys_cmds.get_ip_and_host() in web UI code.

* Move the auth_active() method to device_utils

* Rename device_utils to web_utils. Make auth_active() method take the group as argument.

* Migrate all pi_cmds methods to the SysCmds common class.

* Display hostname and ip in Web UI.

* Resolve or suppress pylint warnings.

* Resolve a pylint warning.

* Resolve or suppress pylint warnings.

* Import libraries at the top level for readability. In my testing on a Pi3B+, this leads to ~1.5k more memory being used by the python3 process.

* Change page title as requested by akuker.

* Reenable the import-outside-toplevel pylint rule.

* Resolve pylint warnings.

* Fix error following refactoring.

* Minor UI tweaks.

* Cleanup.

* Break out bridge config validation into a utility method.

* Move the dropzonejs method into the web_utils package

* Move get_logs method into SysCmds class.

* Improve get logs UI.

* Resolve pylint warning.

* Standardize class instance name.
2022-02-26 21:46:35 -08:00
Benjamin Zeiss
4178d4b845
Small installation fixes when upgrading an existing device. (#707) 2022-02-25 17:42:56 -08:00
Benjamin Zeiss
cd0da558c3
Initial version of the Control Board UI (#687)
Initial version of the Control Board UI (#687)
2022-02-25 21:03:36 +01:00