git://git.onelab.eu
/
util-vserver.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
43d675c
)
- merge revision 1.2 to util-vserver-0.30.207 (yes, 207; this is the latest version...
author
Mark Huang
<mlhuang@cs.princeton.edu>
Sun, 21 Aug 2005 22:24:19 +0000
(22:24 +0000)
committer
Mark Huang
<mlhuang@cs.princeton.edu>
Sun, 21 Aug 2005 22:24:19 +0000
(22:24 +0000)
src/vutil.h
patch
|
blob
|
history
diff --git
a/src/vutil.h
b/src/vutil.h
index
153076d
..
90101c0
100644
(file)
--- a/
src/vutil.h
+++ b/
src/vutil.h
@@
-1,4
+1,4
@@
-// $Id: vutil.h,v 1.
1 2003/09/29 22:01:57
ensc Exp $
+// $Id: vutil.h,v 1.
3 2003/10/21 13:23:28
ensc Exp $
// Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
// based on vutil.h by Jacques Gelinas
// Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
// based on vutil.h by Jacques Gelinas
@@
-21,6
+21,8
@@
#ifndef VUTIL_H
#define VUTIL_H
#ifndef VUTIL_H
#define VUTIL_H
+#include "vserver.hh"
+
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
@@
-36,42
+38,35
@@
extern int debug;
extern bool testmode;
// Patch to help compile this utility on unpatched kernel source
extern bool testmode;
// Patch to help compile this utility on unpatched kernel source
-#ifndef EXT2_IMMUTABLE_FL
-#define EXT2_IMMUTABLE_FL 0x00000010
-#endif
-
-#ifndef EXT2_IUNLINK_FL
-/* Set both bits for backward compatibility */
-#define EXT2_IUNLINK_FL 0x08008000
-#endif
-
-#ifndef EXT2_BARRIER_FL
-#define EXT2_BARRIER_FL 0x04000000
+#ifndef EXT2_IMMUTABLE_FILE_FL
+ #define EXT2_IMMUTABLE_FILE_FL 0x00000010
+ /* Set both bits for backward compatibility */
+ #define EXT2_IMMUTABLE_LINK_FL 0x08008000
#endif
#endif
-FILE *vutil_execdistcmd (const char *,
const string
&, const char *);
+FILE *vutil_execdistcmd (const char *,
Vserver const
&, const char *);
extern const char K_DUMPFILES[];
extern const char K_UNIFILES[];
extern const char K_PKGVERSION[];
extern const char K_DUMPFILES[];
extern const char K_UNIFILES[];
extern const char K_PKGVERSION[];
-class P
ACKAGE
{
+class P
ackage
{
public:
string name;
string version; // version + release
public:
string name;
string version; // version + release
- P
ACKAGE
(string &_name, string &_version)
+ P
ackage
(string &_name, string &_version)
: name (_name), version(_version)
{
}
: name (_name), version(_version)
{
}
- P
ACKAGE
(const char *_name, const char *_version)
+ P
ackage
(const char *_name, const char *_version)
: name (_name), version(_version)
{
}
: name (_name), version(_version)
{
}
- P
ACKAGE
(const string &line)
+ P
ackage
(const string &line)
{
*this = line;
}
{
*this = line;
}
- P
ACKAGE
& operator = (const string &_line)
+ P
ackage
& operator = (const string &_line)
{
string line (_line);
string::iterator pos = find (line.begin(),line.end(),'=');
{
string line (_line);
string::iterator pos = find (line.begin(),line.end(),'=');
@@
-81,16
+76,16
@@
public:
}
return *this;
}
}
return *this;
}
- P
ACKAGE (const PACKAGE
&pkg)
+ P
ackage (const Package
&pkg)
{
name = pkg.name;
version = pkg.version;
}
{
name = pkg.name;
version = pkg.version;
}
- bool operator == (const P
ACKAGE
&v) const
+ bool operator == (const P
ackage
&v) const
{
return name == v.name && version == v.version;
}
{
return name == v.name && version == v.version;
}
- bool operator < (const P
ACKAGE
&v) const
+ bool operator < (const P
ackage
&v) const
{
bool ret = false;
if (name < v.name){
{
bool ret = false;
if (name < v.name){
@@
-101,7
+96,7
@@
public:
return ret;
}
// Load the file member of the package, but exclude configuration file
return ret;
}
// Load the file member of the package, but exclude configuration file
- void loadfiles(
const string
&ref, set<string> &files)
+ void loadfiles(
Vserver const
&ref, set<string> &files)
{
if (debug > 2) cout << "Loading files for package " << name << endl;
string namever = name + '-' + version;
{
if (debug > 2) cout << "Loading files for package " << name << endl;
string namever = name + '-' + version;
@@
-126,10
+121,10
@@
public:
// Check if two package have the same name (but potentially different version)
class same_name{
// Check if two package have the same name (but potentially different version)
class same_name{
- const P
ACKAGE
&pkg;
+ const P
ackage
&pkg;
public:
public:
- same_name(const P
ACKAGE
&_pkg) : pkg(_pkg) {}
- bool operator()(const P
ACKAGE
&p)
+ same_name(const P
ackage
&_pkg) : pkg(_pkg) {}
+ bool operator()(const P
ackage
&p)
{
return pkg.name == p.name;
}
{
return pkg.name == p.name;
}