// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#pragma implementation
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <utime.h>
#include "vutil.h"
#include <sys/ioctl.h>
-#include <linux/ext2_fs.h>
+#include "ext2fs.h"
+
+#include <pathconfig.h>
bool testmode;
int debug;
ret = ioctl (fd,EXT2_IOC_SETFLAGS,&flags);
close (fd);
if (ret == -1){
- fprintf (stderr,"Can't %s immutable flag on file %s (^s)\n"
+ fprintf (stderr,"Can't %s immutable flag on file %s (%s)\n"
,(set ? "set" : "unset")
,fname
,strerror(errno));
/*
Load the list of all packages in a vserver
*/
-void vutil_loadallpkg (string &refserver, list<PACKAGE> &packages)
+void vutil_loadallpkg (Vserver const &refserver, list<Package> &packages)
{
FILE *fin = vutil_execdistcmd (K_PKGVERSION,refserver,NULL);
if (fin != NULL){
while (fgets(line,sizeof(line)-1,fin)!=NULL){
int last = strlen(line)-1;
if (last >= 0 && line[last] == '\n') line[last] = '\0';
- packages.push_back (PACKAGE(line));
+ packages.push_back (Package(line));
}
pclose (fin);
}
const char K_DUMPFILES[]="dumpfiles";
const char K_UNIFILES[]="unifiles";
-FILE *vutil_execdistcmd (const char *key, const string &vserver, const char *args)
+FILE *vutil_execdistcmd (const char *key, Vserver const &vserver, const char *args)
{
string cmd = PKGLIBDIR "/distrib-info ";
- cmd += vserver;
+ cmd += vserver.getConfDir();
cmd += " ";
cmd += key;
if (args != NULL){
}
return ret;
}
-