[Devel] [PATCH v2 25/27] connector: containerize "connector" proc entry

Stanislav Kinsburskiy skinsbursky at virtuozzo.com
Thu Aug 17 17:01:08 MSK 2017


Needed to expose "/proc/net/connector" in CT and show right content.

Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
 drivers/connector/connector.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c
index 59d81a3..771dadf 100644
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -241,7 +241,7 @@ EXPORT_SYMBOL_GPL(cn_del_callback);
 
 static int cn_proc_show(struct seq_file *m, void *v)
 {
-	struct cn_queue_dev *dev = get_cdev(get_ve0())->cbdev;
+	struct cn_queue_dev *dev = get_cdev(get_exec_env())->cbdev;
 	struct cn_callback_entry *cbq;
 
 	seq_printf(m, "Name            ID\n");
@@ -303,7 +303,7 @@ static int cn_init_ve(struct ve_struct *ve)
 
 	ve->cn->cn_already_initialized = 1;
 
-	if (!proc_create("connector", S_IRUGO, net->proc_net, &cn_file_ops)) {
+	if (!proc_net_create("connector", S_IRUGO, net->proc_net, &cn_file_ops)) {
 		err = -ENOMEM;
 		goto free_cdev;
 	}



More information about the Devel mailing list