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:
James Hunt
2015-10-16 11:58:42 +01:00
parent e0b5a5d99c
commit a36ca0db8f
2 changed files with 7 additions and 2 deletions
+1
View File
@@ -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
View File
@@ -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];