mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-08-19 03:47:27 +00:00
Add virtio_9p_rootdir_handle() which accepts a struct kvm.
This will allow the OCI code to make use of it, rather than just the options-parsing code. Signed-off-by: James Hunt <james.o.hunt@intel.com>
This commit is contained in:
@@ -66,6 +66,7 @@ struct p9_pdu {
|
||||
|
||||
struct kvm;
|
||||
|
||||
int virtio_9p_rootdir_handle(struct kvm *kvm, const char *arg);
|
||||
int virtio_9p_rootdir_parser(const struct option *opt, const char *arg, int unset);
|
||||
int virtio_9p_img_name_parser(const struct option *opt, const char *arg, int unset);
|
||||
int virtio_9p__register(struct kvm *kvm, const char *root, const char *tag_name);
|
||||
|
||||
+6
-2
@@ -1467,11 +1467,10 @@ struct virtio_ops p9_dev_virtio_ops = (struct virtio_ops) {
|
||||
.set_size_vq = set_size_vq,
|
||||
};
|
||||
|
||||
int virtio_9p_rootdir_parser(const struct option *opt, const char *arg, int unset)
|
||||
int virtio_9p_rootdir_handle(struct kvm *kvm, const char *arg)
|
||||
{
|
||||
char *tag_name;
|
||||
char tmp[PATH_MAX];
|
||||
struct kvm *kvm = opt->ptr;
|
||||
|
||||
/*
|
||||
* 9p dir can be of the form dirname,tag_name or
|
||||
@@ -1491,6 +1490,11 @@ int virtio_9p_rootdir_parser(const struct option *opt, const char *arg, int unse
|
||||
return 0;
|
||||
}
|
||||
|
||||
int virtio_9p_rootdir_parser(const struct option *opt, const char *arg, int unset)
|
||||
{
|
||||
return virtio_9p_rootdir_handle((struct kvm *)opt->ptr, arg);
|
||||
}
|
||||
|
||||
int virtio_9p_img_name_parser(const struct option *opt, const char *arg, int unset)
|
||||
{
|
||||
char path[PATH_MAX];
|
||||
|
||||
Reference in New Issue
Block a user