Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync src/scsi_id/scsi_id.c #203

Merged
merged 8 commits into from
Oct 16, 2021
Merged

sync src/scsi_id/scsi_id.c #203

merged 8 commits into from
Oct 16, 2021

Conversation

bbonev
Copy link
Member

@bbonev bbonev commented Sep 19, 2021

Author: Jan Synacek [email protected]
Date: Wed Aug 2 10:12:33 2017 +0200

scsi_id: add missing options to getopt_long() (#6501)

systemd-commit: ebc6f34a0b2359ac0da41037a1122d3abe02caee

@bbonev
Copy link
Member Author

bbonev commented Sep 27, 2021

Some important changes are there, this should be ready to merge after a review

systemd-commit: ebc6f34a0b2359ac0da41037a1122d3abe02caee
Author: Jan Synacek <[email protected]>
Date:   Wed Aug 2 10:12:33 2017 +0200
Previously, the value is once stringified, and later again parsed,
that is completely redundant.

Follow-up for 1001167ca5e4cfdc6230562e4fb9029e5f624d53.

Replaces #20013.

systemd-commit: 4dce1b9f059733ed9a263fba7cfa12704e96794a
Author: Yu Watanabe <[email protected]>
Date:   Fri Jun 25 15:04:12 2021 +0900
gcc was warning about strncpy() leaving an unterminated string.
In this case, it was correct.

The code was doing strncpy()+strncat()+strlen() essentially to determine
if the strings have expected length. If the length was correct, a buffer
overread was performed (or at least some garbage bytes were used from the
uninitialized part of the buffer). Let's do the length check first and then
only copy stuff if everything agrees.

For some reason the function was called "prepend", when it obviously does
an "append".

systemd-commit: 099c77fd5ff835614dea8dc11c57f6d44f77d9ee
Author: Zbigniew Jędrzejewski-Szmek <[email protected]>
Date:   Tue May 7 15:58:29 2019 +0200
The prefix for EMC Symmetrix pre-SPC VPD inquiry reply
is always SCSI_ID_NAA, so we need to hardcode it to
avoid false values here.

Signed-off-by: Hannes Reinecke <[email protected]>

systemd-commit: c0373eb019db70017878ee64d042de902e4c98ee
Author: Hannes Reinecke <[email protected]>
Date:   Wed Sep 13 09:08:28 2017 +0200
…n VPD page

The length of device identification VPD page is filled with two bytes,
but scsi_id only gets the low byte. Fix it.

Signed-off-by: Zhang Xianwei <[email protected]>

systemd-commit: 1f7b6872dbe8ccae1f3bda9aa6aeb87c9b42e01e
Author: Zhang Xianwei <[email protected]>
Date:   Mon May 13 18:41:55 2019 +0800
@bbonev bbonev merged commit 221549a into eudev-project:master Oct 16, 2021
@bbonev bbonev deleted the s1scsi branch April 6, 2022 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants