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

Make sysctl calls on FreeBSD #90295

Merged
merged 1 commit into from
Apr 8, 2024
Merged

Conversation

sambler
Copy link
Contributor

@sambler sambler commented Apr 6, 2024

The OS module get_unique_id and get_processor_name rely on linux files which don't exist on a standard FreeBSD install, make sysctl calls to get the required data.

I expect OpenBSD and NetBSD would require similar changes.

@sambler sambler requested a review from a team as a code owner April 6, 2024 07:59
@AThousandShips
Copy link
Member

You didn't update your branch, it is still about 18 months out of date, please update your branch with git rebase -i master after updating your master branch to the latest version

@sambler sambler reopened this Apr 6, 2024
@AThousandShips AThousandShips added this to the 4.x milestone Apr 6, 2024
@akien-mga
Copy link
Member

There are still style issues that would be fixed by clang-format (or checking surrounding code and using the same style).

And the commits are still not linked to your GH account.

@sambler
Copy link
Contributor Author

sambler commented Apr 6, 2024

@akien-mga hi, when I look at the commit history it says I authored and committed the changes, so I'm not sure how its not linked to my account, or what I would need to change.

@AThousandShips
Copy link
Member

See: Why are my commits linked to the wrong user? for more info.

@sambler
Copy link
Contributor Author

sambler commented Apr 6, 2024

Seems there was a capital letter in my github email that makes it different to the commit info.

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

Didn't test, but assuming it works, the changes seem fine.

Could you squash the commits? See PR workflow for instructions.

While doing so, you would also get a change to update your Git email to make it match your GitHub account's (with git commit --amend --reset-author after changing your local or global Git email).

@akien-mga
Copy link
Member

akien-mga commented Apr 6, 2024

You added unexpected changes, you probably rebased on your old local master branch again instead of upstream.

You can go back with git reset --hard e42a8fd8ab49e9735be77525d22882b75d3d802d and try again with:

git remote add upstream https://github.com/godotengine/godot
git fetch upstream
git checkout sysctl_adjust
git rebase -i upstream/master

And for good measure, you could also do:

git checkout master
git reset --hard upstream/master

to stop going back to 18 months old code :)

@sambler sambler force-pushed the sysctl_adjust branch 2 times, most recently from 6839dc3 to e0b76d7 Compare April 6, 2024 11:14
@sambler sambler closed this Apr 6, 2024
@sambler sambler reopened this Apr 6, 2024
@sambler
Copy link
Contributor Author

sambler commented Apr 6, 2024

I think it looks right this time

@akien-mga
Copy link
Member

Yes, looks great!

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Apr 6, 2024
@akien-mga akien-mga added the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Apr 6, 2024
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

Looks good! Could you squash the commits?

The OS module get_unique_id and get_processor_name rely
on linux files which don't exist on a standard FreeBSD install,
make sysctl calls to get the required data.
@sambler
Copy link
Contributor Author

sambler commented Apr 8, 2024

@akien-mga should be good to go now. Note that I also added the String::utf8 change which I didn't push earlier.

@akien-mga akien-mga merged commit 9856182 into godotengine:master Apr 8, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks! And congrats for your first merged Godot contribution 🎉

@akien-mga
Copy link
Member

Cherry-picked for 4.2.2.

@akien-mga akien-mga removed the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Apr 8, 2024
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.

4 participants