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

Restore network configuration via kernel cli #571

Merged
merged 1 commit into from
Nov 10, 2022

Conversation

JTS22
Copy link
Contributor

@JTS22 JTS22 commented Nov 9, 2022

Restores the ability to set the network IP address, gateway and subnet mask via the kernel commandline arguments -ip, -gateway and -mask.

Closes #522

@mkroening mkroening self-requested a review November 9, 2022 10:43
Copy link
Member

@mkroening mkroening left a comment

Choose a reason for hiding this comment

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

Thanks for your PR! :)

It would be good to introduce an fn var(key: &str) -> Option<String> in env akin to std::env::var.

The variables could then be defined with macros and with less redundancy, similar to how it was before eb2a46f.

If you would rather have me do these changes, just say so.

Also, please squash your commits in the end. :)

@JTS22
Copy link
Contributor Author

JTS22 commented Nov 9, 2022

I agree that would make sense, I will try to implement that :)

@JTS22 JTS22 force-pushed the network-cli branch 5 times, most recently from 8ed7bcc to 1560ee6 Compare November 10, 2022 14:31
@JTS22 JTS22 requested a review from mkroening November 10, 2022 14:40
Copy link
Member

@mkroening mkroening left a comment

Choose a reason for hiding this comment

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

Looks great! Just two minor suggestions.

src/env.rs Outdated Show resolved Hide resolved
src/syscalls/interfaces/mod.rs Outdated Show resolved Hide resolved
Copy link
Member

@mkroening mkroening left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

bors r+

@bors
Copy link
Contributor

bors bot commented Nov 10, 2022

@bors bors bot merged commit 18eb574 into hermit-os:master Nov 10, 2022
@JTS22 JTS22 deleted the network-cli branch November 10, 2022 15:40
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.

Fix network specification via QEMU command line
2 participants