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

libkrun: add config_size to KipConfig #1

Merged
merged 1 commit into from
Aug 17, 2020

Conversation

giuseppe
Copy link
Member

let the libkrun user specify the size of the "struct krun_config" to
help detecting mismatches between the configuration used by the user
of the library and what libkrun handles.

If the specified size is bigger than what libkrun uses, then it means
there are extra options specified by the user that libkrun cannot
honor.

We could handle the case where the specified size is less than what
libkrun knows and don't handle what is not known to the library user
but simplify usage for now and error out in both cases.

Signed-off-by: Giuseppe Scrivano gscrivan@redhat.com

Copy link
Contributor

@slp slp left a comment

Choose a reason for hiding this comment

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

This is definitely a good idea. Thanks to this PR I also noticed we need to rename KipConfig, which I'll do after merging this PR.

There's a just small problem with a comment. Otherwise LGTM.

Thanks!

examples/chroot_vm.c Show resolved Hide resolved
let the libkrun user specify the size of the "struct krun_config" to
help detecting mismatches between the configuration used by the user
of the library and what libkrun handles.

If the specified size is bigger than what libkrun uses, then it means
there are extra options specified by the user that libkrun cannot
honor.

We could handle the case where the specified size is less than what
libkrun knows and don't handle what is not known to the library user
but simplify usage for now and error out in both cases.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@slp slp merged commit 0715199 into containers:main Aug 17, 2020
@slp
Copy link
Contributor

slp commented Aug 17, 2020

@giuseppe Merged, thanks!

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.

None yet

2 participants