X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib_internal%2Fmatchlist-initrefserverlist.c;fp=lib_internal%2Fmatchlist-initrefserverlist.c;h=f777ce8d76acb4498f816cb25edb8f713f6f0567;hb=2fbc46a92318904f1414f1aeaf256970e80e845a;hp=5ed9997c71442dd888e08ca98d5963a6de2078e3;hpb=69dc9cff7ba42e92bc1ed3bc57f5ac1fd302d52a;p=util-vserver.git diff --git a/lib_internal/matchlist-initrefserverlist.c b/lib_internal/matchlist-initrefserverlist.c index 5ed9997..f777ce8 100644 --- a/lib_internal/matchlist-initrefserverlist.c +++ b/lib_internal/matchlist-initrefserverlist.c @@ -1,16 +1,16 @@ // $Id$ --*- c -*-- // Copyright (C) 2004 Enrico Scholz -// +// // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; version 2 of the License. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -45,7 +45,7 @@ MatchList_initRefserverList(struct MatchList **lst, size_t *cnt, int cur_dir = Eopen(".", O_RDONLY, 0); struct dirent **entries; int count,i; - + Echdir(dir); count = scandir(".", &entries, selectRefserver, alphasort); if (count==-1) { @@ -61,7 +61,7 @@ MatchList_initRefserverList(struct MatchList **lst, size_t *cnt, *lst = Emalloc(sizeof(struct MatchList) * count); *cnt = count; for (i=0; id_name; + char const *tmp = entries[i]->d_name; size_t l = strlen(tmp); char vname[sizeof("./") + l]; struct MatchVserverInfo vserver = { @@ -71,7 +71,7 @@ MatchList_initRefserverList(struct MatchList **lst, size_t *cnt, memcpy(vname, "./", 2); memcpy(vname+2, tmp, l+1); - + if (!MatchVserverInfo_init(&vserver)) { WRITE_MSG(2, "failed to initialize unification of reference vserver\n"); exit(1);