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
osutil: add helper for getting the kernel command line #9687
Conversation
Add a helper for getting the command line of the currently running kernel. Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
There was a problem hiding this 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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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>
There was a problem hiding this 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Add a helper for getting the command line of the currently running kernel.