X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=linux_module%2Fpalacios-vnet-ctrl.c;fp=linux_module%2Fpalacios-vnet-ctrl.c;h=6dae6bbf7730736448ba7a0162dbbe840ff9aa7a;hp=86ec1296ad75a24f269ab8779518faec5fb4a4a5;hb=c8b23e99efde3aa5a2c26d1b8e9bc7dc914e6113;hpb=4e43946f01f687361197dc9571b7df02ae20de30 diff --git a/linux_module/palacios-vnet-ctrl.c b/linux_module/palacios-vnet-ctrl.c index 86ec129..6dae6bb 100644 --- a/linux_module/palacios-vnet-ctrl.c +++ b/linux_module/palacios-vnet-ctrl.c @@ -925,34 +925,33 @@ static int init_proc_files(void) { return -1; } - route_entry = create_proc_entry("routes", 0644, vnet_root); + + PAL_PROC_CREATE(route_entry,"routes",0644, vnet_root,&route_fops); + if (route_entry == NULL) { remove_proc_entry("vnet", NULL); return -1; } - route_entry->proc_fops = &route_fops; + PAL_PROC_CREATE(link_entry,"links", 0644, vnet_root,&link_fops); - link_entry = create_proc_entry("links", 0644, vnet_root); if (link_entry == NULL) { remove_proc_entry("routes", vnet_root); remove_proc_entry("vnet", NULL); return -1; } - link_entry->proc_fops = &link_fops; - - stat_entry = create_proc_entry("stats", 0644, vnet_root); + PAL_PROC_CREATE(stat_entry,"stats", 0644, vnet_root, &stat_fops); + if(stat_entry == NULL) { remove_proc_entry("links", vnet_root); remove_proc_entry("routes", vnet_root); remove_proc_entry("vnet", NULL); return -1; } - stat_entry->proc_fops = &stat_fops; + PAL_PROC_CREATE(debug_entry,"debug", 0644, vnet_root,&debug_fops); - debug_entry = create_proc_entry("debug", 0644, vnet_root); if(debug_entry == NULL) { remove_proc_entry("links", vnet_root); remove_proc_entry("routes", vnet_root); @@ -960,7 +959,6 @@ static int init_proc_files(void) { remove_proc_entry("vnet", NULL); return -1; } - debug_entry->proc_fops = &debug_fops; vnet_ctrl_s.vnet_proc_root = vnet_root;