Skip to content

add support for get disk serial number on darwin #1791

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

Merged
merged 4 commits into from
Mar 29, 2025

Conversation

samburba
Copy link
Contributor

Hello! This is my first PR on this project, so let me know if I got anything wrong and should change it.

This fixes #801 and adds support for getting (NVMe) drives' serial number. It does this by executing system_profiler and unmarshalling.

Copy link
Owner

@shirou shirou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! I haven't tested it myself, but using the JSON output of system_profiler seems like a good approach. I've left a few comments, so I'd appreciate it if you could address them.

@samburba samburba force-pushed the support-get-disk-serial-number-darwin branch 3 times, most recently from 409e7d2 to b83bf7f Compare March 1, 2025 08:06
@samburba samburba force-pushed the support-get-disk-serial-number-darwin branch from b83bf7f to 9fc28f2 Compare March 1, 2025 08:10
@samburba samburba requested a review from shirou March 1, 2025 08:11
@samburba
Copy link
Contributor Author

samburba commented Mar 1, 2025

@shirou thanks for the review! I think I've made all the request changes. Let me know if there is anything I missed!

@shirou
Copy link
Owner

shirou commented Mar 23, 2025

@samburba Thank you for the update. However, there are still lint errors remaining, so I apologize for the trouble, but could you please fix them? Once that's done, I can merge it.

Copy link
Owner

@shirou shirou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR. Also, I apologize for making the fix on my end. The tests are failing, but it's unrelated, so there's no issue. I'll merge it.

@shirou shirou merged commit 2b55813 into shirou:master Mar 29, 2025
51 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for getting disk serial number on darwin
2 participants