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

osutil: add helper for getting the kernel command line #9687

Merged
merged 3 commits into from Nov 27, 2020

Conversation

bboozzoo
Copy link
Collaborator

Add a helper for getting the command line of the currently running kernel.

Add a helper for getting the command line of the currently running kernel.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
@bboozzoo bboozzoo added Simple 😃 A small PR which can be reviewed quickly UC20 labels Nov 24, 2020
Copy link
Member

@anonymouse64 anonymouse64 left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -203,3 +203,12 @@ func KernelCommandLineKeyValues(keys ...string) (map[string]string, error) {
}
return m, nil
}

// KernelCommandLine returns the command line reported by the running kernel.
Copy link
Member

Choose a reason for hiding this comment

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

not needed for this PR, but we could simplify KernelCommandLineKeyValues to use this helper now instead of manually doing exactly the same thing

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
Copy link
Contributor

@stolowski stolowski 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. And I agree with @anonymouse64 comment.

@@ -203,3 +203,12 @@ func KernelCommandLineKeyValues(keys ...string) (map[string]string, error) {
}
return m, nil
}

// KernelCommandLine returns the command line reported by the running kernel.
Copy link
Contributor

Choose a reason for hiding this comment

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

+1

@bboozzoo bboozzoo merged commit 5c11fd7 into snapcore:master Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Simple 😃 A small PR which can be reviewed quickly
Projects
None yet
3 participants