Skip to content

Code cleanup, in particular related to MODE SENSE#699

Merged
akuker merged 122 commits intodevelopfrom
feature_code_cleanup
Feb 27, 2022
Merged

Code cleanup, in particular related to MODE SENSE#699
akuker merged 122 commits intodevelopfrom
feature_code_cleanup

Conversation

@uweseimet
Copy link
Copy Markdown
Contributor

@uweseimet uweseimet commented Feb 23, 2022

  • Removed/Replaced hard-coded device type checks
  • Duplicate mode page setup code was removed
  • Replaced IsMo(), IsCdRom() by an object-oriented solution
  • Enforce correct order of returned mode pages
  • Automatic handling of saving page code and size to response data
  • Note: Mode page 0 is not considered implicitly valid anymore. According to the SCSI specification it is vendor-specific, i.e. it has to be handled in the existing code for vendor-specific mode pages.

Client log:

  MODE SENSE
    Reading all mode pages with MODE SENSE (6)
      Received 106 data bytes
        Available pages: 1, 3, 4, 8, 48
    Reading all mode pages with MODE SENSE (10)
      Received 110 data bytes
        Available pages: 1, 3, 4, 8, 48

@uweseimet uweseimet requested a review from rdmark February 23, 2022 09:40
@uweseimet uweseimet linked an issue Feb 23, 2022 that may be closed by this pull request
@uweseimet uweseimet changed the title Code cleanup Code cleanup, in particular related to MODE SENSE Feb 23, 2022
@uweseimet uweseimet marked this pull request as ready for review February 23, 2022 12:24
@uweseimet uweseimet marked this pull request as draft February 23, 2022 12:57
@uweseimet uweseimet linked an issue Feb 27, 2022 that may be closed by this pull request
@uweseimet uweseimet mentioned this pull request Feb 27, 2022
@akuker akuker merged commit 0e8d89e into develop Feb 27, 2022
@uweseimet uweseimet deleted the feature_code_cleanup branch February 27, 2022 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants