From: Andy Bavier Date: Fri, 21 Mar 2008 18:59:01 +0000 (+0000) Subject: Couple bug fixes X-Git-Tag: trellis-2.6.22-Jan-2009~24 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=7158865a8457e6468919355c651c65b453c5097e;p=linux-2.6.git Couple bug fixes --- diff --git a/enter_topo.c b/enter_topo.c index a671b8726..18cfdcb85 100644 --- a/enter_topo.c +++ b/enter_topo.c @@ -25,7 +25,8 @@ int get_slice_xid(char *slice_name) { char slicepath[PATHLEN]; FILE *fp; int xid; - snprintf(slicepath, sizeof(slicepath), "/etc/vservers/%s/context"); + snprintf(slicepath, sizeof(slicepath), "/etc/vservers/%s/context", + slice_name); if ((fp = fopen(slicepath, "r")) == NULL) { printf("Could not open %s\n", slicepath); @@ -45,7 +46,7 @@ int verify_ownership(int pid, int arg_xid) { char procpath[PATHLEN]; FILE *fp; int xid; - snprintf(procpath, sizeof(procpath), "/proc/%d/vinfo"); + snprintf(procpath, sizeof(procpath), "/proc/%d/vinfo", pid); if ((fp = fopen(procpath, "r")) == NULL) { printf("Could not open %s\n", procpath);