summaryrefslogtreecommitdiff
path: root/rdiff-backup
diff options
context:
space:
mode:
authorbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2003-07-24 09:31:28 +0000
committerbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2003-07-24 09:31:28 +0000
commit9795da5e57f4ee432cfbe6d11ca636ad477d25ae (patch)
treed21e7af45bfa56ee5b8cfbad34978da67a2fa8d3 /rdiff-backup
parent44f51b0a76c40241e8a94f7e891d2a65f4ae0384 (diff)
downloadrdiff-backup-9795da5e57f4ee432cfbe6d11ca636ad477d25ae.tar.gz
Added fs_abilities.py to makedist script
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@363 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup')
-rwxr-xr-xrdiff-backup/dist/makedist15
-rw-r--r--rdiff-backup/rdiff_backup/cmodule.c16
2 files changed, 23 insertions, 8 deletions
diff --git a/rdiff-backup/dist/makedist b/rdiff-backup/dist/makedist
index cc337ff..95c2cb5 100755
--- a/rdiff-backup/dist/makedist
+++ b/rdiff-backup/dist/makedist
@@ -89,13 +89,14 @@ def MakeTar():
os.mkdir(tardir+"/rdiff_backup")
for filename in ["eas_acls.py", "backup.py", "connection.py",
- "FilenameMapping.py", "Hardlink.py",
- "increment.py", "__init__.py", "iterfile.py",
- "lazy.py", "librsync.py", "log.py", "Main.py",
- "manage.py", "metadata.py", "Rdiff.py",
- "regress.py", "restore.py", "robust.py",
- "rorpiter.py", "rpath.py", "Security.py",
- "selection.py", "SetConnections.py", "static.py",
+ "FilenameMapping.py", "fs_abilities.py",
+ "Hardlink.py", "increment.py", "__init__.py",
+ "iterfile.py", "lazy.py", "librsync.py",
+ "log.py", "Main.py", "manage.py", "metadata.py",
+ "Rdiff.py", "regress.py", "restore.py",
+ "robust.py", "rorpiter.py", "rpath.py",
+ "Security.py", "selection.py",
+ "SetConnections.py", "static.py",
"statistics.py", "TempFile.py", "Time.py"]:
assert not os.system("cp %s/%s %s/rdiff_backup" %
(SourceDir, filename, tardir)), filename
diff --git a/rdiff-backup/rdiff_backup/cmodule.c b/rdiff-backup/rdiff_backup/cmodule.c
index 0ed9710..0df8763 100644
--- a/rdiff-backup/rdiff_backup/cmodule.c
+++ b/rdiff-backup/rdiff_backup/cmodule.c
@@ -27,6 +27,20 @@
#include <unistd.h>
#include <errno.h>
+/* Some of the following code to define major/minor taken from code by
+ * Jörg Schilling's star archiver.
+ */
+#if !defined(major) && (defined(sgi) || defined(__sgi) || defined(__SVR4)) && !defined(__CYGWIN32__)
+#include <sys/mkdev.h>
+#endif
+
+#ifndef major
+# define major(dev) (((dev) >> 8) & 0xFF)
+# define minor(dev) ((dev) & 0xFF)
+# define makedev(majo, mino) (((majo) << 8) | (mino))
+#endif
+/* End major/minor section */
+
/* choose the appropriate stat and fstat functions and return structs */
/* This code taken from Python's posixmodule.c */
#undef STAT
@@ -147,7 +161,7 @@ static PyObject *c_make_file_dict(self, args)
PyObject *major_num = PyLong_FromLongLong(major(devnums));
#else
long int devnums = (long)sbuf.st_dev;
- PyObject *major_num = PyInt_FromLong(devnums >> 8);
+ PyObject *major_num = PyInt_FromLong(major(devnums));
#endif
int minor_num = (int)(minor(devnums));
if S_ISCHR(mode) strcpy(devtype, "c");